diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/popup-dialog.php | 24 | ||||
-rw-r--r-- | modules/pref-prefs.php | 6 |
2 files changed, 29 insertions, 1 deletions
diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php index 52b1f94f6..394ee16a0 100644 --- a/modules/popup-dialog.php +++ b/modules/popup-dialog.php @@ -785,6 +785,30 @@ } + if ($id == "customizeCSS") { + + $value = get_pref($link, "USER_STYLESHEET"); + + print T_sprintf("You can override colors, fonts and layout of your currently selected theme with custom CSS declarations here. <a target=\"_blank\" class=\"visibleLink\" href=\"%s\">This file</a> can be used as a baseline.", "tt-rss.css"); + + print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">"; + print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"setpref\">"; + print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"key\" value=\"USER_STYLESHEET\">"; + + print "<p><textarea dojoType=\"dijit.form.SimpleTextarea\" + style='font-size : 12px; width : 100%; height: 200px;' + placeHolder='body#ttrssMain { font-size : 14px; };' + name='value'>$value</textarea>"; + + print "<div class='dlgButtons'>"; + print "<button dojoType=\"dijit.form.Button\" + onclick=\"dijit.byId('cssEditDlg').execute()\">".__('Save')."</button> "; + print "<button dojoType=\"dijit.form.Button\" + onclick=\"dijit.byId('cssEditDlg').hide()\">".__('Cancel')."</button>"; + print "</div>"; + + } + print "</dlg>"; } ?> diff --git a/modules/pref-prefs.php b/modules/pref-prefs.php index 5bc180de4..359359733 100644 --- a/modules/pref-prefs.php +++ b/modules/pref-prefs.php @@ -16,7 +16,7 @@ $prefs_blacklist = array("HIDE_FEEDLIST", "SYNC_COUNTERS", "ENABLE_LABELS", "ENABLE_SEARCH_TOOLBAR", "HIDE_READ_FEEDS", "ENABLE_FEED_ICONS", "ENABLE_OFFLINE_READING", "EXTENDED_FEEDLIST", "FEEDS_SORT_BY_UNREAD", - "OPEN_LINKS_IN_NEW_WINDOW"); + "OPEN_LINKS_IN_NEW_WINDOW", "USER_STYLESHEET_URL"); $profile_blacklist = array("ALLOW_DUPLICATE_POSTS", "PURGE_OLD_DAYS", "PURGE_UNREAD_ARTICLES", "DIGEST_ENABLE", "DIGEST_CATCHUP", @@ -419,6 +419,10 @@ $timezones = explode("\n", file_get_contents("lib/timezones.txt")); print_select($pref_name, $value, $timezones, 'dojoType="dijit.form.FilteringSelect"'); + } else if ($pref_name == "USER_STYLESHEET") { + + print "<button dojoType=\"dijit.form.Button\" + onclick=\"customizeCSS()\">" . __('Customize') . "</button>"; } else if ($pref_name == "DEFAULT_UPDATE_INTERVAL") { |