From b87744534a5250e9f839997f8eceb5b86b8c0e5c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 11 Aug 2015 23:28:41 +0300 Subject: add plugin-based filter actions (see example plugin in attic) bump schema --- js/functions.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'js/functions.js') diff --git a/js/functions.js b/js/functions.js index 98a531851..a0f954e07 100644 --- a/js/functions.js +++ b/js/functions.js @@ -591,15 +591,21 @@ function filterDlgCheckAction(sender) { } // if selected action supports parameters, enable params field - if (action == 4 || action == 6 || action == 7) { + if (action == 4 || action == 6 || action == 7 || action == 9) { new Effect.Appear(action_param, {duration : 0.5}); - if (action != 7) { - Element.show(dijit.byId("filterDlg_actionParam").domNode); - Element.hide(dijit.byId("filterDlg_actionParamLabel").domNode); - } else { + + Element.hide(dijit.byId("filterDlg_actionParam").domNode); + Element.hide(dijit.byId("filterDlg_actionParamLabel").domNode); + Element.hide(dijit.byId("filterDlg_actionParamPlugin").domNode); + + if (action == 7) { Element.show(dijit.byId("filterDlg_actionParamLabel").domNode); - Element.hide(dijit.byId("filterDlg_actionParam").domNode); + } else if (action == 9) { + Element.show(dijit.byId("filterDlg_actionParamPlugin").domNode); + } else { + Element.show(dijit.byId("filterDlg_actionParam").domNode); } + } else { Element.hide(action_param); } @@ -966,6 +972,8 @@ function createNewActionElement(parentNode, replaceNode) { if (form.action_id.value == 7) { form.action_param.value = form.action_param_label.value; + } else if (form.action_id.value == 9) { + form.action_param.value = form.action_param_plugin.value; } var query = "backend.php?op=pref-filters&method=printactionname&action="+ -- cgit v1.2.3