From 86a014f23b04f5b1bf301a317efccece78c29826 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 12 Jul 2019 10:47:18 +0300 Subject: [PATCH] add placeholder Filters.filterDlgCheckRegExp --- classes/pref/filters.php | 3 ++- js/CommonFilters.js | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/classes/pref/filters.php b/classes/pref/filters.php index 041951b35..c36a2e8c5 100755 --- a/classes/pref/filters.php +++ b/classes/pref/filters.php @@ -976,7 +976,8 @@ class Pref_Filters extends Handler_Protected { print "
"; print ""; diff --git a/js/CommonFilters.js b/js/CommonFilters.js index a8171f64f..c3f5d0712 100644 --- a/js/CommonFilters.js +++ b/js/CommonFilters.js @@ -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;