summaryrefslogtreecommitdiff
path: root/js/Headlines.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-03-08 10:43:49 +0300
committerAndrew Dolgov <[email protected]>2021-03-08 10:43:49 +0300
commit1fb7125f90b3d11aecf83da58ef513ff8902a84a (patch)
tree362b394cd7b95bcd153ef3ba38017662027aa1d8 /js/Headlines.js
parent5db6939dc9628886391bcaa18965de94727c96d9 (diff)
minor cleanup related to toolbar-main (use dijit methods, etc)
Diffstat (limited to 'js/Headlines.js')
-rwxr-xr-xjs/Headlines.js18
1 files changed, 7 insertions, 11 deletions
diff --git a/js/Headlines.js b/js/Headlines.js
index fd9bc6661..28e43be1f 100755
--- a/js/Headlines.js
+++ b/js/Headlines.js
@@ -278,7 +278,7 @@ const Headlines = {
}
},
loadMore: function () {
- const view_mode = document.forms["toolbar-main"].view_mode.value;
+ const view_mode = dijit.byId("toolbar-main").getValues().view_mode;
const unread_in_buffer = App.findAll("#headlines-frame > div[id*=RROW][class*=Unread]").length;
const num_all = App.findAll("#headlines-frame > div[id*=RROW]").length;
const num_unread = Feeds.getUnread(Feeds.getActive(), Feeds.activeIsCat());
@@ -819,19 +819,15 @@ const Headlines = {
Notify.close();
},
reverse: function () {
- const toolbar = document.forms["toolbar-main"];
- const order_by = dijit.getEnclosingWidget(toolbar.order_by);
+ const toolbar = dijit.byId("toolbar-main");
+ let order_by = toolbar.getValues().order_by;
- let value = order_by.attr('value');
-
- if (value != "date_reverse")
- value = "date_reverse";
+ if (order_by != "date_reverse")
+ order_by = "date_reverse";
else
- value = "default";
-
- order_by.attr('value', value);
+ order_by = App.getInitParam("default_view_order_by");
- Feeds.reloadCurrent();
+ toolbar.setValues({order_by: order_by});
},
selectionToggleUnread: function (params = {}) {
const cmode = params.cmode != undefined ? params.cmode : 2;