WHERE $profile_qpart AND owner_uid = ".$_SESSION["uid"]);
initialize_user_prefs($this->link, $_SESSION["uid"], $_SESSION["profile"]);
-
- print "PREFS_THEME_CHANGED";
}
function index() {
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>";
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);
<?php
define('EXPECTED_CONFIG_VERSION', 26);
- define('SCHEMA_VERSION', 109);
+ define('SCHEMA_VERSION', 110);
define('LABEL_BASE_INDEX', -1024);
define('PLUGIN_FEED_BASE_INDEX', -128);
<?php echo stylesheet_tag("tt-rss.css"); ?>
<?php echo stylesheet_tag("cdm.css"); ?>
+ <?php if ($_SESSION["uid"]) {
+ $theme = get_pref($link, "USER_CSS_THEME", $_SESSION["uid"], false);
+ if ($theme) {
+ echo stylesheet_tag("themes/$theme");
+ }
+ }
+ ?>
+
<?php print_user_stylesheet($link) ?>
<style type="text/css">
<?php echo stylesheet_tag("tt-rss.css"); ?>
<?php echo stylesheet_tag("prefs.css"); ?>
+ <?php if ($_SESSION["uid"]) {
+ $theme = get_pref($link, "USER_CSS_THEME", $_SESSION["uid"], false);
+ if ($theme) {
+ echo stylesheet_tag("themes/$theme");
+ }
+ }
+ ?>
+
<?php print_user_stylesheet($link) ?>
<link rel="shortcut icon" type="image/png" href="images/favicon.png"/>
create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
-insert into ttrss_version values (109);
+insert into ttrss_version values (110);
create table ttrss_enclosures (id integer primary key auto_increment,
content_url text not null,
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_REVERSE_HEADLINES', 1, 'false', '', 1);
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('USER_CSS_THEME', 2, '', 'Select theme', 2, 'Select one of the available CSS themes');
+
update ttrss_prefs set access_level = 1 where pref_name in ('ON_CATCHUP_SHOW_NEXT_FEED',
'SORT_HEADLINES_BY_FEED_DATE',
'VFEED_GROUP_BY_FEED',
create table ttrss_version (schema_version int not null);
-insert into ttrss_version values (109);
+insert into ttrss_version values (110);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_REVERSE_HEADLINES', 1, 'false', '', 1);
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('USER_CSS_THEME', 2, '', 'Select theme', 2, 'Select one of the available CSS themes');
+
update ttrss_prefs set access_level = 1 where pref_name in ('ON_CATCHUP_SHOW_NEXT_FEED',
'SORT_HEADLINES_BY_FEED_DATE',
'VFEED_GROUP_BY_FEED',
--- /dev/null
+begin;
+
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('USER_CSS_THEME', 2, '', 'Select theme', 2, 'Select one of the available CSS themes');
+
+update ttrss_version set schema_version = 110;
+
+commit;
--- /dev/null
+begin;
+
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('USER_CSS_THEME', 2, '', 'Select theme', 2, 'Select one of the available CSS themes');
+
+update ttrss_version set schema_version = 110;
+
+commit;
div.warning img, div.notice img, div.error img {
margin-right : 4px;
+ float : left;
vertical-align : middle;
}