summaryrefslogtreecommitdiff
path: root/js/App.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/App.js
parent5db6939dc9628886391bcaa18965de94727c96d9 (diff)
minor cleanup related to toolbar-main (use dijit methods, etc)
Diffstat (limited to 'js/App.js')
-rw-r--r--js/App.js18
1 files changed, 4 insertions, 14 deletions
diff --git a/js/App.js b/js/App.js
index 82ec26c2f..20498e692 100644
--- a/js/App.js
+++ b/js/App.js
@@ -777,13 +777,10 @@ const App = {
}
});
- const toolbar = document.forms["toolbar-main"];
-
- dijit.getEnclosingWidget(toolbar.view_mode).attr('value',
- this.getInitParam("default_view_mode"));
-
- dijit.getEnclosingWidget(toolbar.order_by).attr('value',
- this.getInitParam("default_view_order_by"));
+ dijit.byId('toolbar-main').setValues({
+ view_mode: this.getInitParam("default_view_mode"),
+ order_by: this.getInitParam("default_view_order_by")
+ });
this.setLoadingProgress(50);
@@ -850,13 +847,6 @@ const App = {
document.title = tmp;
},
- onViewModeChanged: function() {
- const view_mode = document.forms["toolbar-main"].view_mode.value;
-
- App.findAll("body")[0].setAttribute("view-mode", view_mode);
-
- return Feeds.reloadCurrent('');
- },
hotkeyHandler: function(event) {
if (event.target.nodeName == "INPUT" || event.target.nodeName == "TEXTAREA") return;