mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 18:45:56 +00:00
remove toggleSelectListRow2()
This commit is contained in:
@@ -429,7 +429,7 @@ class Pref_Filters extends Handler_Protected {
|
|||||||
|
|
||||||
$data = htmlspecialchars(json_encode($line));
|
$data = htmlspecialchars(json_encode($line));
|
||||||
|
|
||||||
print "<li><input dojoType='dijit.form.CheckBox' type='checkbox' onclick='toggleSelectListRow2(this)'>".
|
print "<li><input dojoType='dijit.form.CheckBox' type='checkbox' onclick='ListUtils.onChecked(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>";
|
||||||
}
|
}
|
||||||
@@ -473,7 +473,7 @@ class Pref_Filters extends Handler_Protected {
|
|||||||
|
|
||||||
$data = htmlspecialchars(json_encode($line));
|
$data = htmlspecialchars(json_encode($line));
|
||||||
|
|
||||||
print "<li><input dojoType='dijit.form.CheckBox' type='checkbox' onclick='toggleSelectListRow2(this)'>".
|
print "<li><input dojoType='dijit.form.CheckBox' type='checkbox' onclick='ListUtils.onChecked(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>";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,12 +53,10 @@
|
|||||||
$site_url = htmlspecialchars($line["site_url"]);
|
$site_url = htmlspecialchars($line["site_url"]);
|
||||||
$subscribers = $line["subscribers"];
|
$subscribers = $line["subscribers"];
|
||||||
|
|
||||||
$check_box = "<input onclick='toggleSelectListRow2(this)'
|
$check_box = "<input onclick='ListUtils.onChecked(this)'
|
||||||
dojoType=\"dijit.form.CheckBox\"
|
dojoType=\"dijit.form.CheckBox\"
|
||||||
type=\"checkbox\" \">";
|
type=\"checkbox\" \">";
|
||||||
|
|
||||||
$class = ($feedctr % 2) ? "even" : "odd";
|
|
||||||
|
|
||||||
$site_url = "<a target=\"_blank\" rel=\"noopener noreferrer\"
|
$site_url = "<a target=\"_blank\" rel=\"noopener noreferrer\"
|
||||||
href=\"$site_url\">
|
href=\"$site_url\">
|
||||||
<span class=\"fb_feedTitle\">".
|
<span class=\"fb_feedTitle\">".
|
||||||
@@ -75,11 +73,9 @@
|
|||||||
$feed_url = htmlspecialchars($line["feed_url"]);
|
$feed_url = htmlspecialchars($line["feed_url"]);
|
||||||
$site_url = htmlspecialchars($line["site_url"]);
|
$site_url = htmlspecialchars($line["site_url"]);
|
||||||
|
|
||||||
$check_box = "<input onclick='toggleSelectListRow2(this)' dojoType=\"dijit.form.CheckBox\"
|
$check_box = "<input onclick='ListUtils.onChecked(this)' dojoType=\"dijit.form.CheckBox\"
|
||||||
type=\"checkbox\">";
|
type=\"checkbox\">";
|
||||||
|
|
||||||
$class = ($feedctr % 2) ? "even" : "odd";
|
|
||||||
|
|
||||||
if ($line['articles_archived'] > 0) {
|
if ($line['articles_archived'] > 0) {
|
||||||
$archived = sprintf(_ngettext("%d archived article", "%d archived articles", (int) $line['articles_archived']), $line['articles_archived']);
|
$archived = sprintf(_ngettext("%d archived article", "%d archived articles", (int) $line['articles_archived']), $line['articles_archived']);
|
||||||
$archived = " <span class='subscribers'>($archived)</span>";
|
$archived = " <span class='subscribers'>($archived)</span>";
|
||||||
|
|||||||
@@ -53,6 +53,15 @@ Array.prototype.remove = function(s) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const ListUtils = {
|
||||||
|
onChecked: function(elem) {
|
||||||
|
// account for dojo checkboxes
|
||||||
|
elem = elem.domNode || elem;
|
||||||
|
|
||||||
|
elem.up("li").toggleClassName("Selected");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const Utils = {
|
const Utils = {
|
||||||
_rpc_seq: 0,
|
_rpc_seq: 0,
|
||||||
hotkey_prefix: 0,
|
hotkey_prefix: 0,
|
||||||
@@ -984,12 +993,6 @@ function toggleSelectRowById(sender, id) {
|
|||||||
return toggleSelectRow(sender, row);
|
return toggleSelectRow(sender, row);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* this is for dijit Checkbox */
|
|
||||||
function toggleSelectListRow2(sender) {
|
|
||||||
const row = sender.domNode.parentNode;
|
|
||||||
return toggleSelectRow(sender, row);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* this is for dijit Checkbox */
|
/* this is for dijit Checkbox */
|
||||||
function toggleSelectRow2(sender, row, is_cdm) {
|
function toggleSelectRow2(sender, row, is_cdm) {
|
||||||
|
|
||||||
@@ -1137,7 +1140,7 @@ const Filters = {
|
|||||||
|
|
||||||
new dijit.form.CheckBox({
|
new dijit.form.CheckBox({
|
||||||
onChange: function () {
|
onChange: function () {
|
||||||
this.domNode.up("li").toggleClassName("Selected");
|
ListUtils.onChecked(this);
|
||||||
},
|
},
|
||||||
}, cb);
|
}, cb);
|
||||||
|
|
||||||
@@ -1186,7 +1189,7 @@ const Filters = {
|
|||||||
|
|
||||||
new dijit.form.CheckBox({
|
new dijit.form.CheckBox({
|
||||||
onChange: function () {
|
onChange: function () {
|
||||||
this.domNode.up("li").toggleClassName("Selected");
|
ListUtils.onChecked(this);
|
||||||
},
|
},
|
||||||
}, cb);
|
}, cb);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user