/usr/share/zabbix/js/dom.js is in zabbix-frontend-php 1:1.8.11-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | // JavaScript Document
// DOM Classes
// Author: Aly
var CNode = Class.create({
node: null, // main node (ul)
initialize: function(nodeName){
this.node = document.createElement(nodeName);
return this.node;
},
addItem: function(item){
if(is_object(item)) this.node.appendChild(item);
else if(is_string(item)) this.node.appendChild(documect.createTextNode(item));
else return true;
},
setClass: function(className){
className = className || '';
this.node.className = className;
}
});
var CList = Class.create(CNode,{
items: new Array(), // items list
initialize: function($super, className){
className = className || '';
$super('ul');
this.setClass(this.classNames);
Object.extend(this.node, this);
},
addItem: function($super, item, className){
className = className || '';
if(!is_object(item, CListItem)){
item = new CListItem(item, className).node;
}
$super(item);
this.items.push(item);
}
});
var CListItem = Class.create(CNode,{
items: new Array(), // items list
initialize: function($super, item, className){
className = className || '';
item = item || null;
$super('li');
this.setClass(className);
this.addItem(item);
},
addItem: function($super, item){
$super(item);
this.items.push(item);
}
});
|