]> git.wh0rd.org - tt-rss.git/commitdiff
quick menu: add entry to reorder categories; tweak menu layout
authorAndrew Dolgov <fox@bah.org.ru>
Fri, 6 Aug 2010 12:34:18 +0000 (16:34 +0400)
committerAndrew Dolgov <fox@bah.org.ru>
Fri, 6 Aug 2010 12:34:18 +0000 (16:34 +0400)
tt-rss.js
tt-rss.php

index 4b463cf3b213b1ab35cca54814d0397b43e7b591..36aec2f8f407df7cce866d318c0a5c8d995ea536 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -613,6 +613,18 @@ function quickMenuGo(opid) {
                        resize_headlines();
                }
 
+               if (opid == "qmcToggleReorder") {
+                       feedlist_sortable_enabled = !feedlist_sortable_enabled;
+
+                       if (feedlist_sortable_enabled) {
+                               notify_info("Category reordering enabled");
+                               toggle_sortable_feedlist(true);
+                       } else {
+                               notify_info("Category reordering disabled");
+                               toggle_sortable_feedlist(false);
+                       }
+               }
+
                if (opid == "qmcResetCats") {
 
                        if (confirm(__("Reset category order?"))) {
index 5f63b2e859a4ab8093ceef85ace152f74f92f317..5e8bc1311f25594a5725d9780e7ca6c54ebb5eff 100644 (file)
                                        <option value="qmcCatchupAll"><?php echo __('Mark as read') ?></option>
                                        <option value="qmcShowOnlyUnread"><?php echo __('(Un)hide read feeds') ?></option>
                                        </optgroup>
+                                       <optgroup label="<?php echo __('Categories:') ?>">
+
+                                       <option value="qmcToggleReorder"><?php echo __('Toggle reordering mode') ?></option>
+                                       <option value="qmcResetCats"><?php echo __('Reset order') ?></option>
+                                       </optgroup>
+
                                        <optgroup label="<?php echo __('Other actions:') ?>">
 
                                        <option value="qmcAddLabel"><?php echo __('Create label...') ?></option>
                                        <option value="qmcAddFilter"><?php echo __('Create filter...') ?></option>
                                        <option value="qmcResetUI"><?php echo __('Reset UI layout') ?></option>
-                                       <option value="qmcResetCats"><?php echo __('Reset category order') ?></option>
-                                       <option value="qmcHKhelp"><?php echo __('Keyboard shortcuts') ?></option>
+                                       <option value="qmcHKhelp"><?php echo __('Keyboard shortcuts help') ?></option>
                                        </optgroup>
 
                        </select>