Merge pull request #282 from scottgrobinson/master

Add zmMontageScale so montage scale is also 'saved'
This commit is contained in:
Isaac Connor 2014-01-02 11:18:39 -08:00
commit b3af313370
3 changed files with 6 additions and 1 deletions

View File

@ -1 +1,2 @@
INSERT INTO Monitors (Name, Type, Function, Enabled, Format, Protocol, Method, Host, Port, Path, Width, Height, Colours, Palette, Orientation, Deinterlacing, Brightness, Contrast, Hue, Colour, RefBlendPerc) VALUES ('travis_test','Remote','Modect',1,255,'http','simple','50.79.143.149','21146','/mjpg/video.mjpg',1280,800,3,0,'0',0,-1,-1,-1,-1,12);
INSERT INTO Monitors (Name, Type, Function, Enabled, Format, Protocol, Method, Host, Port, Path, Width, Height, Colours, Palette, Orientation, Deinterlacing, Brightness, Contrast, Hue, Colour, RefBlendPerc) VALUES ('travis_test1','Remote','Modect',1,255,'http','simple','50.79.143.149','21146','/mjpg/video.mjpg',1280,800,3,0,'0',0,-1,-1,-1,-1,12);
INSERT INTO Monitors (Name, Type, Function, Enabled, Format, Protocol, Method, Host, Port, Path, Width, Height, Colours, Palette, Orientation, Deinterlacing, Brightness, Contrast, Hue, Colour, RefBlendPerc) VALUES ('travis_test2','Remote','Modect',1,255,'http','simple','50.79.143.149','21146','/mjpg/video.mjpg',1280,800,3,0,'0',0,-1,-1,-1,-1,12);

View File

@ -134,6 +134,7 @@ function changeScale()
streamImg.style.width = newWidth + "px";
streamImg.style.height = newHeight + "px";
}
Cookie.write( 'zmMontageScale', scale, { duration: 10*365 } );
}
var monitors = new Array();

View File

@ -44,8 +44,11 @@ foreach( dbFetchAll( $sql ) as $row )
{
continue;
}
if ( isset( $_REQUEST['scale'] ) )
$scale = validInt($_REQUEST['scale']);
else if ( isset( $_COOKIE['zmMontageScale'] ) )
$scale = $_COOKIE['zmMontageScale'];
else
$scale = reScale( SCALE_BASE, $row['DefaultScale'], ZM_WEB_DEFAULT_SCALE );