Source
style: 'position: absolute; z-index: 1; background: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7") 0 0 repeat',
/*
** Zabbix
** Copyright (C) 2001-2022 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** 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 General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
ZABBIX.namespace('classes.Observer');
ZABBIX.classes.Observer = (function() {
var Observer = function() {
this.listeners = {};
};
Observer.prototype = {
constructor: ZABBIX.classes.Observer,
bind: function(event, callback) {
var i;
if (typeof callback === 'function') {
event = ('' + event).toLowerCase().split(/\s+/);
for (i = 0; i < event.length; i++) {
if (this.listeners[event[i]] === void(0)) {
this.listeners[event[i]] = [];
}
this.listeners[event[i]].push(callback);
}
}
return this;
},
trigger: function(event, target) {
event = event.toLowerCase();
var handlers = this.listeners[event] || [],
i;
if (handlers.length) {
event = jQuery.Event(event);
for (i = 0; i < handlers.length; i++) {
try {
if (handlers[i](event, target) === false || event.isDefaultPrevented()) {
break;
}
}
catch(ex) {
window.console && window.console.log && window.console.log(ex);
}
}
}
return this;
}
};
Observer.makeObserver = function(object) {
var i;
for (i in Observer.prototype) {
if (Observer.prototype.hasOwnProperty(i) && typeof Observer.prototype[i] === 'function') {
object[i] = Observer.prototype[i];
}
}
object.listeners = {};
};
return Observer;
}());
ZABBIX.namespace('apps.map');
ZABBIX.apps.map = (function($) {