filter dialog: display parsed date when checking; fix Check it button not using Dijit control
This commit is contained in:
parent
361840203b
commit
aaba22250f
|
@ -628,7 +628,7 @@ function filterDlgCheckDate() {
|
||||||
var reply = JSON.parse(transport.responseText);
|
var reply = JSON.parse(transport.responseText);
|
||||||
|
|
||||||
if (reply['result'] == true) {
|
if (reply['result'] == true) {
|
||||||
alert(__("Date syntax appears to be correct."));
|
alert(__("Date syntax appears to be correct:") + " " + reply['date']);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
alert(__("Date syntax is incorrect."));
|
alert(__("Date syntax is incorrect."));
|
||||||
|
|
|
@ -456,7 +456,8 @@
|
||||||
$date = db_escape_string($_REQUEST["date"]);
|
$date = db_escape_string($_REQUEST["date"]);
|
||||||
$date_parsed = strtotime($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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -466,7 +466,8 @@
|
||||||
name=\"reg_exp\" value=\"$reg_exp\"/>";
|
name=\"reg_exp\" value=\"$reg_exp\"/>";
|
||||||
|
|
||||||
print "<span id=\"filterDlg_dateChkBox\" style=\"display : none\">";
|
print "<span id=\"filterDlg_dateChkBox\" style=\"display : none\">";
|
||||||
print " <button onclick=\"return filterDlgCheckDate()\">".
|
print " <button dojoType=\"dijit.form.Button\"
|
||||||
|
onclick=\"return filterDlgCheckDate()\">".
|
||||||
__('Check it')."</button>";
|
__('Check it')."</button>";
|
||||||
print "</span>";
|
print "</span>";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue