summaryrefslogtreecommitdiff
path: root/js/PrefFeedTree.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/PrefFeedTree.js')
-rw-r--r--js/PrefFeedTree.js31
1 files changed, 14 insertions, 17 deletions
diff --git a/js/PrefFeedTree.js b/js/PrefFeedTree.js
index f1729382c..4e9cb58a5 100644
--- a/js/PrefFeedTree.js
+++ b/js/PrefFeedTree.js
@@ -1,5 +1,4 @@
-/* eslint-disable prefer-rest-params */
-/* global __, lib, dijit, define, dojo, CommonDialogs, Notify, Tables, xhr, fox, App */
+/* global __, lib, define, CommonDialogs, Notify, Tables, xhr, fox, App */
define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_base/array", "dojo/cookie"],
function (declare, domConstruct, checkBoxTree, array, cookie) {
@@ -49,7 +48,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
// var oreo = cookie(this.cookieName);
let oreo = localStorage.getItem(this.cookieName);
// migrate old data if nothing in localStorage
- if (oreo == null || oreo === '') {
+ if (oreo === null || oreo === '') {
oreo = cookie(this.cookieName);
cookie(this.cookieName, null, { expires: -1 });
}
@@ -133,9 +132,8 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
this.inherited(arguments);
this.tree.model.store.save();
},
- // eslint-disable-next-line no-unused-vars
- getRowClass: function (item, opened) {
- let rc = (!item.error || item.error == '') ? "dijitTreeRow" :
+ getRowClass: function (item /*, opened */) {
+ let rc = (!item.error || item.error === '') ? "dijitTreeRow" :
"dijitTreeRow Error";
if (item.updates_disabled > 0) rc += " UpdatesDisabled";
@@ -143,8 +141,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
return rc;
},
getIconClass: function (item, opened) {
- // eslint-disable-next-line no-nested-ternary
- return (!item || this.model.store.getValue(item, 'type') == 'category') ? (opened ? "dijitFolderOpened" : "dijitFolderClosed") : "feed-icon";
+ return (!item || this.model.store.getValue(item, 'type') === 'category') ? (opened ? "dijitFolderOpened" : "dijitFolderClosed") : "feed-icon";
},
reload: function() {
const searchElem = App.byId("feed_search");
@@ -175,11 +172,11 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
//console.log(id + " " + position + " " + source_id);
if (source_id.match("FEED:")) {
- return ((id.match("CAT:") && position == "over") ||
- (id.match("FEED:") && position != "over"));
+ return ((id.match("CAT:") && position === "over") ||
+ (id.match("FEED:") && position !== "over"));
} else if (source_id.match("CAT:")) {
return ((id.match("CAT:") && !id.match("CAT:0")) ||
- (id.match("root") && position == "over"));
+ (id.match("root") && position === "over"));
}
},
resetFeedOrder: function() {
@@ -293,7 +290,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
editSelectedFeed: function() {
const rows = this.getSelectedFeeds();
- if (rows.length == 0) {
+ if (rows.length === 0) {
alert(__("No feeds selected."));
return;
}
@@ -309,7 +306,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
editMultiple: function() {
const rows = this.getSelectedFeeds();
- if (rows.length == 0) {
+ if (rows.length === 0) {
alert(__("No feeds selected."));
return;
}
@@ -340,7 +337,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
target.attr('disabled', !checkbox.attr('checked'));
console.log(target, target.attr('type'));
- if (target.attr('type') == "checkbox") {
+ if (target.attr('type') === "checkbox") {
const label = checkbox.domNode.closest("label");
if (checkbox.attr('checked'))
@@ -358,7 +355,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
Object.keys(query).forEach((key) => {
const val = query[key];
- if (typeof val == "object" && val.length == 0)
+ if (typeof val === "object" && val.length === 0)
query[key] = ["off"];
});
@@ -384,12 +381,12 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
},
editCategory: function(id, item) {
// uncategorized
- if (String(item.id) == "CAT:0")
+ if (String(item.id) === "CAT:0")
return;
const new_name = prompt(__('Rename category to:'), item.name);
- if (new_name && new_name != item.name) {
+ if (new_name && new_name !== item.name) {
Notify.progress("Loading, please wait...");