Fixed paths to montage css files and store layout as cookie
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2535 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
0c91ea7d50
commit
f5c2733fb1
|
@ -16,8 +16,6 @@ function Monitor( index, id, connKey )
|
||||||
|
|
||||||
this.getStreamCmdResponse = function( respText )
|
this.getStreamCmdResponse = function( respText )
|
||||||
{
|
{
|
||||||
//console.log( "Response" );
|
|
||||||
//console.log( this );
|
|
||||||
if ( this.streamCmdTimer )
|
if ( this.streamCmdTimer )
|
||||||
this.streamCmdTimer = $clear( this.streamCmdTimer );
|
this.streamCmdTimer = $clear( this.streamCmdTimer );
|
||||||
|
|
||||||
|
@ -78,8 +76,6 @@ function Monitor( index, id, connKey )
|
||||||
|
|
||||||
this.streamCmdQuery = function()
|
this.streamCmdQuery = function()
|
||||||
{
|
{
|
||||||
//console.log( "Query" );
|
|
||||||
//console.log( this );
|
|
||||||
//this.streamCmdReq.cancel();
|
//this.streamCmdReq.cancel();
|
||||||
this.streamCmdReq.request( this.streamCmdParms+"&command="+CMD_QUERY );
|
this.streamCmdReq.request( this.streamCmdParms+"&command="+CMD_QUERY );
|
||||||
}
|
}
|
||||||
|
@ -90,14 +86,11 @@ function Monitor( index, id, connKey )
|
||||||
|
|
||||||
function selectLayout( element )
|
function selectLayout( element )
|
||||||
{
|
{
|
||||||
var cssFile = $(element).getValue();
|
var cssFile = skinPath+'/views/css/'+$(element).getValue();
|
||||||
console.log( cssFile );
|
|
||||||
if ( $('dynamicStyles') )
|
if ( $('dynamicStyles') )
|
||||||
{
|
|
||||||
$('dynamicStyles').remove();
|
$('dynamicStyles').remove();
|
||||||
}
|
|
||||||
new Asset.css( cssFile, { id: 'dynamicStyles' } );
|
new Asset.css( cssFile, { id: 'dynamicStyles' } );
|
||||||
console.log( $('dynamicStyles') );
|
Cookie.set( 'zmMontageLayout', $(element).getValue(), { duration: 10*365 } );
|
||||||
}
|
}
|
||||||
|
|
||||||
var monitors = new Array();
|
var monitors = new Array();
|
||||||
|
@ -106,9 +99,7 @@ function initPage()
|
||||||
for ( var i = 0; i < monitorData.length; i++ )
|
for ( var i = 0; i < monitorData.length; i++ )
|
||||||
{
|
{
|
||||||
monitors[i] = new Monitor( i, monitorData[i].id, monitorData[i].connKey );
|
monitors[i] = new Monitor( i, monitorData[i].id, monitorData[i].connKey );
|
||||||
//console.log( monitors[i] );
|
|
||||||
var delay = Math.round( Math.random()*statusRefreshTimeout );
|
var delay = Math.round( Math.random()*statusRefreshTimeout );
|
||||||
console.log( "Delay: "+delay );
|
|
||||||
monitors[i].start( delay );
|
monitors[i].start( delay );
|
||||||
}
|
}
|
||||||
selectLayout( $('layout') );
|
selectLayout( $('layout') );
|
||||||
|
|
|
@ -61,12 +61,16 @@ foreach( dbFetchAll( $sql ) as $row )
|
||||||
$focusWindow = true;
|
$focusWindow = true;
|
||||||
|
|
||||||
$layouts = array(
|
$layouts = array(
|
||||||
'zm_html_view_montage_freeform.css' => 'Default',
|
'montage_freeform.css' => 'Default',
|
||||||
'zm_html_view_montage_2wide.css' => '2-wide grid',
|
'montage_2wide.css' => '2-wide grid',
|
||||||
'zm_html_view_montage_3wide.css' => '3-wide grid',
|
'montage_3wide.css' => '3-wide grid',
|
||||||
'zm_html_view_montage_4wide.css' => '4-wide grid',
|
'montage_4wide.css' => '4-wide grid',
|
||||||
'zm_html_view_montage_3wide50enlarge.css' => '3-wide grid, scaled, enlarge on alarm',
|
'montage_3wide50enlarge.css' => '3-wide grid, scaled, enlarge on alarm',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ( isset($_COOKIE['zmMontageLayout']) )
|
||||||
|
$layout = $_COOKIE['zmMontageLayout'];
|
||||||
|
|
||||||
xhtmlHeaders(__FILE__, $SLANG['Montage'] );
|
xhtmlHeaders(__FILE__, $SLANG['Montage'] );
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
|
|
Loading…
Reference in New Issue