save active tab in prefs, fix schema
This commit is contained in:
parent
87b9fb6532
commit
fe8d205964
|
@ -2223,6 +2223,9 @@
|
||||||
print "<param key=\"default_view_limit\" value=\"" .
|
print "<param key=\"default_view_limit\" value=\"" .
|
||||||
sprintf("%d", get_pref($link, "_DEFAULT_VIEW_LIMIT")) . "\"/>";
|
sprintf("%d", get_pref($link, "_DEFAULT_VIEW_LIMIT")) . "\"/>";
|
||||||
|
|
||||||
|
print "<param key=\"prefs_active_tab\" value=\"" .
|
||||||
|
get_pref($link, "_PREFS_ACTIVE_TAB") . "\"/>";
|
||||||
|
|
||||||
print "</init-params>";
|
print "</init-params>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,8 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_pref($link, "_PREFS_ACTIVE_TAB", "feedBrowser");
|
||||||
|
|
||||||
print "<div>".__('This panel shows feeds subscribed by other users of this system, just in case you are interested in them too.')."</div>";
|
print "<div>".__('This panel shows feeds subscribed by other users of this system, just in case you are interested in them too.')."</div>";
|
||||||
|
|
||||||
$limit = db_escape_string($_GET["limit"]);
|
$limit = db_escape_string($_GET["limit"]);
|
||||||
|
|
|
@ -589,6 +589,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_pref($link, "_PREFS_ACTIVE_TAB", "feedConfig");
|
||||||
|
|
||||||
print "<div class=\"prefGenericAddBox\">
|
print "<div class=\"prefGenericAddBox\">
|
||||||
<input id=\"fadd_cat\"
|
<input id=\"fadd_cat\"
|
||||||
onkeypress=\"return filterCR(event, addFeedCat)\"
|
onkeypress=\"return filterCR(event, addFeedCat)\"
|
||||||
|
|
|
@ -199,6 +199,8 @@
|
||||||
|
|
||||||
if ($quiet) return;
|
if ($quiet) return;
|
||||||
|
|
||||||
|
set_pref($link, "_PREFS_ACTIVE_TAB", "filterConfig");
|
||||||
|
|
||||||
$sort = db_escape_string($_GET["sort"]);
|
$sort = db_escape_string($_GET["sort"]);
|
||||||
|
|
||||||
if (!$sort || $sort == "undefined") {
|
if (!$sort || $sort == "undefined") {
|
||||||
|
|
|
@ -192,6 +192,8 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_pref($link, "_PREFS_ACTIVE_TAB", "labelConfig");
|
||||||
|
|
||||||
$sort = db_escape_string($_GET["sort"]);
|
$sort = db_escape_string($_GET["sort"]);
|
||||||
|
|
||||||
if (!$sort || $sort == "undefined") {
|
if (!$sort || $sort == "undefined") {
|
||||||
|
|
|
@ -173,6 +173,8 @@
|
||||||
|
|
||||||
// print check_for_update($link);
|
// print check_for_update($link);
|
||||||
|
|
||||||
|
set_pref($link, "_PREFS_ACTIVE_TAB", "genConfig");
|
||||||
|
|
||||||
if (!SINGLE_USER_MODE) {
|
if (!SINGLE_USER_MODE) {
|
||||||
|
|
||||||
$result = db_query($link, "SELECT id,email FROM ttrss_users
|
$result = db_query($link, "SELECT id,email FROM ttrss_users
|
||||||
|
|
|
@ -174,6 +174,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_pref($link, "_PREFS_ACTIVE_TAB", "userConfig");
|
||||||
|
|
||||||
$sort = db_escape_string($_GET["sort"]);
|
$sort = db_escape_string($_GET["sort"]);
|
||||||
|
|
||||||
if (!$sort || $sort == "undefined") {
|
if (!$sort || $sort == "undefined") {
|
||||||
|
|
2
prefs.js
2
prefs.js
|
@ -1298,7 +1298,7 @@ function init_second_stage() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
active_tab = getInitParam("prefs_active_tab");
|
active_tab = getInitParam("prefs_active_tab");
|
||||||
if (!active_tab) active_tab = "genConfig";
|
if (!active_tab || active_tab == '0') active_tab = "genConfig";
|
||||||
|
|
||||||
document.onkeydown = pref_hotkey_handler;
|
document.onkeydown = pref_hotkey_handler;
|
||||||
|
|
||||||
|
|
|
@ -272,7 +272,7 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu
|
||||||
|
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_VIEW_LIMIT', 3, '30', '', 1);
|
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_VIEW_LIMIT', 3, '30', '', 1);
|
||||||
|
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_ACTIVE_TAB', 3, '', '', 1);
|
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_ACTIVE_TAB', 2, '', '', 1);
|
||||||
|
|
||||||
create table ttrss_user_prefs (
|
create table ttrss_user_prefs (
|
||||||
owner_uid integer not null,
|
owner_uid integer not null,
|
||||||
|
|
|
@ -252,7 +252,7 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu
|
||||||
|
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_VIEW_LIMIT', 3, '30', '', 1);
|
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_VIEW_LIMIT', 3, '30', '', 1);
|
||||||
|
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_ACTIVE_TAB', 3, '', '', 1);
|
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_ACTIVE_TAB', 2, '', '', 1);
|
||||||
|
|
||||||
create table ttrss_user_prefs (
|
create table ttrss_user_prefs (
|
||||||
owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE,
|
owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE,
|
||||||
|
|
Loading…
Reference in New Issue