diff --git a/classes/dlg.php b/classes/dlg.php index 75cbbd74d..36f3ee075 100644 --- a/classes/dlg.php +++ b/classes/dlg.php @@ -383,33 +383,6 @@ class Dlg extends Handler_Protected { } - function customizeCSS() { - $value = get_pref($this->link, "USER_STYLESHEET"); - - $value = str_replace("
", "\n", $value); - - print_notice(T_sprintf("You can override colors, fonts and layout of your currently selected theme with custom CSS declarations here. This file can be used as a baseline.", "tt-rss.css")); - - print ""; - print ""; - print ""; - - print "
"; - print ""; - print "
"; - - print "
"; - print " "; - print ""; - print "
"; - - } - function addInstance() { print ""; print ""; diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index 2190dc0e7..21b25c631 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -2,7 +2,7 @@ class Pref_Prefs extends Handler_Protected { function csrf_ignore($method) { - $csrf_ignored = array("index", "updateself"); + $csrf_ignored = array("index", "updateself", "customizecss"); return array_search($method, $csrf_ignored) !== false; } @@ -870,5 +870,33 @@ class Pref_Prefs extends Handler_Protected { global $pluginhost; $pluginhost->clear_data($pluginhost->get_plugin($name)); } + + function customizeCSS() { + $value = get_pref($this->link, "USER_STYLESHEET"); + + $value = str_replace("
", "\n", $value); + + print_notice(T_sprintf("You can override colors, fonts and layout of your currently selected theme with custom CSS declarations here. This file can be used as a baseline.", "tt-rss.css")); + + print ""; + print ""; + print ""; + + print "
"; + print ""; + print "
"; + + print "
"; + print " "; + print ""; + print "
"; + + } + } ?> diff --git a/js/prefs.js b/js/prefs.js index 26501bec9..678332616 100644 --- a/js/prefs.js +++ b/js/prefs.js @@ -1715,7 +1715,7 @@ function editLabel(id, event) { function customizeCSS() { try { - var query = "backend.php?op=dlg&method=customizeCSS"; + var query = "backend.php?op=pref-prefs&method=customizeCSS"; if (dijit.byId("cssEditDlg")) dijit.byId("cssEditDlg").destroyRecursive();