diff --git a/configure.ac b/configure.ac index efe61286d..026a058b0 100644 --- a/configure.ac +++ b/configure.ac @@ -446,7 +446,7 @@ AC_SUBST(PERL_MM_PARMS) AC_SUBST(EXTRA_PERL_LIB) -AC_CONFIG_FILES([Makefile zm.conf zmconfgen.pl db/Makefile db/zm_create.sql misc/Makefile misc/apache.conf misc/logrotate.conf misc/syslog.conf misc/com.zoneminder.systemctl.policy misc/com.zoneminder.systemctl.rules scripts/Makefile scripts/zm scripts/zmaudit.pl scripts/zmcontrol.pl scripts/zmdc.pl scripts/zmfilter.pl scripts/zmpkg.pl scripts/zmtrack.pl scripts/zmcamtool.pl scripts/zmsystemctl.pl scripts/zmtrigger.pl scripts/zmupdate.pl scripts/zmvideo.pl scripts/zmwatch.pl scripts/zmx10.pl scripts/zmdbbackup scripts/zmdbrestore scripts/zmeventdump scripts/zmlogrotate.conf scripts/ZoneMinder/lib/ZoneMinder/Base.pm scripts/ZoneMinder/lib/ZoneMinder/Config.pm scripts/ZoneMinder/lib/ZoneMinder/Memory.pm scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm src/Makefile src/zm_config.h web/Makefile web/ajax/Makefile web/css/Makefile web/graphics/Makefile web/includes/Makefile web/includes/config.php web/js/Makefile web/lang/Makefile web/skins/Makefile web/skins/classic/Makefile web/skins/classic/ajax/Makefile web/skins/classic/css/Makefile web/skins/classic/graphics/Makefile web/skins/classic/includes/Makefile web/skins/classic/js/Makefile web/skins/classic/lang/Makefile web/skins/classic/views/Makefile web/skins/classic/views/css/Makefile web/skins/classic/views/js/Makefile web/skins/mobile/Makefile web/skins/mobile/ajax/Makefile web/skins/mobile/css/Makefile web/skins/mobile/graphics/Makefile web/skins/mobile/includes/Makefile web/skins/mobile/lang/Makefile web/skins/mobile/views/Makefile web/skins/mobile/views/css/Makefile web/tools/Makefile web/tools/mootools/Makefile web/views/Makefile web/skins/xml/Makefile web/skins/xml/views/Makefile web/skins/xml/includes/Makefile web/skins/flat/Makefile web/skins/flat/ajax/Makefile web/skins/flat/css/Makefile web/skins/flat/graphics/Makefile web/skins/flat/includes/Makefile web/skins/flat/js/Makefile web/skins/flat/lang/Makefile web/skins/flat/views/Makefile web/skins/flat/views/css/Makefile web/skins/flat/views/js/Makefile]) +AC_CONFIG_FILES([Makefile zm.conf zmconfgen.pl db/Makefile db/zm_create.sql misc/Makefile misc/apache.conf misc/logrotate.conf misc/syslog.conf misc/com.zoneminder.systemctl.policy misc/com.zoneminder.systemctl.rules scripts/Makefile scripts/zm scripts/zmaudit.pl scripts/zmcontrol.pl scripts/zmdc.pl scripts/zmfilter.pl scripts/zmpkg.pl scripts/zmtrack.pl scripts/zmcamtool.pl scripts/zmsystemctl.pl scripts/zmtrigger.pl scripts/zmupdate.pl scripts/zmvideo.pl scripts/zmwatch.pl scripts/zmx10.pl scripts/zmdbbackup scripts/zmdbrestore scripts/zmeventdump scripts/zmlogrotate.conf scripts/ZoneMinder/lib/ZoneMinder/Base.pm scripts/ZoneMinder/lib/ZoneMinder/Config.pm scripts/ZoneMinder/lib/ZoneMinder/Memory.pm scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm src/Makefile src/zm_config.h web/Makefile web/ajax/Makefile web/css/Makefile web/graphics/Makefile web/includes/Makefile web/includes/config.php web/js/Makefile web/lang/Makefile web/skins/Makefile web/skins/classic/Makefile web/skins/classic/ajax/Makefile web/skins/classic/css/Makefile web/skins/classic/css/classic/Makefile web/skins/classic/css/classic/views/Makefile web/skins/classic/graphics/Makefile web/skins/classic/includes/Makefile web/skins/classic/js/Makefile web/skins/classic/lang/Makefile web/skins/classic/views/Makefile web/skins/classic/views/js/Makefile web/skins/mobile/Makefile web/skins/mobile/ajax/Makefile web/skins/mobile/css/Makefile web/skins/mobile/graphics/Makefile web/skins/mobile/includes/Makefile web/skins/mobile/lang/Makefile web/skins/mobile/views/Makefile web/skins/mobile/views/css/Makefile web/tools/Makefile web/tools/mootools/Makefile web/views/Makefile web/skins/xml/Makefile web/skins/xml/views/Makefile web/skins/xml/includes/Makefile web/skins/flat/Makefile web/skins/flat/ajax/Makefile web/skins/flat/css/Makefile web/skins/flat/graphics/Makefile web/skins/flat/includes/Makefile web/skins/flat/js/Makefile web/skins/flat/lang/Makefile web/skins/flat/views/Makefile web/skins/flat/views/css/Makefile web/skins/flat/views/js/Makefile]) # Create the definitions for compilation and defaults for the database AC_CONFIG_COMMANDS([src/zm_config_defines.h],[perl ./zmconfgen.pl]) diff --git a/web/index.php b/web/index.php index 0fb8fd158..f6ca44ff2 100644 --- a/web/index.php +++ b/web/index.php @@ -63,6 +63,13 @@ elseif ( isset($_COOKIE['zmSkin']) ) else $skin = "classic"; +if ( isset($_GET['css']) ) + $css = $_GET['css']; +elseif ( isset($_COOKIE['zmCSS']) ) + $css = $_COOKIE['zmCSS']; +else + $css = "classic"; + define( "ZM_BASE_PATH", dirname( $_SERVER['REQUEST_URI'] ) ); define( "ZM_SKIN_PATH", "skins/$skin" ); @@ -82,6 +89,11 @@ if ( !isset($_SESSION['skin']) || isset($_REQUEST['skin']) ) setcookie( "zmSkin", $skin, time()+3600*24*30*12*10 ); } +if ( !isset($_SESSION['css']) || isset($_REQUEST['css']) ) { + $_SESSION['css'] = $css; + setcookie( "zmCSS", $css, time()+3600*24*30*12*10 ); +} + require_once( 'includes/config.php' ); require_once( 'includes/logger.php' ); diff --git a/web/lang/en_gb.php b/web/lang/en_gb.php index ab3b35de6..92462f430 100644 --- a/web/lang/en_gb.php +++ b/web/lang/en_gb.php @@ -609,6 +609,7 @@ $SLANG = array( 'SignalCheckColour' => 'Signal Check Colour', 'Size' => 'Size', 'SkinDescription' => 'Change the default skin for this computer', + 'CSSDescription' => 'Change the default css for this computer', 'Sleep' => 'Sleep', 'SortAsc' => 'Asc', 'SortBy' => 'Sort by', diff --git a/web/skins/classic/css/Makefile.am b/web/skins/classic/css/Makefile.am index 5b0cbe135..be278f7b4 100644 --- a/web/skins/classic/css/Makefile.am +++ b/web/skins/classic/css/Makefile.am @@ -2,7 +2,4 @@ AUTOMAKE_OPTIONS = gnu webdir = @WEB_PREFIX@/skins/classic/css -dist_web_DATA = \ - skin.css \ - control.css \ - export.css +SUBDIRS = classic diff --git a/web/skins/classic/css/classic/Makefile.am b/web/skins/classic/css/classic/Makefile.am new file mode 100644 index 000000000..48dc58ab7 --- /dev/null +++ b/web/skins/classic/css/classic/Makefile.am @@ -0,0 +1,10 @@ +AUTOMAKE_OPTIONS = gnu + +webdir = @WEB_PREFIX@/skins/classic/css/classic + +SUBDIRS = views + +dist_web_DATA = \ + skin.css \ + control.css \ + export.css diff --git a/web/skins/classic/css/control.css b/web/skins/classic/css/classic/control.css similarity index 100% rename from web/skins/classic/css/control.css rename to web/skins/classic/css/classic/control.css diff --git a/web/skins/classic/css/export.css b/web/skins/classic/css/classic/export.css similarity index 100% rename from web/skins/classic/css/export.css rename to web/skins/classic/css/classic/export.css diff --git a/web/skins/classic/css/skin.css b/web/skins/classic/css/classic/skin.css similarity index 100% rename from web/skins/classic/css/skin.css rename to web/skins/classic/css/classic/skin.css diff --git a/web/skins/classic/views/css/Makefile.am b/web/skins/classic/css/classic/views/Makefile.am similarity index 89% rename from web/skins/classic/views/css/Makefile.am rename to web/skins/classic/css/classic/views/Makefile.am index 39c270cf7..d07eaac4f 100644 --- a/web/skins/classic/views/css/Makefile.am +++ b/web/skins/classic/css/classic/views/Makefile.am @@ -1,6 +1,6 @@ AUTOMAKE_OPTIONS = gnu -webdir = @WEB_PREFIX@/skins/classic/views/css +webdir = @WEB_PREFIX@/skins/classic/css/classic/views dist_web_DATA = \ console.css \ diff --git a/web/skins/classic/views/css/console.css b/web/skins/classic/css/classic/views/console.css similarity index 100% rename from web/skins/classic/views/css/console.css rename to web/skins/classic/css/classic/views/console.css diff --git a/web/skins/classic/views/css/control.css b/web/skins/classic/css/classic/views/control.css similarity index 100% rename from web/skins/classic/views/css/control.css rename to web/skins/classic/css/classic/views/control.css diff --git a/web/skins/classic/views/css/controlcaps.css b/web/skins/classic/css/classic/views/controlcaps.css similarity index 100% rename from web/skins/classic/views/css/controlcaps.css rename to web/skins/classic/css/classic/views/controlcaps.css diff --git a/web/skins/classic/views/css/devices.css b/web/skins/classic/css/classic/views/devices.css similarity index 100% rename from web/skins/classic/views/css/devices.css rename to web/skins/classic/css/classic/views/devices.css diff --git a/web/skins/classic/views/css/event.css b/web/skins/classic/css/classic/views/event.css similarity index 100% rename from web/skins/classic/views/css/event.css rename to web/skins/classic/css/classic/views/event.css diff --git a/web/skins/classic/views/css/events.css b/web/skins/classic/css/classic/views/events.css similarity index 100% rename from web/skins/classic/views/css/events.css rename to web/skins/classic/css/classic/views/events.css diff --git a/web/skins/classic/views/css/export.css b/web/skins/classic/css/classic/views/export.css similarity index 100% rename from web/skins/classic/views/css/export.css rename to web/skins/classic/css/classic/views/export.css diff --git a/web/skins/classic/views/css/filter.css b/web/skins/classic/css/classic/views/filter.css similarity index 100% rename from web/skins/classic/views/css/filter.css rename to web/skins/classic/css/classic/views/filter.css diff --git a/web/skins/classic/views/css/frame.css b/web/skins/classic/css/classic/views/frame.css similarity index 100% rename from web/skins/classic/views/css/frame.css rename to web/skins/classic/css/classic/views/frame.css diff --git a/web/skins/classic/views/css/frames.css b/web/skins/classic/css/classic/views/frames.css similarity index 100% rename from web/skins/classic/views/css/frames.css rename to web/skins/classic/css/classic/views/frames.css diff --git a/web/skins/classic/views/css/groups.css b/web/skins/classic/css/classic/views/groups.css similarity index 100% rename from web/skins/classic/views/css/groups.css rename to web/skins/classic/css/classic/views/groups.css diff --git a/web/skins/classic/views/css/log.css b/web/skins/classic/css/classic/views/log.css similarity index 100% rename from web/skins/classic/views/css/log.css rename to web/skins/classic/css/classic/views/log.css diff --git a/web/skins/classic/views/css/monitor.css b/web/skins/classic/css/classic/views/monitor.css similarity index 100% rename from web/skins/classic/views/css/monitor.css rename to web/skins/classic/css/classic/views/monitor.css diff --git a/web/skins/classic/views/css/montage.css b/web/skins/classic/css/classic/views/montage.css similarity index 100% rename from web/skins/classic/views/css/montage.css rename to web/skins/classic/css/classic/views/montage.css diff --git a/web/skins/classic/views/css/montage_2wide.css b/web/skins/classic/css/classic/views/montage_2wide.css similarity index 100% rename from web/skins/classic/views/css/montage_2wide.css rename to web/skins/classic/css/classic/views/montage_2wide.css diff --git a/web/skins/classic/views/css/montage_3wide.css b/web/skins/classic/css/classic/views/montage_3wide.css similarity index 100% rename from web/skins/classic/views/css/montage_3wide.css rename to web/skins/classic/css/classic/views/montage_3wide.css diff --git a/web/skins/classic/views/css/montage_3wide50enlarge.css b/web/skins/classic/css/classic/views/montage_3wide50enlarge.css similarity index 100% rename from web/skins/classic/views/css/montage_3wide50enlarge.css rename to web/skins/classic/css/classic/views/montage_3wide50enlarge.css diff --git a/web/skins/classic/views/css/montage_4wide.css b/web/skins/classic/css/classic/views/montage_4wide.css similarity index 100% rename from web/skins/classic/views/css/montage_4wide.css rename to web/skins/classic/css/classic/views/montage_4wide.css diff --git a/web/skins/classic/views/css/montage_freeform.css b/web/skins/classic/css/classic/views/montage_freeform.css similarity index 100% rename from web/skins/classic/views/css/montage_freeform.css rename to web/skins/classic/css/classic/views/montage_freeform.css diff --git a/web/skins/classic/views/css/options.css b/web/skins/classic/css/classic/views/options.css similarity index 100% rename from web/skins/classic/views/css/options.css rename to web/skins/classic/css/classic/views/options.css diff --git a/web/skins/classic/views/css/plugin.css b/web/skins/classic/css/classic/views/plugin.css similarity index 100% rename from web/skins/classic/views/css/plugin.css rename to web/skins/classic/css/classic/views/plugin.css diff --git a/web/skins/classic/views/css/stats.css b/web/skins/classic/css/classic/views/stats.css similarity index 100% rename from web/skins/classic/views/css/stats.css rename to web/skins/classic/css/classic/views/stats.css diff --git a/web/skins/classic/views/css/timeline.css b/web/skins/classic/css/classic/views/timeline.css similarity index 100% rename from web/skins/classic/views/css/timeline.css rename to web/skins/classic/css/classic/views/timeline.css diff --git a/web/skins/classic/views/css/timeline.css.php b/web/skins/classic/css/classic/views/timeline.css.php similarity index 100% rename from web/skins/classic/views/css/timeline.css.php rename to web/skins/classic/css/classic/views/timeline.css.php diff --git a/web/skins/classic/views/css/video.css b/web/skins/classic/css/classic/views/video.css similarity index 100% rename from web/skins/classic/views/css/video.css rename to web/skins/classic/css/classic/views/video.css diff --git a/web/skins/classic/views/css/watch.css b/web/skins/classic/css/classic/views/watch.css similarity index 100% rename from web/skins/classic/views/css/watch.css rename to web/skins/classic/css/classic/views/watch.css diff --git a/web/skins/classic/views/css/zone.css b/web/skins/classic/css/classic/views/zone.css similarity index 100% rename from web/skins/classic/views/css/zone.css rename to web/skins/classic/css/classic/views/zone.css diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index 66be5c668..8b329cd88 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -20,14 +20,16 @@ function xhtmlHeaders( $file, $title ) { - $skinCssFile = getSkinFile( 'css/skin.css' ); - $skinCssPhpFile = getSkinFile( 'css/skin.css.php' ); + global $css; + $skinCssFile = getSkinFile( 'css/'.$css.'/skin.css' ); + $skinCssPhpFile = getSkinFile( 'css/'.$css.'/skin.css.php' ); + $skinJsFile = getSkinFile( 'js/skin.js' ); $skinJsPhpFile = getSkinFile( 'js/skin.js.php' ); $basename = basename( $file, '.php' ); - $viewCssFile = getSkinFile( 'views/css/'.$basename.'.css' ); - $viewCssPhpFile = getSkinFile( 'views/css/'.$basename.'.css.php' ); + $viewCssFile = getSkinFile( '/css/'.$css.'/views/'.$basename.'.css' ); + $viewCssPhpFile = getSkinFile( '/css/'.$css.'/views/'.$basename.'.css.php' ); $viewJsFile = getSkinFile( 'views/js/'.$basename.'.js' ); $viewJsPhpFile = getSkinFile( 'views/js/'.$basename.'.js.php' ); diff --git a/web/skins/classic/views/Makefile.am b/web/skins/classic/views/Makefile.am index 58c72b78f..5cd01dcc3 100644 --- a/web/skins/classic/views/Makefile.am +++ b/web/skins/classic/views/Makefile.am @@ -1,7 +1,6 @@ AUTOMAKE_OPTIONS = gnu SUBDIRS = \ - css \ js webdir = @WEB_PREFIX@/skins/classic/views diff --git a/web/skins/classic/views/options.php b/web/skins/classic/views/options.php index 34f6fc6f1..cf012ec52 100644 --- a/web/skins/classic/views/options.php +++ b/web/skins/classic/views/options.php @@ -83,11 +83,20 @@ foreach ( $tabs as $name=>$value ) window.opener.location.reload();window.location.href=\"{$_SERVER['PHP_SELF']}?view={$view}&tab={$tab}\""; + $reload = true; } + $current_css = $_COOKIE['zmCSS']; + if ( isset($_GET['css-choice']) and ( $_GET['css-choice'] != $current_css ) ) { + setcookie('zmCSS',$_GET['css-choice'], time()+3600*24*30*12*10 ); + //header("Location: index.php?view=options&tab=skins&reset_parent=1"); + $reload = true; + } + if ( $reload ) + echo ""; ?>
@@ -96,17 +105,33 @@ if($tab == 'skins') { - - - + + + + + + + + + + +
ZM_SKIN -
ZM_SKIN +
ZM_CSS +
/>