diff --git a/web/skins/classic/views/js/montage.js b/web/skins/classic/views/js/montage.js index 8d1b6795b..38b82ecbe 100644 --- a/web/skins/classic/views/js/montage.js +++ b/web/skins/classic/views/js/montage.js @@ -16,8 +16,6 @@ function Monitor( index, id, connKey ) this.getStreamCmdResponse = function( respText ) { - //console.log( "Response" ); - //console.log( this ); if ( this.streamCmdTimer ) this.streamCmdTimer = $clear( this.streamCmdTimer ); @@ -78,8 +76,6 @@ function Monitor( index, id, connKey ) this.streamCmdQuery = function() { - //console.log( "Query" ); - //console.log( this ); //this.streamCmdReq.cancel(); this.streamCmdReq.request( this.streamCmdParms+"&command="+CMD_QUERY ); } @@ -90,14 +86,11 @@ function Monitor( index, id, connKey ) function selectLayout( element ) { - var cssFile = $(element).getValue(); - console.log( cssFile ); + var cssFile = skinPath+'/views/css/'+$(element).getValue(); if ( $('dynamicStyles') ) - { $('dynamicStyles').remove(); - } new Asset.css( cssFile, { id: 'dynamicStyles' } ); - console.log( $('dynamicStyles') ); + Cookie.set( 'zmMontageLayout', $(element).getValue(), { duration: 10*365 } ); } var monitors = new Array(); @@ -106,9 +99,7 @@ function initPage() for ( var i = 0; i < monitorData.length; i++ ) { monitors[i] = new Monitor( i, monitorData[i].id, monitorData[i].connKey ); - //console.log( monitors[i] ); var delay = Math.round( Math.random()*statusRefreshTimeout ); - console.log( "Delay: "+delay ); monitors[i].start( delay ); } selectLayout( $('layout') ); diff --git a/web/skins/classic/views/montage.php b/web/skins/classic/views/montage.php index e17c52b20..3406a0240 100644 --- a/web/skins/classic/views/montage.php +++ b/web/skins/classic/views/montage.php @@ -61,12 +61,16 @@ foreach( dbFetchAll( $sql ) as $row ) $focusWindow = true; $layouts = array( - 'zm_html_view_montage_freeform.css' => 'Default', - 'zm_html_view_montage_2wide.css' => '2-wide grid', - 'zm_html_view_montage_3wide.css' => '3-wide grid', - 'zm_html_view_montage_4wide.css' => '4-wide grid', - 'zm_html_view_montage_3wide50enlarge.css' => '3-wide grid, scaled, enlarge on alarm', + 'montage_freeform.css' => 'Default', + 'montage_2wide.css' => '2-wide grid', + 'montage_3wide.css' => '3-wide grid', + 'montage_4wide.css' => '4-wide grid', + 'montage_3wide50enlarge.css' => '3-wide grid, scaled, enlarge on alarm', ); + +if ( isset($_COOKIE['zmMontageLayout']) ) + $layout = $_COOKIE['zmMontageLayout']; + xhtmlHeaders(__FILE__, $SLANG['Montage'] ); ?>