summaryrefslogtreecommitdiffstats
path: root/htdocs
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2007-08-21 10:39:01 +0200
committerTobi Oetiker <tobi@oetiker.ch>2007-08-21 10:39:01 +0200
commitc8a54c6943d42a23d54d25b18a5724fab7a6f996 (patch)
treef76f60ec956c5678009db52b36dd2b7c101041e0 /htdocs
parent4a54b26849a3edd2dcdfcfbb76310887a8bb44d0 (diff)
downloadsmokeping-c8a54c6943d42a23d54d25b18a5724fab7a6f996.tar.gz
smokeping-c8a54c6943d42a23d54d25b18a5724fab7a6f996.tar.xz
* do not select '0'
* more flexible date parsing
Diffstat (limited to 'htdocs')
-rw-r--r--htdocs/cropper/smokeping-cropper.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/htdocs/cropper/smokeping-cropper.js b/htdocs/cropper/smokeping-cropper.js
index 3419088..8129801 100644
--- a/htdocs/cropper/smokeping-cropper.js
+++ b/htdocs/cropper/smokeping-cropper.js
@@ -41,7 +41,7 @@ function ISODateToJS(rawisodate) {
return new Date();
}
else {
- var M = decode.match(/(\d\d\d\d).(\d\d).(\d\d).(\d\d).(\d\d)/)
+ var M = decode.match(/(\d\d\d\d)-(\d\d?)-(\d\d?)[+ ](\d\d?):(\d\d?)/)
var date = new Date(M[1], M[2]-1, M[3], M[4], M[5], "00")
return date;
}
@@ -77,7 +77,8 @@ function changeRRDImage(coords,dimensions){
var RRDImgUsable = 596; // 598 = 697 - 68 - 33;
var mySelectLeft = coords.x1;
var mySelectRight = coords.x2;
-
+ if (mySelectLeft == mySelectRight) return; // abort if nothing is selected.
+
myURLObj = new urlObj(document.URL);
// parse start and stop parameter from URL