From c8a54c6943d42a23d54d25b18a5724fab7a6f996 Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Tue, 21 Aug 2007 08:39:01 +0000 Subject: * do not select '0' * more flexible date parsing --- htdocs/cropper/smokeping-cropper.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'htdocs') 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 -- cgit v1.2.3-24-g4f1b