add icons to accordion panels in preferences

fix typo in pref-prefs closing panel tag
This commit is contained in:
Andrew Dolgov 2018-12-06 08:56:28 +03:00
parent 7d5be47a2e
commit 814e49f8f7
17 changed files with 60 additions and 19 deletions

View File

@ -1134,7 +1134,8 @@ class Pref_Feeds extends Handler_Protected {
function index() { function index() {
print "<div dojoType=\"dijit.layout.AccordionContainer\" region=\"center\">"; print "<div dojoType=\"dijit.layout.AccordionContainer\" region=\"center\">";
print "<div id=\"pref-feeds-feeds\" dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Feeds')."\">"; print "<div id=\"pref-feeds-feeds\" dojoType=\"dijit.layout.AccordionPane\"
title=\"<i class='material-icons'>rss_feed</i> ".__('Feeds')."\">";
$sth = $this->pdo->prepare("SELECT COUNT(id) AS num_errors $sth = $this->pdo->prepare("SELECT COUNT(id) AS num_errors
FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ?"); FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ?");
@ -1268,7 +1269,8 @@ class Pref_Feeds extends Handler_Protected {
print "</div>"; # feeds pane print "</div>"; # feeds pane
print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('OPML')."\">"; print "<div dojoType=\"dijit.layout.AccordionPane\"
title=\"<i class='material-icons'>import_export</i> ".__('OPML')."\">";
print __("Using OPML you can export and import your feeds, filters, labels and Tiny Tiny RSS settings.") . print __("Using OPML you can export and import your feeds, filters, labels and Tiny Tiny RSS settings.") .
__("Only main settings profile can be migrated using OPML."); __("Only main settings profile can be migrated using OPML.");
@ -1323,7 +1325,8 @@ class Pref_Feeds extends Handler_Protected {
print "</div>"; # pane print "</div>"; # pane
print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Published & shared articles / Generated feeds')."\">"; print "<div dojoType=\"dijit.layout.AccordionPane\"
title=\"<i class='material-icons'>share</i> ".__('Published & shared articles / Generated feeds')."\">";
print __('Published articles can be subscribed by anyone who knows the following URL:'); print __('Published articles can be subscribed by anyone who knows the following URL:');

View File

@ -176,7 +176,8 @@ class Pref_Prefs extends Handler_Protected {
$_SESSION["prefs_op_result"] = ""; $_SESSION["prefs_op_result"] = "";
print "<div dojoType=\"dijit.layout.AccordionContainer\" region=\"center\">"; print "<div dojoType=\"dijit.layout.AccordionContainer\" region=\"center\">";
print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Personal data / Authentication')."\">"; print "<div dojoType=\"dijit.layout.AccordionPane\"
title=\"<i class='material-icons'>person</i> ".__('Personal data / Authentication')."\">";
print "<form dojoType=\"dijit.form.Form\" id=\"changeUserdataForm\">"; print "<form dojoType=\"dijit.form.Form\" id=\"changeUserdataForm\">";
@ -422,7 +423,8 @@ class Pref_Prefs extends Handler_Protected {
print "</div>"; #pane print "</div>"; #pane
print "<div dojoType=\"dijit.layout.AccordionPane\" selected=\"true\" title=\"".__('Preferences')."\">"; print "<div dojoType=\"dijit.layout.AccordionPane\" selected=\"true\"
title=\"<i class='material-icons'>settings</i> ".__('Preferences')."\">";
print "<form dojoType=\"dijit.form.Form\" id=\"changeSettingsForm\">"; print "<form dojoType=\"dijit.form.Form\" id=\"changeSettingsForm\">";
@ -675,7 +677,8 @@ class Pref_Prefs extends Handler_Protected {
print "</div>"; #pane print "</div>"; #pane
print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Plugins')."\">"; print "<div dojoType=\"dijit.layout.AccordionPane\"
title=\"<i class='material-icons'>extension</i> ".__('Plugins')."\">";
print "<form dojoType=\"dijit.form.Form\" id=\"changePluginsForm\">"; print "<form dojoType=\"dijit.form.Form\" id=\"changePluginsForm\">";
@ -839,14 +842,16 @@ class Pref_Prefs extends Handler_Protected {
print "</div>"; #pane print "</div>"; #pane
print "</div>"; #pane print "</div>"; #pane
print "</doiv>"; #border-container print "</div>"; #border-container
print "</form>"; print "</form>";
PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB, PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB,
"hook_prefs_tab", "prefPrefs"); "hook_prefs_tab", "prefPrefs");
print "</div>"; #container print "</div>"; #container
} }
function toggleAdvanced() { function toggleAdvanced() {

View File

@ -26,7 +26,8 @@ class Pref_System extends Handler_Protected {
function index() { function index() {
print "<div dojoType=\"dijit.layout.AccordionContainer\" region=\"center\">"; print "<div dojoType=\"dijit.layout.AccordionContainer\" region=\"center\">";
print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Event Log')."\">"; print "<div dojoType=\"dijit.layout.AccordionPane\"
title=\"<i class='material-icons'>report</i> ".__('Event Log')."\">";
if (LOG_DESTINATION == "sql") { if (LOG_DESTINATION == "sql") {

View File

@ -1437,6 +1437,13 @@ body.ttrss_prefs .dijitTree#labelTree .dijitTreeIcon,
body.ttrss_prefs .dijitTree#filterTree .dijitTreeIcon { body.ttrss_prefs .dijitTree#filterTree .dijitTreeIcon {
display: none; display: none;
} }
body.ttrss_prefs .dijitAccordionTitle i.material-icons {
top: -1px;
position: relative;
}
body.ttrss_prefs .dijitAccordionTitleSelected i.material-icons {
color: white;
}
body.ttrss_prefs #pref-filter-wrap, body.ttrss_prefs #pref-filter-wrap,
body.ttrss_prefs #pref-filter-header, body.ttrss_prefs #pref-filter-header,
body.ttrss_prefs #pref-filter-content, body.ttrss_prefs #pref-filter-content,

File diff suppressed because one or more lines are too long

View File

@ -38,6 +38,15 @@ body.ttrss_prefs {
display : none; display : none;
} }
.dijitAccordionTitle i.material-icons {
top : -1px;
position : relative;
}
.dijitAccordionTitleSelected i.material-icons {
color : white;
}
/* div#pref-tabs .dijitContentPane { /* div#pref-tabs .dijitContentPane {
font-size : 14px; font-size : 14px;
} */ } */

View File

@ -46,7 +46,8 @@ class Af_Comics extends Plugin {
function hook_prefs_tab($args) { function hook_prefs_tab($args) {
if ($args != "prefFeeds") return; if ($args != "prefFeeds") return;
print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Feeds supported by af_comics')."\">"; print "<div dojoType=\"dijit.layout.AccordionPane\"
title=\"<i class='material-icons'>photo</i> ".__('Feeds supported by af_comics')."\">";
print "<p>" . __("The following comics are currently supported:") . "</p>"; print "<p>" . __("The following comics are currently supported:") . "</p>";

View File

@ -121,7 +121,8 @@ class Af_Psql_Trgm extends Plugin {
function hook_prefs_tab($args) { function hook_prefs_tab($args) {
if ($args != "prefFeeds") return; if ($args != "prefFeeds") return;
print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Mark similar articles as read')."\">"; print "<div dojoType=\"dijit.layout.AccordionPane\"
title=\"<i class='material-icons'>extension</i> ".__('Mark similar articles as read')."\">";
if (DB_TYPE != "pgsql") { if (DB_TYPE != "pgsql") {
print_error("Database type not supported."); print_error("Database type not supported.");

View File

@ -44,7 +44,8 @@ class Af_Readability extends Plugin {
function hook_prefs_tab($args) { function hook_prefs_tab($args) {
if ($args != "prefFeeds") return; if ($args != "prefFeeds") return;
print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Readability settings (af_readability)')."\">"; print "<div dojoType=\"dijit.layout.AccordionPane\"
title=\"<i class='material-icons'>extension</i> ".__('Readability settings (af_readability)')."\">";
if (version_compare(PHP_VERSION, '5.6.0', '<')) { if (version_compare(PHP_VERSION, '5.6.0', '<')) {
print_error("This plugin requires PHP version 5.6."); print_error("This plugin requires PHP version 5.6.");

View File

@ -27,7 +27,8 @@ class Af_RedditImgur extends Plugin {
function hook_prefs_tab($args) { function hook_prefs_tab($args) {
if ($args != "prefFeeds") return; if ($args != "prefFeeds") return;
print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Reddit content settings (af_redditimgur)')."\">"; print "<div dojoType=\"dijit.layout.AccordionPane\"
title=\"<i class='material-icons'>extension</i> ".__('Reddit content settings (af_redditimgur)')."\">";
$enable_readability = $this->host->get($this, "enable_readability"); $enable_readability = $this->host->get($this, "enable_readability");
$enable_content_dupcheck = $this->host->get($this, "enable_content_dupcheck"); $enable_content_dupcheck = $this->host->get($this, "enable_content_dupcheck");

View File

@ -205,7 +205,8 @@ class Af_Zz_ImgProxy extends Plugin {
function hook_prefs_tab($args) { function hook_prefs_tab($args) {
if ($args != "prefFeeds") return; if ($args != "prefFeeds") return;
print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Image proxy settings (af_zz_imgproxy)')."\">"; print "<div dojoType=\"dijit.layout.AccordionPane\"
title=\"<i class='material-icons'>extension</i> ".__('Image proxy settings (af_zz_imgproxy)')."\">";
print "<form dojoType=\"dijit.form.Form\">"; print "<form dojoType=\"dijit.form.Form\">";

View File

@ -17,7 +17,8 @@ class Bookmarklets extends Plugin {
function hook_prefs_tab($args) { function hook_prefs_tab($args) {
if ($args == "prefFeeds") { if ($args == "prefFeeds") {
print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Bookmarklets')."\">"; print "<div dojoType=\"dijit.layout.AccordionPane\"
title=\"<i class='material-icons'>bookmark</i> ".__('Bookmarklets')."\">";
print __("Drag the link below to your browser toolbar, open the feed you're interested in in your browser and click on the link to subscribe to it."); print __("Drag the link below to your browser toolbar, open the feed you're interested in in your browser and click on the link to subscribe to it.");

View File

@ -50,7 +50,8 @@ class Import_Export extends Plugin implements IHandler {
function hook_prefs_tab($args) { function hook_prefs_tab($args) {
if ($args != "prefFeeds") return; if ($args != "prefFeeds") return;
print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Import and export')."\">"; print "<div dojoType=\"dijit.layout.AccordionPane\"
title=\"<i class='material-icons'>import_export</i> ".__('Import and export')."\">";
print_notice(__("You can export and import your Starred and Archived articles for safekeeping or when migrating between tt-rss instances of same version.")); print_notice(__("You can export and import your Starred and Archived articles for safekeeping or when migrating between tt-rss instances of same version."));

View File

@ -32,7 +32,8 @@ class Mail extends Plugin {
function hook_prefs_tab($args) { function hook_prefs_tab($args) {
if ($args != "prefPrefs") return; if ($args != "prefPrefs") return;
print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Mail plugin')."\">"; print "<div dojoType=\"dijit.layout.AccordionPane\"
title=\"<i class='material-icons'>mail</i> ".__('Mail plugin')."\">";
print "<p>" . __("You can set predefined email addressed here (comma-separated list):") . "</p>"; print "<p>" . __("You can set predefined email addressed here (comma-separated list):") . "</p>";

View File

@ -49,7 +49,8 @@ class NSFW extends Plugin {
function hook_prefs_tab($args) { function hook_prefs_tab($args) {
if ($args != "prefPrefs") return; if ($args != "prefPrefs") return;
print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__("NSFW Plugin")."\">"; print "<div dojoType=\"dijit.layout.AccordionPane\"
title=\"<i class='material-icons'>extension</i> ".__("NSFW Plugin")."\">";
print "<br/>"; print "<br/>";

View File

@ -1437,6 +1437,13 @@ body.ttrss_prefs .dijitTree#labelTree .dijitTreeIcon,
body.ttrss_prefs .dijitTree#filterTree .dijitTreeIcon { body.ttrss_prefs .dijitTree#filterTree .dijitTreeIcon {
display: none; display: none;
} }
body.ttrss_prefs .dijitAccordionTitle i.material-icons {
top: -1px;
position: relative;
}
body.ttrss_prefs .dijitAccordionTitleSelected i.material-icons {
color: white;
}
body.ttrss_prefs #pref-filter-wrap, body.ttrss_prefs #pref-filter-wrap,
body.ttrss_prefs #pref-filter-header, body.ttrss_prefs #pref-filter-header,
body.ttrss_prefs #pref-filter-content, body.ttrss_prefs #pref-filter-content,

File diff suppressed because one or more lines are too long