remove support for hiding empty categories in prefs editor because people are dumb
This commit is contained in:
parent
0e72dbd79e
commit
e5e6cde06a
|
@ -36,8 +36,7 @@ class Pref_Feeds extends Handler_Protected {
|
||||||
|
|
||||||
// first one is set by API
|
// first one is set by API
|
||||||
$show_empty_cats = $_REQUEST['force_show_empty'] ||
|
$show_empty_cats = $_REQUEST['force_show_empty'] ||
|
||||||
($_REQUEST['mode'] != 2 && !$search &&
|
($_REQUEST['mode'] != 2 && !$search);
|
||||||
get_pref('_PREFS_SHOW_EMPTY_CATS'));
|
|
||||||
|
|
||||||
$items = array();
|
$items = array();
|
||||||
|
|
||||||
|
@ -185,8 +184,7 @@ class Pref_Feeds extends Handler_Protected {
|
||||||
|
|
||||||
if ($enable_cats) {
|
if ($enable_cats) {
|
||||||
$show_empty_cats = $_REQUEST['force_show_empty'] ||
|
$show_empty_cats = $_REQUEST['force_show_empty'] ||
|
||||||
($_REQUEST['mode'] != 2 && !$search &&
|
($_REQUEST['mode'] != 2 && !$search);
|
||||||
get_pref('_PREFS_SHOW_EMPTY_CATS'));
|
|
||||||
|
|
||||||
$result = $this->dbh->query("SELECT id, title FROM ttrss_feed_categories
|
$result = $this->dbh->query("SELECT id, title FROM ttrss_feed_categories
|
||||||
WHERE owner_uid = " . $_SESSION["uid"] . " AND parent_cat IS NULL ORDER BY order_id, title");
|
WHERE owner_uid = " . $_SESSION["uid"] . " AND parent_cat IS NULL ORDER BY order_id, title");
|
||||||
|
@ -305,11 +303,6 @@ class Pref_Feeds extends Handler_Protected {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
function togglehiddenfeedcats() {
|
|
||||||
set_pref('_PREFS_SHOW_EMPTY_CATS',
|
|
||||||
(get_pref('_PREFS_SHOW_EMPTY_CATS') ? 'false' : 'true'));
|
|
||||||
}
|
|
||||||
|
|
||||||
private function process_category_order(&$data_map, $item_id, $parent_id = false, $nest_level = 0) {
|
private function process_category_order(&$data_map, $item_id, $parent_id = false, $nest_level = 0) {
|
||||||
$debug = isset($_REQUEST["debug"]);
|
$debug = isset($_REQUEST["debug"]);
|
||||||
|
|
||||||
|
@ -1351,9 +1344,6 @@ class Pref_Feeds extends Handler_Protected {
|
||||||
print $error_button;
|
print $error_button;
|
||||||
print $inactive_button;
|
print $inactive_button;
|
||||||
|
|
||||||
print "<button onclick=\"toggleHiddenFeedCats()\"
|
|
||||||
dojoType=\"dijit.form.Button\">".__('(Un)hide empty categories')."</button>";
|
|
||||||
|
|
||||||
if (defined('_ENABLE_FEED_DEBUGGING')) {
|
if (defined('_ENABLE_FEED_DEBUGGING')) {
|
||||||
|
|
||||||
print "<select id=\"feedActionChooser\" onchange=\"feedActionChange()\">
|
print "<select id=\"feedActionChooser\" onchange=\"feedActionChange()\">
|
||||||
|
|
15
js/prefs.js
15
js/prefs.js
|
@ -1610,21 +1610,6 @@ function resetCatOrder() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleHiddenFeedCats() {
|
|
||||||
try {
|
|
||||||
notify_progress("Loading, please wait...");
|
|
||||||
|
|
||||||
new Ajax.Request("backend.php", {
|
|
||||||
parameters: "?op=pref-feeds&method=togglehiddenfeedcats",
|
|
||||||
onComplete: function(transport) {
|
|
||||||
updateFeedList();
|
|
||||||
} });
|
|
||||||
|
|
||||||
} catch (e) {
|
|
||||||
exception_error("toggleHiddenFeedCats");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function editCat(id, item, event) {
|
function editCat(id, item, event) {
|
||||||
try {
|
try {
|
||||||
var new_name = prompt(__('Rename category to:'), item.name);
|
var new_name = prompt(__('Rename category to:'), item.name);
|
||||||
|
|
Loading…
Reference in New Issue