Fixed some javascript issues with IE.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2223 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2007-09-19 12:34:04 +00:00
parent 5378a73ae2
commit 4c1d53ca1b
2 changed files with 11 additions and 11 deletions

View File

@ -58,10 +58,10 @@ $connkey = generateConnKey();
var url = "<?= ZM_BASE_URL.$PHP_SELF ?>"; var url = "<?= ZM_BASE_URL.$PHP_SELF ?>";
function setButtonState( element, class ) function setButtonState( element, butclass )
{ {
element.className = class; element.className = butclass;
element.disabled = (class != 'inactive'); element.disabled = (butclass != 'inactive');
} }
function secsToTime( secs ) function secsToTime( secs )
@ -102,7 +102,7 @@ function changeScale()
var scale = $('scale').getValue(); var scale = $('scale').getValue();
var baseWidth = event.Width; var baseWidth = event.Width;
var baseHeight = event.Height; var baseHeight = event.Height;
console.log( "Got new scale: "+scale ); //console.log( "Got new scale: "+scale );
var newWidth = ( baseWidth * scale ) / <?= SCALE_BASE ?>; var newWidth = ( baseWidth * scale ) / <?= SCALE_BASE ?>;
var newHeight = ( baseHeight * scale ) / <?= SCALE_BASE ?>; var newHeight = ( baseHeight * scale ) / <?= SCALE_BASE ?>;
@ -321,7 +321,7 @@ function getEvtResponse( resp_text, resp_xml )
return; return;
var resp_func = new Function( "return "+resp_text ); var resp_func = new Function( "return "+resp_text );
var resp_obj = resp_func(); var resp_obj = resp_func();
console.log( resp_obj ); //console.log( resp_obj );
event = resp_obj.event; event = resp_obj.event;
@ -368,7 +368,7 @@ function getActResponse( resp_text, resp_xml )
return; return;
var resp_func = new Function( "return "+resp_text ); var resp_func = new Function( "return "+resp_text );
var resp_obj = resp_func(); var resp_obj = resp_func();
console.log( resp_obj ); //console.log( resp_obj );
if ( resp_obj.refreshParent ) if ( resp_obj.refreshParent )
{ {
@ -380,12 +380,12 @@ function getActResponse( resp_text, resp_xml )
function actQuery( action, parms ) function actQuery( action, parms )
{ {
var actParms = "view=request&request=event&id="+event.Id+"&action="+action; var actParms = "view=request&request=event&id="+event.Id+"&action="+action;
console.log( parms ); //console.log( parms );
if ( parms != null ) if ( parms != null )
{ {
actParms += "&"+Object.toQueryString( parms ); actParms += "&"+Object.toQueryString( parms );
} }
console.log( actParms ); //console.log( actParms );
var actReq = new Ajax( url, { method: 'post', postBody: actParms, onComplete: getActResponse } ); var actReq = new Ajax( url, { method: 'post', postBody: actParms, onComplete: getActResponse } );
actReq.request(); actReq.request();
} }

View File

@ -52,10 +52,10 @@ var STATE_TAPE = <?= STATE_TAPE ?>;
var url = "<?= ZM_BASE_URL.$PHP_SELF ?>"; var url = "<?= ZM_BASE_URL.$PHP_SELF ?>";
function setButtonState( element, class ) function setButtonState( element, butclass )
{ {
element.className = class; element.className = butclass;
element.disabled = (class != 'inactive'); element.disabled = (butclass != 'inactive');
} }
var showMode = "<?= ($showControls && $control)?"control":"events" ?>"; var showMode = "<?= ($showControls && $control)?"control":"events" ?>";