]> git.wh0rd.org Git - tt-rss.git/commitdiff
filter dialog: display parsed date when checking; fix Check it button not using Dijit...
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 18 Apr 2011 09:09:59 +0000 (13:09 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 18 Apr 2011 09:09:59 +0000 (13:09 +0400)
functions.js
modules/backend-rpc.php
modules/popup-dialog.php

index ee92674eb74d7dcc8bdfe0ea416e4eb79b2693b9..2a4268e8cbb934329d544556108a3bde0ae82ba7 100644 (file)
@@ -628,7 +628,7 @@ function filterDlgCheckDate() {
                                var reply = JSON.parse(transport.responseText);
 
                                if (reply['result'] == true) {
-                                       alert(__("Date syntax appears to be correct."));
+                                       alert(__("Date syntax appears to be correct:") + " " + reply['date']);
                                        return;
                                } else {
                                        alert(__("Date syntax is incorrect."));
index 4f2ba252f1399d627767dd988b212f9a7cd28fb8..0630d88214ff8aae912d0f0c5418b18fd144b9dd 100644 (file)
                        $date = db_escape_string($_REQUEST["date"]);
                        $date_parsed = strtotime($date);
 
-                       print json_encode(array("result" => (bool)$date_parsed));
+                       print json_encode(array("result" => (bool)$date_parsed,
+                               "date" => date("c", $date_parsed)));
                        return;
                }
 
index 78962dc6c42602c82308dee18ec777cc0975e716..02459ba8498cd1376bb7edcfd2217465a2044604 100644 (file)
                                 name=\"reg_exp\" value=\"$reg_exp\"/>";
 
                        print "<span id=\"filterDlg_dateChkBox\" style=\"display : none\">";
-                       print "&nbsp;<button onclick=\"return filterDlgCheckDate()\">".
+                       print "&nbsp;<button dojoType=\"dijit.form.Button\"
+                               onclick=\"return filterDlgCheckDate()\">".
                                __('Check it')."</button>";
                        print "</span>";