summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-11 15:49:32 +0300
committerAndrew Dolgov <[email protected]>2021-02-11 15:49:32 +0300
commit74986d1ac6e5d0433bff460aa2b0d1757c75f4b4 (patch)
treee0f0fc87e47a5e986f6a7035ce752823873988a4 /js
parentcc646790fdda3b476b199032005e89ea59f3d7f3 (diff)
shorten pref tab names; make log-alert clickable
Diffstat (limited to 'js')
-rw-r--r--js/App.js7
-rw-r--r--js/PrefFeedTree.js2
-rw-r--r--js/PrefFilterTree.js2
-rw-r--r--js/PrefHelpers.js4
-rw-r--r--js/PrefLabelTree.js2
-rw-r--r--js/PrefUsers.js2
6 files changed, 11 insertions, 8 deletions
diff --git a/js/App.js b/js/App.js
index 87c4bd3e7..db7797b75 100644
--- a/js/App.js
+++ b/js/App.js
@@ -1098,7 +1098,7 @@ const App = {
this.displayDlg(__("Tag cloud"), "printTagCloud");
};
this.hotkey_actions["goto_prefs"] = () => {
- document.location.href = "prefs.php";
+ App.openPreferences();
};
this.hotkey_actions["select_article_cursor"] = () => {
const id = Article.getUnderPointer();
@@ -1163,10 +1163,13 @@ const App = {
};
}
},
+ openPreferences: function(tab) {
+ document.location.href = "prefs.php" + (tab ? "?tab=" + tab : "");
+ },
onActionSelected: function(opid) {
switch (opid) {
case "qmcPrefs":
- document.location.href = "prefs.php";
+ App.openPreferences();
break;
case "qmcLogout":
App.postCurrentWindow("public.php", {op: "logout", csrf_token: __csrf_token});
diff --git a/js/PrefFeedTree.js b/js/PrefFeedTree.js
index 4ea0cdac1..acd410a2c 100644
--- a/js/PrefFeedTree.js
+++ b/js/PrefFeedTree.js
@@ -92,7 +92,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
let search = (searchElem) ? searchElem.value : "";
xhrPost("backend.php", { op: "pref-feeds", search: search }, (transport) => {
- dijit.byId('feedConfigTab').attr('content', transport.responseText);
+ dijit.byId('feedsTab').attr('content', transport.responseText);
Notify.close();
});
},
diff --git a/js/PrefFilterTree.js b/js/PrefFilterTree.js
index 0e8e52658..b2041d182 100644
--- a/js/PrefFilterTree.js
+++ b/js/PrefFilterTree.js
@@ -90,7 +90,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
if (user_search) { search = user_search.value; }
xhrPost("backend.php", { op: "pref-filters", search: search }, (transport) => {
- dijit.byId('filterConfigTab').attr('content', transport.responseText);
+ dijit.byId('filtersTab').attr('content', transport.responseText);
Notify.close();
});
},
diff --git a/js/PrefHelpers.js b/js/PrefHelpers.js
index 57dff2333..f9cb450e5 100644
--- a/js/PrefHelpers.js
+++ b/js/PrefHelpers.js
@@ -58,7 +58,7 @@ const Helpers = {
},
update: function() {
xhrPost("backend.php", { op: "pref-system", severity: dijit.byId("severity").attr('value'), page: Helpers.EventLog.log_page }, (transport) => {
- dijit.byId('systemConfigTab').attr('content', transport.responseText);
+ dijit.byId('systemTab').attr('content', transport.responseText);
Notify.close();
});
},
@@ -206,7 +206,7 @@ const Helpers = {
},
refresh: function() {
xhrPost("backend.php", { op: "pref-prefs" }, (transport) => {
- dijit.byId('genConfigTab').attr('content', transport.responseText);
+ dijit.byId('prefsTab').attr('content', transport.responseText);
Notify.close();
});
},
diff --git a/js/PrefLabelTree.js b/js/PrefLabelTree.js
index b14474feb..624b197b4 100644
--- a/js/PrefLabelTree.js
+++ b/js/PrefLabelTree.js
@@ -54,7 +54,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f
},
reload: function() {
xhrPost("backend.php", { op: "pref-labels" }, (transport) => {
- dijit.byId('labelConfigTab').attr('content', transport.responseText);
+ dijit.byId('labelsTab').attr('content', transport.responseText);
Notify.close();
});
},
diff --git a/js/PrefUsers.js b/js/PrefUsers.js
index f09c73805..2cebce6ef 100644
--- a/js/PrefUsers.js
+++ b/js/PrefUsers.js
@@ -9,7 +9,7 @@ const Users = {
const search = user_search ? user_search.value : "";
xhrPost("backend.php", { op: "pref-users", sort: sort, search: search }, (transport) => {
- dijit.byId('userConfigTab').attr('content', transport.responseText);
+ dijit.byId('usersTab').attr('content', transport.responseText);
Notify.close();
});
},