From: Andrew Dolgov Date: Thu, 11 Sep 2008 06:52:19 +0000 (+0100) Subject: batch feed editor: UI cleanup X-Git-Tag: 1.2.27~13 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=cd935c422f3b9a2709a2afd3dcb62cc2ac24e962;p=tt-rss.git batch feed editor: UI cleanup --- diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 24996eea..f4094241 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -1,7 +1,7 @@ "; } @@ -676,7 +676,8 @@ if ($qpart) { print( "UPDATE ttrss_feeds SET $qpart WHERE id IN ($feed_ids) - AND owner_uid = " . $_SESSION["uid"]); + AND owner_uid = " . $_SESSION["uid"]); + print "
"; } } @@ -1352,7 +1353,6 @@ - diff --git a/prefs.js b/prefs.js index 2f8ca4c3..4f315297 100644 --- a/prefs.js +++ b/prefs.js @@ -2101,7 +2101,14 @@ function feedActionChange() { function feedActionGo(op) { try { if (op == "facEdit") { - editSelectedFeed(); + + var rows = getSelectedFeeds(); + + if (rows.length > 1) { + editSelectedFeeds(); + } else { + editSelectedFeed(); + } } if (op == "facClear") { @@ -2124,10 +2131,6 @@ function feedActionGo(op) { removeSelectedFeeds(); } - if (op == "facBatchEdit") { - editSelectedFeeds(); - } - } catch (e) { exception_error("feedActionGo", e); @@ -2250,8 +2253,7 @@ function feedsEditSave() { return } -// var ok = confirm(__("Save changes to selected feeds?")); - var ok = true; + var ok = confirm(__("Save changes to selected feeds?")); if (ok) { @@ -2261,27 +2263,27 @@ function feedsEditSave() { /* Form.serialize ignores unchecked checkboxes */ - if (!query.match("hidden=") && + if (!query.match("&hidden=") && f.hidden.disabled == false) { query = query + "&hidden=false"; } - if (!query.match("rtl_content=") && + if (!query.match("&rtl_content=") && f.rtl_content.disabled == false) { query = query + "&rtl_content=false"; } - if (!query.match("private=") && + if (!query.match("&private=") && f.private.disabled == false) { query = query + "&private=false"; } - if (!query.match("cache_images=") && + if (!query.match("&cache_images=") && f.cache_images.disabled == false) { query = query + "&cache_images=false"; } - if (!query.match("include_in_digest=") && + if (!query.match("&include_in_digest=") && f.include_in_digest.disabled == false) { query = query + "&include_in_digest=false"; }