From 04e41840fe2b6830b2c75124209b3b1bdcba60f4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 31 Aug 2012 15:26:11 +0400 Subject: [PATCH] use dijit.form.CheckBox in filter edit dialog --- classes/pref/filters.php | 4 ++-- js/functions.js | 18 ++++++++++++------ tt-rss.css | 5 +++++ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/classes/pref/filters.php b/classes/pref/filters.php index 11487c87..2ed46435 100644 --- a/classes/pref/filters.php +++ b/classes/pref/filters.php @@ -231,7 +231,7 @@ class Pref_Filters extends Handler_Protected { $data = htmlspecialchars(json_encode($line)); - print "
  • ". + print "
  • ". "".$this->getRuleName($line)."". "
  • "; } @@ -270,7 +270,7 @@ class Pref_Filters extends Handler_Protected { $line["action_param_label"] = $line["action_param"]; $data = htmlspecialchars(json_encode($line)); - print "
  • ". + print "
  • ". "".$this->getActionName($line)."". "
  • "; } diff --git a/js/functions.js b/js/functions.js index 284b2cc5..a01ce3ca 100644 --- a/js/functions.js +++ b/js/functions.js @@ -953,9 +953,12 @@ function createNewRuleElement(parentNode, replaceNode) { try { var li = dojo.create("li"); - dojo.create("input", { type: "checkbox", - onclick: function() { toggleSelectListRow(this) }, - }, li); + var cb = dojo.create("input", { type: "checkbox" }, li); + + new dijit.form.CheckBox({ + onChange: function() { + toggleSelectListRow2(this) }, + }, cb); dojo.create("input", { type: "hidden", name: "rule[]", @@ -1000,9 +1003,12 @@ function createNewActionElement(parentNode, replaceNode) { try { var li = dojo.create("li"); - dojo.create("input", { type: "checkbox", - onclick: function() { toggleSelectListRow(this) }, - }, li); + var cb = dojo.create("input", { type: "checkbox" }, li); + + new dijit.form.CheckBox({ + onChange: function() { + toggleSelectListRow2(this) }, + }, cb); dojo.create("input", { type: "hidden", name: "action[]", diff --git a/tt-rss.css b/tt-rss.css index 801a96ac..25b51e48 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -1441,4 +1441,9 @@ ul#filterDlg_Matches, ul#filterDlg_Actions { ul#filterDlg_Matches li, ul#filterDlg_Actions li { cursor : pointer; + padding : 0px 0px 0px 5px; +} + +ul#filterDlg_Matches li div.dijitCheckBox, ul#filterDlg_Actions li div.dijitCheckBox { + margin-right : 5px; } -- 2.39.2