summaryrefslogtreecommitdiffstats
path: root/frontends/php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-03-17 15:17:26 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-03-17 15:17:26 +0000
commit7d37d9aa713e41540f2646d176f36ea755029263 (patch)
treeaa7d898607171866d74a7af1195067b9bbae8cb4 /frontends/php
parent1a33200e10b84a64cf9234ca02b56f0a3259e186 (diff)
downloadzabbix-7d37d9aa713e41540f2646d176f36ea755029263.tar.gz
zabbix-7d37d9aa713e41540f2646d176f36ea755029263.tar.xz
zabbix-7d37d9aa713e41540f2646d176f36ea755029263.zip
- small fixes to JS code (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5499 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
-rw-r--r--frontends/php/discoveryconf.php6
-rw-r--r--frontends/php/events.php2
-rw-r--r--frontends/php/include/maps.inc.php15
-rw-r--r--frontends/php/js/sbinit.js5
-rw-r--r--frontends/php/js/sbox.js3
-rw-r--r--frontends/php/js/url.js3
-rw-r--r--frontends/php/styles/bar.css7
-rw-r--r--frontends/php/styles/default.css7
8 files changed, 28 insertions, 20 deletions
diff --git a/frontends/php/discoveryconf.php b/frontends/php/discoveryconf.php
index 1a0af586..fc3c6d42 100644
--- a/frontends/php/discoveryconf.php
+++ b/frontends/php/discoveryconf.php
@@ -216,13 +216,11 @@ include_once "include/page_header.php";
' WHERE '.DBin_node('druleid').
order_by('d.name,d.iprange,d.delay','d.druleid'));
- while($rule_data = DBfetch($db_rules))
- {
+ while($rule_data = DBfetch($db_rules)){
$cheks = array();
$db_checks = DBselect("select * from dchecks where druleid=".$rule_data["druleid"].
" order by type,druleid");
- while($check_data = DBfetch($db_checks))
- {
+ while($check_data = DBfetch($db_checks)){
$cheks[] = discovery_check_type2str($check_data['type']);
}
diff --git a/frontends/php/events.php b/frontends/php/events.php
index 06dd11c9..927e10df 100644
--- a/frontends/php/events.php
+++ b/frontends/php/events.php
@@ -461,7 +461,7 @@ include_once "include/page_header.php";
$filterForm->AddVar('filter_timesince',($_REQUEST['filter_timesince']>0)?$_REQUEST['filter_timesince']:'');
$filterForm->AddVar('filter_timetill',($_REQUEST['filter_timetill']>0)?$_REQUEST['filter_timetill']:'');
//*
- $clndr_icon = new CImg('images/general/bar/cal.gif','calendar', 16, 12, null);
+ $clndr_icon = new CImg('images/general/bar/cal.gif','calendar', 16, 12, 'pointer');
$clndr_icon->AddAction('onclick',"javascript: var pos = getPosition(this); pos.top+=10; pos.left+=16; CLNDR['events_since'].clndr.clndrshow(pos.top,pos.left);");
$filtertimetab = new CTable();
diff --git a/frontends/php/include/maps.inc.php b/frontends/php/include/maps.inc.php
index 8b57a225..4c65dfa2 100644
--- a/frontends/php/include/maps.inc.php
+++ b/frontends/php/include/maps.inc.php
@@ -105,18 +105,19 @@
break;
case SYSMAP_ELEMENT_TYPE_TRIGGER:
if( DBfetch(DBselect('select triggerid from triggers where triggerid='.$se_data['elementid'])) &&
- !DBfetch(DBselect("select distinct t.*".
- " from triggers t,items i,functions f".
- " where f.itemid=i.itemid and t.triggerid=f.triggerid".
- " and i.hostid not in (".$denyed_hosts.") and t.triggerid=".$se_data['elementid'])))
+ !DBfetch(DBselect('SELECT DISTINCT t.*'.
+ ' FROM triggers t,items i,functions f'.
+ ' WHERE f.itemid=i.itemid '.
+ ' AND t.triggerid=f.triggerid'.
+ ' AND i.hostid NOT IN ('.$denyed_hosts.') '.
+ ' AND t.triggerid='.$se_data['elementid'])))
{
$result = false;
}
break;
case SYSMAP_ELEMENT_TYPE_HOST_GROUP:
- if( DBfetch(DBselect('select groupid from groups where groupid='.$se_data['elementid'])) &&
- uint_in_array($se_data['elementid'],
- get_accessible_groups_by_user($USER_DETAILS,PERM_READ_ONLY, PERM_MODE_LT, PERM_RES_IDS_ARRAY)))
+ if( DBfetch(DBselect('SELECT groupid FROM groups WHERE groupid='.$se_data['elementid'])) &&
+ uint_in_array($se_data['elementid'],get_accessible_groups_by_user($USER_DETAILS,PERM_READ_ONLY, PERM_MODE_LT, PERM_RES_IDS_ARRAY)))
{
$result = false;
}
diff --git a/frontends/php/js/sbinit.js b/frontends/php/js/sbinit.js
index 3231978a..52782342 100644
--- a/frontends/php/js/sbinit.js
+++ b/frontends/php/js/sbinit.js
@@ -87,7 +87,10 @@ function showgraphmenu(obj_id){
date = datetoarray(G_MENU.bstime+SCROLL_BAR.period);
SCROLL_BAR.tabinforight.innerHTML = date[0]+'.'+date[1]+'.'+date[2]+' '+date[3]+':'+date[4]+':'+date[5];
-
+ if(IE){
+ try{$('scroll_calendar').setStyle({'border' : '0px white solid;'});}
+ catch(e){}
+ }
scrl.style.visibility = 'visible';
}
diff --git a/frontends/php/js/sbox.js b/frontends/php/js/sbox.js
index 93d1013c..48094df6 100644
--- a/frontends/php/js/sbox.js
+++ b/frontends/php/js/sbox.js
@@ -47,7 +47,7 @@ mouse_event: '', // json object wheres defined needed event params
start_event: '', // copy of mouse_event when box created
stime: '', // new start time
-period: '', // new period
+period: 0, // new period
obj: '', // objects params
dom_obj: '', // selection div html obj
@@ -69,6 +69,7 @@ initialize: function(stime, period){
this.obj.stime = stime;
this.obj.period = period;
+ this.box.width = 0;
this.mouse_event.mousedown = false;
},
diff --git a/frontends/php/js/url.js b/frontends/php/js/url.js
index c50f178a..a65ca127 100644
--- a/frontends/php/js/url.js
+++ b/frontends/php/js/url.js
@@ -150,7 +150,8 @@ setArgument: function(key,value){
var valueisset = false;
if(typeof(key) == 'undefined') throw 'Invalid argument past for setArgument';
- value = value || '';
+
+ value =('undefined' != value)?value:'';
for(i=0; i < this.arguments.length; i++){
if(this.arguments[i][0] == key){
diff --git a/frontends/php/styles/bar.css b/frontends/php/styles/bar.css
index 925cff07..9a454b9c 100644
--- a/frontends/php/styles/bar.css
+++ b/frontends/php/styles/bar.css
@@ -51,16 +51,13 @@ div#scroll{
}
img#scroll_calendar{
- position:absolute;
+ position: absolute;
top: -12px;
- left: 0px;
+ left: 0px;
}
img#scroll_calendar:hover{
cursor: pointer;
- position:absolute;
- top: -12px;
- left: 0px;
}
div#scrolltableft{
diff --git a/frontends/php/styles/default.css b/frontends/php/styles/default.css
index a12556e9..22a33433 100644
--- a/frontends/php/styles/default.css
+++ b/frontends/php/styles/default.css
@@ -108,6 +108,13 @@ img.borderless { border-width: 0px; vertical-align: bottom; }
color: #000000;
}
+.pointer{
+}
+.pointer:hover{
+ cursor: pointer;
+}
+
+
/**************** HINT BOX *****************/
#hint_box {