mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 21:55:56 +00:00
add placeholder Filters.filterDlgCheckRegExp
This commit is contained in:
@@ -976,7 +976,8 @@ class Pref_Filters extends Handler_Protected {
|
|||||||
print "<section>";
|
print "<section>";
|
||||||
|
|
||||||
print "<input dojoType=\"dijit.form.ValidationTextBox\"
|
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;\"
|
style=\"font-size : 16px; width : 20em;\"
|
||||||
name=\"reg_exp\" value=\"$reg_exp\"/>";
|
name=\"reg_exp\" value=\"$reg_exp\"/>";
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,13 @@
|
|||||||
/* global __, ngettext */
|
/* global __, ngettext */
|
||||||
define(["dojo/_base/declare"], function (declare) {
|
define(["dojo/_base/declare"], function (declare) {
|
||||||
Filters = {
|
Filters = {
|
||||||
|
filterDlgCheckRegExp: function(sender) {
|
||||||
|
try {
|
||||||
|
new RegExp("/" + sender.value + "/");
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
},
|
||||||
filterDlgCheckAction: function(sender) {
|
filterDlgCheckAction: function(sender) {
|
||||||
const action = sender.value;
|
const action = sender.value;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user