From e54dbacb7c0ff12b9bb1c800bfa2e5f54d27b33d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 20 Jun 2012 10:19:29 +0400 Subject: automatically add active article title in create filter dialog --- js/functions.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'js') diff --git a/js/functions.js b/js/functions.js index 0b0b475c6..b2d79dc56 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1058,6 +1058,17 @@ function quickAddFilter() { href: query}); dialog.show(); + + var lh = dojo.connect(dialog, "onLoad", + function() { + dojo.disconnect(lh); + var title = $("PTITLE-FULL-" + active_post_id); + + if (title) { + $("filterDlg_regExp").value = title.innerHTML; + } + }); + } catch (e) { exception_error("quickAddFilter", e); } -- cgit v1.2.3-54-g00ecf