summaryrefslogtreecommitdiffstats
path: root/frontends/php/js
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-03-19 17:56:41 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-03-19 17:56:41 +0000
commit58aee2faa7ab32edcedaf68d346593de9ddb3cb6 (patch)
tree703f8e4d30b297df78d6123e4186045d4020c32f /frontends/php/js
parent8777958dc979627061016a85ad846507edf395e6 (diff)
downloadzabbix-58aee2faa7ab32edcedaf68d346593de9ddb3cb6.tar.gz
zabbix-58aee2faa7ab32edcedaf68d346593de9ddb3cb6.tar.xz
zabbix-58aee2faa7ab32edcedaf68d346593de9ddb3cb6.zip
- [DEV-139] added transaction functionality to frontend (Artem)
- many small fixes (Artem) git-svn-id: svn://svn.zabbix.com/trunk@5505 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/js')
-rw-r--r--frontends/php/js/calendar.js7
-rw-r--r--frontends/php/js/common.js33
-rw-r--r--frontends/php/js/dashboard.js30
3 files changed, 36 insertions, 34 deletions
diff --git a/frontends/php/js/calendar.js b/frontends/php/js/calendar.js
index 16a320fd..ab1fa0ec 100644
--- a/frontends/php/js/calendar.js
+++ b/frontends/php/js/calendar.js
@@ -569,11 +569,12 @@ createDaysTab: function(){
\*-------------------------------------------------------------------------------------------------*/
calendarcreate: function(){
this.clndr_calendar = document.createElement('div');
- document.body.appendChild(this.clndr_calendar);
-
+
Element.extend(this.clndr_calendar);
this.clndr_calendar.className = 'calendar';
- this.clndr_calendar.setStyle({display: 'none'});
+ this.clndr_calendar.hide();
+
+ document.body.appendChild(this.clndr_calendar);
addListener(this.clndr_calendar,'mousemove', deselectAll);
diff --git a/frontends/php/js/common.js b/frontends/php/js/common.js
index 9d7d859c..bfc8716f 100644
--- a/frontends/php/js/common.js
+++ b/frontends/php/js/common.js
@@ -408,6 +408,38 @@ function deselectAll(){
/************************************************************************************/
/* Pages stuff */
/************************************************************************************/
+function change_hat_state(icon, divid){
+ if((typeof(icon) == 'undefined') || (typeof(divid) == 'undefined')) throw "Function [change_hat_state()] awaits exactly 2 arguments.";
+
+ if(typeof(Ajax) == 'undefined'){
+ throw("Prototype.js lib is required!");
+ return false;
+ }
+
+ deselectAll();
+ var hat_state = ShowHide(divid);
+ switchElementsClass(icon,"arrowup","arrowdown");
+
+ if(false === hat_state) return false;
+
+ var params = {
+ 'favobj': 'hat',
+ 'favid': divid,
+ 'state': hat_state
+ }
+
+ var uri = new url(location.href);
+ new Ajax.Request(uri.getPath()+"?output=ajax",
+ {
+ 'method': 'post',
+ 'parameters':params,
+ 'onSuccess': function(resp){ },//alert(resp.responseText);
+ 'onFailure': function(){ document.location = uri.getPath()+'?'+Object.toQueryString(params); }
+ }
+ );
+
+}
+
function change_filter_state(icon, divid){
if((typeof(icon) == 'undefined') || (typeof(divid) == 'undefined')) throw "Function [change_filter_state()] awaits exactly 2 arguments.";
@@ -429,7 +461,6 @@ function change_filter_state(icon, divid){
}
var uri = new url(location.href);
-
new Ajax.Request(uri.getPath()+"?output=ajax",
{
'method': 'post',
diff --git a/frontends/php/js/dashboard.js b/frontends/php/js/dashboard.js
index 424e0ed3..7aa5bc81 100644
--- a/frontends/php/js/dashboard.js
+++ b/frontends/php/js/dashboard.js
@@ -22,36 +22,6 @@ function setRefreshRate(id,interval){
}
-function change_hat_state(icon, divid){
- if((typeof(icon) == 'undefined') || (typeof(divid) == 'undefined')) throw "Function [change_hat_state()] awaits exactly 2 arguments.";
-
- if(typeof(Ajax) == 'undefined'){
- throw("Prototype.js lib is required!");
- return false;
- }
-
- deselectAll();
- var hat_state = ShowHide(divid);
- switchElementsClass(icon,"arrowup","arrowdown");
-
- if(false === hat_state) return false;
-
- var params = {
- 'favobj': 'hat',
- 'favid': divid,
- 'state': hat_state
- }
-
- new Ajax.Request("dashboard.php?output=ajax",
- {
- 'method': 'post',
- 'parameters': params,
- 'onSuccess': function(resp){ },//alert(resp.responseText);
- 'onFailure': function(){ document.location = 'dashboard.php?'+Object.toQueryString(params);}
- }
- );
-}
-
function create_menu(e,id){
if (!e) var e = window.event;
id='menu_'+id;