use JS instead of Mootools to detect IE browser
This commit is contained in:
parent
fe8561d868
commit
a6964f66e2
|
@ -152,7 +152,7 @@ function setAlarmState( currentAlarmState ) {
|
|||
table.bootstrapTable('refresh');
|
||||
if ( SOUND_ON_ALARM ) {
|
||||
// Enable the alarm sound
|
||||
if ( !canPlayPauseAudio ) {
|
||||
if ( !msieVer ) {
|
||||
$j('#alarmSound').removeClass('hidden');
|
||||
} else {
|
||||
$j('#MediaPlayer').trigger('play');
|
||||
|
@ -166,7 +166,7 @@ function setAlarmState( currentAlarmState ) {
|
|||
table.bootstrapTable('refresh');
|
||||
if ( SOUND_ON_ALARM ) {
|
||||
// Disable alarm sound
|
||||
if ( !canPlayPauseAudio ) {
|
||||
if ( !msieVer ) {
|
||||
$j('#alarmSound').addClass('hidden');
|
||||
} else {
|
||||
$j('#MediaPlayer').trigger('pause');
|
||||
|
@ -822,6 +822,17 @@ function manageDelConfirmModalBtns() {
|
|||
});
|
||||
}
|
||||
|
||||
function msieVer() {
|
||||
var ua = window.navigator.userAgent;
|
||||
var msie = ua.indexOf("MSIE ");
|
||||
|
||||
if (msie >= 0) { // If Internet Explorer, return version number
|
||||
return msie;
|
||||
} else { // If another browser, return 0
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
function initPage() {
|
||||
if ( canView.Control ) {
|
||||
// Load the PTZ Preset modal into the DOM
|
||||
|
|
|
@ -75,8 +75,6 @@ var imageRefreshTimeout = <?php echo 1000*ZM_WEB_REFRESH_IMAGE ?>;
|
|||
|
||||
var canStreamNative = <?php echo canStreamNative()?'true':'false' ?>;
|
||||
|
||||
var canPlayPauseAudio = Browser.ie;
|
||||
|
||||
<?php
|
||||
$control = $monitor->Control();
|
||||
if ( $control->CanMoveMap() ) { ?>
|
||||
|
|
|
@ -130,8 +130,6 @@ var imageRefreshTimeout = <?php echo 1000*ZM_WEB_REFRESH_IMAGE ?>;
|
|||
|
||||
var canStreamNative = <?php echo canStreamNative()?'true':'false' ?>;
|
||||
|
||||
var canPlayPauseAudio = Browser.ie;
|
||||
|
||||
var refreshApplet = <?php echo (canStreamApplet() && $streamMode == "jpeg")?'true':'false' ?>;
|
||||
var appletRefreshTime = <?php echo ZM_RELOAD_CAMBOZOLA ?>;
|
||||
|
||||
|
|
Loading…
Reference in New Issue