remove popup code form skin.js
parent
e5e1455f7a
commit
49fec5142c
|
@ -21,7 +21,6 @@
|
|||
// This file should only contain static JavaScript and no php.
|
||||
// Use skin.js.php for JavaScript that need pre-processing
|
||||
//
|
||||
var popupOptions = "resizable,scrollbars,status=no,toolbar=yes";
|
||||
|
||||
// Globally define the icons used in the bootstrap-table top-right toolbar
|
||||
var icons = {
|
||||
|
@ -59,70 +58,6 @@ function checkSize() {
|
|||
}
|
||||
}
|
||||
|
||||
// Deprecated
|
||||
function newWindow( url, name, width, height ) {
|
||||
window.open( url, name, popupOptions+",width="+width+",height="+height );
|
||||
}
|
||||
|
||||
function getPopupSize( tag, width, height ) {
|
||||
if ( typeof popupSizes == 'undefined' ) {
|
||||
Error("Can't find any window sizes");
|
||||
return {'width': 0, 'height': 0};
|
||||
}
|
||||
var popupSize = Object.clone(popupSizes[tag]);
|
||||
if ( !popupSize ) {
|
||||
Error("Can't find window size for tag '"+tag+"'");
|
||||
return {'width': 0, 'height': 0};
|
||||
}
|
||||
if ( popupSize.width && popupSize.height ) {
|
||||
if ( width || height ) {
|
||||
Warning("Ignoring passed dimensions "+width+"x"+height+" when getting popup size for tag '"+tag+"'");
|
||||
}
|
||||
return popupSize;
|
||||
}
|
||||
if ( popupSize.addWidth ) {
|
||||
popupSize.width = popupSize.addWidth;
|
||||
if ( !width ) {
|
||||
Error("Got addWidth but no passed width when getting popup size for tag '"+tag+"'");
|
||||
} else {
|
||||
popupSize.width += parseInt(width);
|
||||
}
|
||||
} else if ( width ) {
|
||||
popupSize.width = width;
|
||||
Error("Got passed width but no addWidth when getting popup size for tag '"+tag+"'");
|
||||
}
|
||||
if ( popupSize.minWidth && popupSize.width < popupSize.minWidth ) {
|
||||
Warning("Adjusting to minimum width when getting popup size for tag '"+tag+"'");
|
||||
popupSize.width = popupSize.minWidth;
|
||||
}
|
||||
if ( popupSize.addHeight ) {
|
||||
popupSize.height = popupSize.addHeight;
|
||||
if ( !height ) {
|
||||
Error("Got addHeight but no passed height when getting popup size for tag '"+tag+"'");
|
||||
} else {
|
||||
popupSize.height += parseInt(height);
|
||||
}
|
||||
} else if ( height ) {
|
||||
popupSize.height = height;
|
||||
Error("Got passed height but no addHeight when getting popup size for tag '"+tag+"'");
|
||||
}
|
||||
if ( popupSize.minHeight && ( popupSize.height < popupSize.minHeight ) ) {
|
||||
Warning("Adjusting to minimum height ("+popupSize.minHeight+") when getting popup size for tag '"+tag+"' because calculated height is " + popupSize.height);
|
||||
popupSize.height = popupSize.minHeight;
|
||||
}
|
||||
return popupSize;
|
||||
}
|
||||
|
||||
function zmWindow(sub_url) {
|
||||
var zmWin = window.open( 'https://www.zoneminder.com'+(sub_url?sub_url:''), 'ZoneMinder' );
|
||||
if ( ! zmWin ) {
|
||||
// if popup blocking is enabled, the popup won't be defined.
|
||||
console.log("Please disable popup blocking.");
|
||||
} else {
|
||||
zmWin.focus();
|
||||
}
|
||||
}
|
||||
|
||||
// Polyfill for NodeList.prototype.forEach on IE.
|
||||
if (window.NodeList && !NodeList.prototype.forEach) {
|
||||
NodeList.prototype.forEach = Array.prototype.forEach;
|
||||
|
@ -515,17 +450,6 @@ function confirmDelete( message ) {
|
|||
return ( confirm( message?message:'Are you sure you wish to delete?' ) );
|
||||
}
|
||||
|
||||
if ( refreshParent ) {
|
||||
refreshParentWindow();
|
||||
}
|
||||
|
||||
if ( focusWindow ) {
|
||||
windowToFront();
|
||||
}
|
||||
if ( closePopup ) {
|
||||
closeWindow();
|
||||
}
|
||||
|
||||
window.addEventListener( 'DOMContentLoaded', checkSize );
|
||||
|
||||
function convertLabelFormat(LabelFormat, monitorName) {
|
||||
|
|
Loading…
Reference in New Issue