diff options
author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-06-13 16:01:57 +0000 |
---|---|---|
committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-06-13 16:01:57 +0000 |
commit | 6bd4c47f147f4ad1f48303abc09607ce1b457c4b (patch) | |
tree | 232ae7560553a68b91e4e96931e6a447b820de59 /frontends/php | |
parent | 2510ab031be9e95d70d3e83533b49ccc735139e6 (diff) | |
download | zabbix-6bd4c47f147f4ad1f48303abc09607ce1b457c4b.tar.gz zabbix-6bd4c47f147f4ad1f48303abc09607ce1b457c4b.tar.xz zabbix-6bd4c47f147f4ad1f48303abc09607ce1b457c4b.zip |
- [DEV-137] fixed js calendar (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5767 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
-rw-r--r-- | frontends/php/include/js.inc.php | 6 | ||||
-rw-r--r-- | frontends/php/js/calendar.js | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/frontends/php/include/js.inc.php b/frontends/php/include/js.inc.php index 559c6e64..d0741e3a 100644 --- a/frontends/php/include/js.inc.php +++ b/frontends/php/include/js.inc.php @@ -187,7 +187,7 @@ function simple_js_redirect($url,$timeout=null){ echo '</script>'; } -function play_sound($filename){ +function play_sound($filename){ echo '<script language="javascript" type="text/javascript"> @@ -202,7 +202,7 @@ function play_sound($filename){ } -function SetFocus($frm_name, $fld_name){ +function SetFocus($frm_name, $fld_name){ echo '<script language="javascript" type="text/javascript"> <!-- document.forms["'.$frm_name.'"].elements["'.$fld_name.'"].focus(); @@ -210,7 +210,7 @@ function SetFocus($frm_name, $fld_name){ </script>'; } -function Alert($msg){ +function Alert($msg){ echo '<script language="javascript" type="text/javascript"> <!-- alert("'.$msg.'"); diff --git a/frontends/php/js/calendar.js b/frontends/php/js/calendar.js index ab1fa0ec..d47e4d1d 100644 --- a/frontends/php/js/calendar.js +++ b/frontends/php/js/calendar.js @@ -525,7 +525,11 @@ createDaysTab: function(){ table.appendChild(tbody); var cur_month = this.cdt.getMonth(); - var prev_days = this.cdt.getDay(); + +// make 0 - monday, not sunday(as default) + var prev_days = this.cdt.getDay() - 1; + if(prev_days < 0) prev_days = 6; + if(prev_days > 0){ this.cdt.setTime(this.cdt.getTime() - (prev_days*86400000)); } |