add placeholder Filters.filterDlgCheckRegExp

This commit is contained in:
Andrew Dolgov 2019-07-12 10:47:18 +03:00
parent ea30061cce
commit 86a014f23b
2 changed files with 9 additions and 1 deletions

View File

@ -976,7 +976,8 @@ class Pref_Filters extends Handler_Protected {
print "<section>";
print "<input dojoType=\"dijit.form.ValidationTextBox\"
required=\"true\" id=\"filterDlg_regExp\"
required=\"true\" id=\"filterDlg_regExp\"
onchange='Filters.filterDlgCheckRegExp(this)'
style=\"font-size : 16px; width : 20em;\"
name=\"reg_exp\" value=\"$reg_exp\"/>";

View File

@ -2,6 +2,13 @@
/* global __, ngettext */
define(["dojo/_base/declare"], function (declare) {
Filters = {
filterDlgCheckRegExp: function(sender) {
try {
new RegExp("/" + sender.value + "/");
} catch (e) {
console.error(e);
}
},
filterDlgCheckAction: function(sender) {
const action = sender.value;