]> git.wh0rd.org - tt-rss.git/blobdiff - classes/pref/prefs.php
add ability to select CSS files in themes/
[tt-rss.git] / classes / pref / prefs.php
index ad5dff4add1e70c1b41cf2697d0a65b28763ec49..2190dc0e7b50486f2dc2a10cb3bcfabb5f599a66 100644 (file)
@@ -113,8 +113,6 @@ class Pref_Prefs extends Handler_Protected {
                        WHERE $profile_qpart AND owner_uid = ".$_SESSION["uid"]);
 
                initialize_user_prefs($this->link, $_SESSION["uid"], $_SESSION["profile"]);
-
-               print "PREFS_THEME_CHANGED";
        }
 
        function index() {
@@ -389,11 +387,7 @@ class Pref_Prefs extends Handler_Protected {
                                parameters: dojo.objectToQuery(this.getValues()),
                                onComplete: function(transport) {
                                        var msg = transport.responseText;
-                                       if (msg.match('PREFS_THEME_CHANGED')) {
-                                               window.location.reload();
-                                       } else {
-                                               notify_info(msg);
-                                       }
+                                       notify_info(msg);
                        } });
                }
                </script>";
@@ -496,6 +490,14 @@ class Pref_Prefs extends Handler_Protected {
                                print "<button dojoType=\"dijit.form.Button\"
                                        onclick=\"customizeCSS()\">" . __('Customize') . "</button>";
 
+                       } else if ($pref_name == "USER_CSS_THEME") {
+
+                               $themes = array_map("basename", glob("themes/*.css"));
+
+                               print_select($pref_name, $value, $themes,
+                                       'dojoType="dijit.form.Select"');
+
+
                        } else if ($pref_name == "DEFAULT_ARTICLE_LIMIT") {
 
                                $limits = array(15, 30, 45, 60);