filter dialog: display parsed date when checking; fix Check it button not using Dijit control

master
Andrew Dolgov 14 years ago
parent 361840203b
commit aaba22250f

@ -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."));

@ -456,7 +456,8 @@
$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;
}

@ -466,7 +466,8 @@
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>";

Loading…
Cancel
Save