Source
* @param {object}|{string} form_name Form element in which input elements will be selected. If given value is 'null',
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
/**
* jQuery based publish/subscribe handler.
*
* - $.subscribe(event_name, callback)
* - $.unsubscribe(event_name, callback)
* - $.publish(event_name, data_object)
*
*/
(function($) {
var pubsub = $({});
$.subscribe = function() {
pubsub.on.apply(pubsub, arguments);
};
$.unsubscribe = function() {
pubsub.off.apply(pubsub, arguments);
};
$.publish = function() {
pubsub.trigger.apply(pubsub, arguments);
};
}(jQuery));
var overlays_stack = new OverlayCollection();
function isset(key, obj) {
return (is_null(key) || is_null(obj)) ? false : (typeof(obj[key]) != 'undefined');
}
/**
* @deprecated use strict comparison instead
*
* @param obj
* @returns {*}
*/
function empty(obj) {
if (is_null(obj)) {
return true;
}
if (obj === false) {
return true;
}
if (is_string(obj) && obj === '') {
return true;
}
if (typeof(obj) == 'undefined') {
return true;