use dijit.form.CheckBox in filter edit dialog

This commit is contained in:
Andrew Dolgov 2012-08-31 15:26:11 +04:00
parent 69c6e94d35
commit 04e41840fe
3 changed files with 19 additions and 8 deletions

View File

@ -231,7 +231,7 @@ class Pref_Filters extends Handler_Protected {
$data = htmlspecialchars(json_encode($line)); $data = htmlspecialchars(json_encode($line));
print "<li><input type='checkbox' onclick='toggleSelectListRow(this)'>". print "<li><input dojoType='dijit.form.CheckBox' type='checkbox' onclick='toggleSelectListRow2(this)'>".
"<span onclick=\"dijit.byId('filterEditDlg').editRule(this)\">".$this->getRuleName($line)."</span>". "<span onclick=\"dijit.byId('filterEditDlg').editRule(this)\">".$this->getRuleName($line)."</span>".
"<input type='hidden' name='rule[]' value=\"$data\"/></li>"; "<input type='hidden' name='rule[]' value=\"$data\"/></li>";
} }
@ -270,7 +270,7 @@ class Pref_Filters extends Handler_Protected {
$line["action_param_label"] = $line["action_param"]; $line["action_param_label"] = $line["action_param"];
$data = htmlspecialchars(json_encode($line)); $data = htmlspecialchars(json_encode($line));
print "<li><input type='checkbox' onclick='toggleSelectListRow(this)'>". print "<li><input dojoType='dijit.form.CheckBox' type='checkbox' onclick='toggleSelectListRow2(this)'>".
"<span onclick=\"dijit.byId('filterEditDlg').editAction(this)\">".$this->getActionName($line)."</span>". "<span onclick=\"dijit.byId('filterEditDlg').editAction(this)\">".$this->getActionName($line)."</span>".
"<input type='hidden' name='action[]' value=\"$data\"/></li>"; "<input type='hidden' name='action[]' value=\"$data\"/></li>";
} }

View File

@ -953,9 +953,12 @@ function createNewRuleElement(parentNode, replaceNode) {
try { try {
var li = dojo.create("li"); var li = dojo.create("li");
dojo.create("input", { type: "checkbox", var cb = dojo.create("input", { type: "checkbox" }, li);
onclick: function() { toggleSelectListRow(this) },
}, li); new dijit.form.CheckBox({
onChange: function() {
toggleSelectListRow2(this) },
}, cb);
dojo.create("input", { type: "hidden", dojo.create("input", { type: "hidden",
name: "rule[]", name: "rule[]",
@ -1000,9 +1003,12 @@ function createNewActionElement(parentNode, replaceNode) {
try { try {
var li = dojo.create("li"); var li = dojo.create("li");
dojo.create("input", { type: "checkbox", var cb = dojo.create("input", { type: "checkbox" }, li);
onclick: function() { toggleSelectListRow(this) },
}, li); new dijit.form.CheckBox({
onChange: function() {
toggleSelectListRow2(this) },
}, cb);
dojo.create("input", { type: "hidden", dojo.create("input", { type: "hidden",
name: "action[]", name: "action[]",

View File

@ -1441,4 +1441,9 @@ ul#filterDlg_Matches, ul#filterDlg_Actions {
ul#filterDlg_Matches li, ul#filterDlg_Actions li { ul#filterDlg_Matches li, ul#filterDlg_Actions li {
cursor : pointer; cursor : pointer;
padding : 0px 0px 0px 5px;
}
ul#filterDlg_Matches li div.dijitCheckBox, ul#filterDlg_Actions li div.dijitCheckBox {
margin-right : 5px;
} }