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');
|
table.bootstrapTable('refresh');
|
||||||
if ( SOUND_ON_ALARM ) {
|
if ( SOUND_ON_ALARM ) {
|
||||||
// Enable the alarm sound
|
// Enable the alarm sound
|
||||||
if ( !canPlayPauseAudio ) {
|
if ( !msieVer ) {
|
||||||
$j('#alarmSound').removeClass('hidden');
|
$j('#alarmSound').removeClass('hidden');
|
||||||
} else {
|
} else {
|
||||||
$j('#MediaPlayer').trigger('play');
|
$j('#MediaPlayer').trigger('play');
|
||||||
|
@ -166,7 +166,7 @@ function setAlarmState( currentAlarmState ) {
|
||||||
table.bootstrapTable('refresh');
|
table.bootstrapTable('refresh');
|
||||||
if ( SOUND_ON_ALARM ) {
|
if ( SOUND_ON_ALARM ) {
|
||||||
// Disable alarm sound
|
// Disable alarm sound
|
||||||
if ( !canPlayPauseAudio ) {
|
if ( !msieVer ) {
|
||||||
$j('#alarmSound').addClass('hidden');
|
$j('#alarmSound').addClass('hidden');
|
||||||
} else {
|
} else {
|
||||||
$j('#MediaPlayer').trigger('pause');
|
$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() {
|
function initPage() {
|
||||||
if ( canView.Control ) {
|
if ( canView.Control ) {
|
||||||
// Load the PTZ Preset modal into the DOM
|
// 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 canStreamNative = <?php echo canStreamNative()?'true':'false' ?>;
|
||||||
|
|
||||||
var canPlayPauseAudio = Browser.ie;
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$control = $monitor->Control();
|
$control = $monitor->Control();
|
||||||
if ( $control->CanMoveMap() ) { ?>
|
if ( $control->CanMoveMap() ) { ?>
|
||||||
|
|
|
@ -130,8 +130,6 @@ var imageRefreshTimeout = <?php echo 1000*ZM_WEB_REFRESH_IMAGE ?>;
|
||||||
|
|
||||||
var canStreamNative = <?php echo canStreamNative()?'true':'false' ?>;
|
var canStreamNative = <?php echo canStreamNative()?'true':'false' ?>;
|
||||||
|
|
||||||
var canPlayPauseAudio = Browser.ie;
|
|
||||||
|
|
||||||
var refreshApplet = <?php echo (canStreamApplet() && $streamMode == "jpeg")?'true':'false' ?>;
|
var refreshApplet = <?php echo (canStreamApplet() && $streamMode == "jpeg")?'true':'false' ?>;
|
||||||
var appletRefreshTime = <?php echo ZM_RELOAD_CAMBOZOLA ?>;
|
var appletRefreshTime = <?php echo ZM_RELOAD_CAMBOZOLA ?>;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue