]> git.wh0rd.org Git - tt-rss.git/commitdiff
batch feed editor: UI cleanup
authorAndrew Dolgov <fox@madoka.spb.ru>
Thu, 11 Sep 2008 06:52:19 +0000 (07:52 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Thu, 11 Sep 2008 06:52:19 +0000 (07:52 +0100)
modules/pref-feeds.php
prefs.js

index 24996eea9c4bc9376f1a01569ae6c4605978f87d..f4094241ea487b1b80f6fdaf9bb17e9b8f52c036 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
        function batch_edit_cbox($elem, $label = false) {
-               print "<input type=\"checkbox\" 
+               print "<input type=\"checkbox\" title=\"".__("Check to enable field")."\"
                        onchange=\"batchFeedsToggleField(this, '$elem', '$label')\">";
        }
 
                                        if ($qpart) {
                                                print(
                                                        "UPDATE ttrss_feeds SET $qpart WHERE id IN ($feed_ids)
-                                                               AND owner_uid = " . $_SESSION["uid"]);
+                                                       AND owner_uid = " . $_SESSION["uid"]);
+                                               print "<br/>";
                                        }
                                }
 
                                <option disabled>--------</option>
                                <option style=\"color : #5050aa\" disabled>".__('Selection:')."</option>
                                <option value=\"facEdit\">&nbsp;&nbsp;".__('Edit')."</option>
-                               <option value=\"facBatchEdit\">&nbsp;&nbsp;".__('Edit multiple feeds')."</option>
                                <option value=\"facPurge\">&nbsp;&nbsp;".__('Manual purge')."</option>
                                <option value=\"facClear\">&nbsp;&nbsp;".__('Clear feed data')."</option>
                                <option value=\"facRescore\">&nbsp;&nbsp;".__('Rescore articles')."</option>
index 2f8ca4c3be35a477101ad42f0a99e75ae3fd3f9b..4f315297ce5f9766635163729053d025f029581d 100644 (file)
--- 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";
                        }