From 5c1f9f31bdb6418469c3434047c163b4dae8f139 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 5 Mar 2021 15:16:41 +0300 Subject: [PATCH] add a bunch of button icons --- classes/pref/prefs.php | 63 +++++++++++++++++++++++----------------- js/CommonDialogs.js | 12 ++++---- js/CommonFilters.js | 14 ++++----- js/PrefLabelTree.js | 7 ++--- js/PrefUsers.js | 1 + themes/compact.css | 12 ++++---- themes/compact_night.css | 12 ++++---- themes/light.css | 12 ++++---- themes/light/prefs.less | 12 ++++---- themes/night.css | 12 ++++---- themes/night_blue.css | 12 ++++---- 11 files changed, 85 insertions(+), 84 deletions(-) diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index c94e15cfc..eae67fbac 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -301,7 +301,8 @@ class Pref_Prefs extends Handler_Protected {
@@ -396,12 +398,14 @@ class Pref_Prefs extends Handler_Protected {
@@ -507,6 +512,7 @@ class Pref_Prefs extends Handler_Protected {
@@ -623,30 +629,27 @@ class Pref_Prefs extends Handler_Protected { } else if ($pref_name == "USER_CSS_THEME") { - $themes = array_merge(glob("themes/*.php"), glob("themes/*.css"), glob("themes.local/*.css")); - $themes = array_map("basename", $themes); - $themes = array_filter($themes, "theme_exists"); - asort($themes); + $theme_files = array_map("basename", + array_merge(glob("themes/*.php"), + glob("themes/*.css"), + glob("themes.local/*.css"))); - if (!theme_exists($value)) $value = ""; + asort($theme_files); - print ""; + + "Helpers.Prefs.customizeCSS()"]) ?> + "alt-info", "onclick" => "window.open(\"https://tt-rss.org/wiki/Themes\")"]) ?> - print " "; - - print " "; + $is_disabled], "CB_$pref_name"); if ($pref_name == Prefs::DIGEST_ENABLE) { - print \Controls\button_tag(__('Preview'), '', ['onclick' => 'Helpers.Digest.preview()', 'style' => 'margin-left : 10px']); + print \Controls\button_tag(\Controls\icon("info") . " " . __('Preview'), '', + ['onclick' => 'Helpers.Digest.preview()', 'style' => 'margin-left : 10px']); } } else if (in_array($pref_name, ['FRESH_ARTICLE_MAX_AGE', @@ -699,11 +703,11 @@ class Pref_Prefs extends Handler_Protected { $cert_serial = htmlspecialchars(self::_get_ssl_certificate_id()); $has_serial = ($cert_serial) ? true : false; - print \Controls\button_tag(__('Register'), "", [ + print \Controls\button_tag(\Controls\icon("security") . " " . __('Register'), "", [ "disabled" => !$has_serial, "onclick" => "dijit.byId('SSL_CERT_SERIAL').attr('value', '$cert_serial')"]); - print \Controls\button_tag(__('Clear'), "", [ + print \Controls\button_tag(\Controls\icon("clear") . " " . __('Clear'), "", [ "class" => "alt-danger", "onclick" => "dijit.byId('SSL_CERT_SERIAL').attr('value', '')"]); @@ -763,19 +767,21 @@ class Pref_Prefs extends Handler_Protected {
- +
- +
@@ -978,9 +984,12 @@ class Pref_Prefs extends Handler_Protected {
+ = 10) { ?> diff --git a/js/CommonDialogs.js b/js/CommonDialogs.js index a7e793b9c..ea26ee515 100644 --- a/js/CommonDialogs.js +++ b/js/CommonDialogs.js @@ -474,7 +474,7 @@ const CommonDialogs = {
+ style='font-size : 16px; width: 530px' name='title' value="${App.escapeHtml(feed.title)}">
@@ -565,19 +565,21 @@ const CommonDialogs = {
-
${reply.plugin_data}
diff --git a/js/CommonFilters.js b/js/CommonFilters.js index 606cf2076..1450458f8 100644 --- a/js/CommonFilters.js +++ b/js/CommonFilters.js @@ -229,7 +229,7 @@ const Filters = { @@ -313,7 +313,7 @@ const Filters = { "filterDlg_actionParamPlugin")} @@ -511,13 +511,13 @@ const Filters = { diff --git a/js/PrefLabelTree.js b/js/PrefLabelTree.js index 6792413b1..39e3f8315 100644 --- a/js/PrefLabelTree.js +++ b/js/PrefLabelTree.js @@ -69,7 +69,6 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f const dialog = new fox.SingleUseDialog({ id: "labelEditDlg", title: __("Edit label"), - style: "width: 650px", setLabelColor: function (id, fg, bg) { let kind = ''; @@ -121,10 +120,10 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f content: `
-
${__("Caption")}
- ${__("Colors")}
@@ -168,6 +166,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f