shorten pref tab names; make log-alert clickable

This commit is contained in:
Andrew Dolgov 2021-02-11 15:49:32 +03:00
parent cc646790fd
commit 74986d1ac6
15 changed files with 25 additions and 16 deletions

View File

@ -871,7 +871,7 @@ class Handler_Public extends Handler {
if ($feed_id) { if ($feed_id) {
print "<form method='GET' action=\"$tp_uri\"> print "<form method='GET' action=\"$tp_uri\">
<input type='hidden' name='tab' value='feedConfig'> <input type='hidden' name='tab' value='feeds'>
<input type='hidden' name='method' value='editfeed'> <input type='hidden' name='method' value='editfeed'>
<input type='hidden' name='methodparam' value='$feed_id'> <input type='hidden' name='methodparam' value='$feed_id'>
<button dojoType='dijit.form.Button' class='alt-info' type='submit'>".__("Edit subscription options")."</button> <button dojoType='dijit.form.Button' class='alt-info' type='submit'>".__("Edit subscription options")."</button>

View File

@ -167,7 +167,7 @@
<i class="material-icons net-alert" style="display : none" <i class="material-icons net-alert" style="display : none"
title="<?php echo __("Communication problem with server.") ?>">error_outline</i> title="<?php echo __("Communication problem with server.") ?>">error_outline</i>
<i class="material-icons log-alert" style="display : none" <i class="material-icons log-alert" style="display : none" onclick="App.openPreferences('system')"
title="<?php echo __("Recent entries found in event log.") ?>">warning</i> title="<?php echo __("Recent entries found in event log.") ?>">warning</i>
<i id="updates-available" class="material-icons icon-new-version" style="display : none" <i id="updates-available" class="material-icons icon-new-version" style="display : none"

View File

@ -1098,7 +1098,7 @@ const App = {
this.displayDlg(__("Tag cloud"), "printTagCloud"); this.displayDlg(__("Tag cloud"), "printTagCloud");
}; };
this.hotkey_actions["goto_prefs"] = () => { this.hotkey_actions["goto_prefs"] = () => {
document.location.href = "prefs.php"; App.openPreferences();
}; };
this.hotkey_actions["select_article_cursor"] = () => { this.hotkey_actions["select_article_cursor"] = () => {
const id = Article.getUnderPointer(); const id = Article.getUnderPointer();
@ -1163,10 +1163,13 @@ const App = {
}; };
} }
}, },
openPreferences: function(tab) {
document.location.href = "prefs.php" + (tab ? "?tab=" + tab : "");
},
onActionSelected: function(opid) { onActionSelected: function(opid) {
switch (opid) { switch (opid) {
case "qmcPrefs": case "qmcPrefs":
document.location.href = "prefs.php"; App.openPreferences();
break; break;
case "qmcLogout": case "qmcLogout":
App.postCurrentWindow("public.php", {op: "logout", csrf_token: __csrf_token}); App.postCurrentWindow("public.php", {op: "logout", csrf_token: __csrf_token});

View File

@ -92,7 +92,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
let search = (searchElem) ? searchElem.value : ""; let search = (searchElem) ? searchElem.value : "";
xhrPost("backend.php", { op: "pref-feeds", search: search }, (transport) => { 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(); Notify.close();
}); });
}, },

View File

@ -90,7 +90,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
if (user_search) { search = user_search.value; } if (user_search) { search = user_search.value; }
xhrPost("backend.php", { op: "pref-filters", search: search }, (transport) => { 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(); Notify.close();
}); });
}, },

View File

@ -58,7 +58,7 @@ const Helpers = {
}, },
update: function() { update: function() {
xhrPost("backend.php", { op: "pref-system", severity: dijit.byId("severity").attr('value'), page: Helpers.EventLog.log_page }, (transport) => { 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(); Notify.close();
}); });
}, },
@ -206,7 +206,7 @@ const Helpers = {
}, },
refresh: function() { refresh: function() {
xhrPost("backend.php", { op: "pref-prefs" }, (transport) => { xhrPost("backend.php", { op: "pref-prefs" }, (transport) => {
dijit.byId('genConfigTab').attr('content', transport.responseText); dijit.byId('prefsTab').attr('content', transport.responseText);
Notify.close(); Notify.close();
}); });
}, },

View File

@ -54,7 +54,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f
}, },
reload: function() { reload: function() {
xhrPost("backend.php", { op: "pref-labels" }, (transport) => { xhrPost("backend.php", { op: "pref-labels" }, (transport) => {
dijit.byId('labelConfigTab').attr('content', transport.responseText); dijit.byId('labelsTab').attr('content', transport.responseText);
Notify.close(); Notify.close();
}); });
}, },

View File

@ -9,7 +9,7 @@ const Users = {
const search = user_search ? user_search.value : ""; const search = user_search ? user_search.value : "";
xhrPost("backend.php", { op: "pref-users", sort: sort, search: search }, (transport) => { 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(); Notify.close();
}); });
}, },

View File

@ -136,26 +136,26 @@
<div id="main" dojoType="dijit.layout.BorderContainer"> <div id="main" dojoType="dijit.layout.BorderContainer">
<div dojoType="dijit.layout.TabContainer" region="center" id="pref-tabs"> <div dojoType="dijit.layout.TabContainer" region="center" id="pref-tabs">
<div id="genConfigTab" dojoType="dijit.layout.ContentPane" <div id="prefsTab" dojoType="dijit.layout.ContentPane"
href="backend.php?op=pref-prefs" href="backend.php?op=pref-prefs"
title="<i class='material-icons'>settings</i> <?php echo __('Preferences') ?>"></div> title="<i class='material-icons'>settings</i> <?php echo __('Preferences') ?>"></div>
<div id="feedConfigTab" dojoType="dijit.layout.ContentPane" <div id="feedsTab" dojoType="dijit.layout.ContentPane"
href="backend.php?op=pref-feeds" href="backend.php?op=pref-feeds"
title="<i class='material-icons'>rss_feed</i> <?php echo __('Feeds') ?>"></div> title="<i class='material-icons'>rss_feed</i> <?php echo __('Feeds') ?>"></div>
<div id="filterConfigTab" dojoType="dijit.layout.ContentPane" <div id="filtersTab" dojoType="dijit.layout.ContentPane"
style="padding : 0px" style="padding : 0px"
href="backend.php?op=pref-filters" href="backend.php?op=pref-filters"
title="<i class='material-icons'>filter_list1</i> <?php echo __('Filters') ?>"></div> title="<i class='material-icons'>filter_list1</i> <?php echo __('Filters') ?>"></div>
<div id="labelConfigTab" dojoType="dijit.layout.ContentPane" <div id="labelsTab" dojoType="dijit.layout.ContentPane"
style="padding : 0px" style="padding : 0px"
href="backend.php?op=pref-labels" href="backend.php?op=pref-labels"
title="<i class='material-icons'>label_outline1</i> <?php echo __('Labels') ?>"></div> title="<i class='material-icons'>label_outline1</i> <?php echo __('Labels') ?>"></div>
<?php if ($_SESSION["access_level"] >= 10) { ?> <?php if ($_SESSION["access_level"] >= 10) { ?>
<div id="userConfigTab" dojoType="dijit.layout.ContentPane" <div id="usersTab" dojoType="dijit.layout.ContentPane"
style="padding : 0px" style="padding : 0px"
href="backend.php?op=pref-users" href="backend.php?op=pref-users"
title="<i class='material-icons'>person</i> <?php echo __('Users') ?>"></div> title="<i class='material-icons'>person</i> <?php echo __('Users') ?>"></div>
<div id="systemConfigTab" dojoType="dijit.layout.ContentPane" <div id="systemTab" dojoType="dijit.layout.ContentPane"
href="backend.php?op=pref-system" href="backend.php?op=pref-system"
title="<i class='material-icons'>info_outline</i> <?php echo __('System') ?>"></div> title="<i class='material-icons'>info_outline</i> <?php echo __('System') ?>"></div>
<?php } ?> <?php } ?>

View File

@ -707,6 +707,7 @@ body.ttrss_main #toolbar-frame #toolbar .left i.icon-error {
} }
body.ttrss_main #toolbar-frame #toolbar i.log-alert { body.ttrss_main #toolbar-frame #toolbar i.log-alert {
color: #ddba1c; color: #ddba1c;
cursor: pointer;
} }
body.ttrss_main #toolbar-frame #toolbar i { body.ttrss_main #toolbar-frame #toolbar i {
margin: 0 4px; margin: 0 4px;

View File

@ -707,6 +707,7 @@ body.ttrss_main #toolbar-frame #toolbar .left i.icon-error {
} }
body.ttrss_main #toolbar-frame #toolbar i.log-alert { body.ttrss_main #toolbar-frame #toolbar i.log-alert {
color: #ddba1c; color: #ddba1c;
cursor: pointer;
} }
body.ttrss_main #toolbar-frame #toolbar i { body.ttrss_main #toolbar-frame #toolbar i {
margin: 0 4px; margin: 0 4px;

View File

@ -707,6 +707,7 @@ body.ttrss_main #toolbar-frame #toolbar .left i.icon-error {
} }
body.ttrss_main #toolbar-frame #toolbar i.log-alert { body.ttrss_main #toolbar-frame #toolbar i.log-alert {
color: #ddba1c; color: #ddba1c;
cursor: pointer;
} }
body.ttrss_main #toolbar-frame #toolbar i { body.ttrss_main #toolbar-frame #toolbar i {
margin: 0 4px; margin: 0 4px;

View File

@ -826,6 +826,7 @@ body.ttrss_main {
i.log-alert { i.log-alert {
color : #ddba1c; color : #ddba1c;
cursor : pointer;
} }
i { i {

View File

@ -708,6 +708,7 @@ body.ttrss_main #toolbar-frame #toolbar .left i.icon-error {
} }
body.ttrss_main #toolbar-frame #toolbar i.log-alert { body.ttrss_main #toolbar-frame #toolbar i.log-alert {
color: #ddba1c; color: #ddba1c;
cursor: pointer;
} }
body.ttrss_main #toolbar-frame #toolbar i { body.ttrss_main #toolbar-frame #toolbar i {
margin: 0 4px; margin: 0 4px;

View File

@ -708,6 +708,7 @@ body.ttrss_main #toolbar-frame #toolbar .left i.icon-error {
} }
body.ttrss_main #toolbar-frame #toolbar i.log-alert { body.ttrss_main #toolbar-frame #toolbar i.log-alert {
color: #ddba1c; color: #ddba1c;
cursor: pointer;
} }
body.ttrss_main #toolbar-frame #toolbar i { body.ttrss_main #toolbar-frame #toolbar i {
margin: 0 4px; margin: 0 4px;