]> git.wh0rd.org Git - tt-rss.git/commitdiff
prefs: reorganize toolbar buttons
authorAndrew Dolgov <fox@bah.org.ru>
Mon, 11 Jan 2010 15:43:53 +0000 (18:43 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Mon, 11 Jan 2010 15:43:53 +0000 (18:43 +0300)
modules/pref-feeds.php
modules/pref-filters.php
modules/pref-labels.php
modules/pref-users.php
prefs.js

index 5330a4ffaa8ac3b07c87f08f2ddce33061805668..86c7c9ebcf149a7cefabe861a41198942da60087 100644 (file)
                
                print "<input onclick=\"javascript:displayDlg('quickAddFeed')\"
                        type=\"submit\" id=\"subscribe_to_feed_btn\" 
-                       class=\"button\" value=\"".__('Subscribe to feed')."\">"; 
+                       class=\"button\" value=\"".__('Subscribe to feed')."\"> ";
+
+               print "<input onclick=\"javascript:editSelectedFeed()\"
+                       type=\"submit\"
+                       class=\"button\" value=\"".__('Edit feeds')."\"> ";
+
+               if (get_pref($link, 'ENABLE_FEED_CATS')) {
+
+                       print "<input onclick=\"javascript:editFeedCats()\"
+                               type=\"submit\"
+                               class=\"button\" value=\"".__('Edit categories')."\"> ";
+               }
+
+               print "<input onclick=\"javascript:removeSelectedFeeds()\"
+                       type=\"submit\"
+                       class=\"button\" value=\"".__('Unsubscribe')."\"> ";
+
+/*             print "<select id=\"feedActionChooser\" onchange=\"feedActionChange()\">
+                       <option value=\"facDefault\" selected>".__('Other actions...')."</option>";
+
+               if (FORCE_ARTICLE_PURGE == 0) {
+                       print 
+                               "<option value=\"facPurge\">".__('Manual purge')."</option>";
+               }
+
+               print "
+                       <option value=\"facClear\">".__('Clear feed data')."</option>
+                       <option value=\"facRescore\">".__('Rescore articles')."</option>
+                       <option value=\"facUnsubscribe\">".__('Unsubscribe')."</option>";
+
+               print "</select>"; */
 
 /*             if (ENABLE_FEED_BROWSER && !SINGLE_USER_MODE) {
                        print " <input type=\"submit\" class=\"button\"
 
                        print "<p>";
 
-                       print "<div id=\"feedOpToolbar\">";
+/*                     print "<div id=\"feedOpToolbar\">";
 
                        if (get_pref($link, 'ENABLE_FEED_CATS')) {
 
                                        __('Recategorize')."\">";
                        }
                                
-                       print "</div>";
-
-                       print "<select id=\"feedActionChooser\" onchange=\"feedActionChange()\">
-                               <option value=\"facDefault\" selected>".__('Actions...')."</option>
-                               <optgroup label=\"".__('Selection:')."\">
-                               <option value=\"facEdit\">".__('Edit')."</option>";
+                       print "</div>"; */
 
-                       if (FORCE_ARTICLE_PURGE == 0) {
-                               print 
-                                       "<option value=\"facPurge\">".__('Manual purge')."</option>";
-                       }
-
-                       print "
-                               <option value=\"facClear\">".__('Clear feed data')."</option>
-                               <option value=\"facRescore\">".__('Rescore articles')."</option>
-                               <option value=\"facUnsubscribe\">".__('Unsubscribe')."</option>";
-
-                       print "</optgroup>";
-
-                               if (get_pref($link, 'ENABLE_FEED_CATS')) {
-
-                                       print "<optgroup label=\"".__('Other:')."\">
-                                               <option value=\"facEditCats\">".__('Edit categories')."
-                                                       </option>
-                                       </optgroup>";
-
-                               }
-
-                       print "</select>";
                } else {
 
                        print "<p>";
index a0760de4e0c6fe155e02c70d4af320882989714e..afa8eb31260cbc5a447b48821718f57095bfc02f 100644 (file)
                                onchange=\"javascript:updateFilterList()\" value=\"$filter_search\">
                        <input type=\"submit\" class=\"button\" 
                        onclick=\"javascript:updateFilterList()\" value=\"".__('Search')."\">
-                       <p<a class='helpLinkPic' href=\"javascript:displayHelpInfobox(2)\">
-                       <img src='images/sign_quest.gif'></a></p>
+                       &nbsp;
+                       <a class='helpLinkPic' href=\"javascript:displayHelpInfobox(2)\">
+                       <img src='images/sign_quest.gif'></a>
                        </div>";
 
 
                        class=\"button\" 
                        onclick=\"return displayDlg('quickAddFilter', false)\" 
                        id=\"create_filter_btn\"
-                       value=\"".__('Create filter')."\">"; 
+                       value=\"".__('Create filter')."\"> "; 
 
-               print "&nbsp;";
+               print "<input type=\"submit\" class=\"button\"
+                       onclick=\"return editSelectedFilter()\" value=\"".__('Edit')."\"> ";
+
+               print "<input type=\"submit\" class=\"button\"
+                               onclick=\"return removeSelectedFilters()\" value=\"".__('Remove')."\"> ";
 
                print "<input type=\"submit\" 
                        class=\"button\" 
                        onclick=\"rescore_all_feeds()\" 
-                       value=\"".__('Rescore articles')."\">"; 
+                       value=\"".__('Rescore articles')."\"> "; 
+
 
                if ($filter_search) {
                        $filter_search = split(' ', db_escape_string($filter_search));
 
                        print "</table>";
 
-                       print "<p id=\"filterOpToolbar\">";
-
-                       print "<input type=\"submit\" class=\"button\" disabled=\"true\"
-                                       onclick=\"return editSelectedFilter()\" value=\"".__('Edit')."\">
-                               <input type=\"submit\" class=\"button\" disabled=\"true\"
-                                       onclick=\"return removeSelectedFilters()\" value=\"".__('Remove')."\">";
-
-                       print "</p>";
-
                } else {
 
                        print "<p>";
index e67cb7e3bcd02d7dafff4f13f4d33e98617ccb9e..a6324c7a2b70fb6128fb8402319d2c30547154a7 100644 (file)
                print"<input type=\"submit\" class=\"button\" 
                        id=\"label_create_btn\"
                        onclick=\"return addLabel()\" 
-                       value=\"".__('Create label')."\"></div>";
+                       value=\"".__('Create label')."\"> ";
+
+                       print "<input type=\"submit\" class=\"button\"
+                               onclick=\"javascript:removeSelectedLabels()\" value=\"".__('Remove')."\">";
+
+                       print "&nbsp;";
+/*                     print "&nbsp;<input type=\"submit\" class=\"button\" disabled=\"true\"
+                               onclick=\"labelColorSet('fg')\" value=\"".__('Fg')."\">&nbsp;";
+                       print "<input type=\"submit\" class=\"button\" disabled=\"true\"
+                               onclick=\"labelColorSet('bg')\" value=\"".__('Bg')."\">&nbsp;"; */
+                       print "<input type=\"submit\" class=\"button\"
+                               onclick=\"labelColorReset()\" value=\"".__('Clear colors')."\">";
+
+
+               print "</div>";
 
                if ($label_search) {
 
 
                        print "</table>";
        
-                       print "<p id=\"labelOpToolbar\">";
-
-                       print "<input type=\"submit\" class=\"button\" disabled=\"true\"
-                               onclick=\"javascript:removeSelectedLabels()\" value=\"".__('Remove')."\">";
-
-                       print "&nbsp;";
-/*                     print "&nbsp;<input type=\"submit\" class=\"button\" disabled=\"true\"
-                               onclick=\"labelColorSet('fg')\" value=\"".__('Fg')."\">&nbsp;";
-                       print "<input type=\"submit\" class=\"button\" disabled=\"true\"
-                               onclick=\"labelColorSet('bg')\" value=\"".__('Bg')."\">&nbsp;"; */
-                       print "<input type=\"submit\" class=\"button\" disabled=\"true\"
-                               onclick=\"labelColorReset()\" value=\"".__('Clear colors')."\">";
-
-                       print "</p>";
 
                } else {
                        print "<p>";
index 6b4df8854e7c72157ff59d77379f97ab1709d685..7c47a3dbf2e08b82bbf134497f2ed9efc49ddd76 100644 (file)
 
                print "<input type=\"submit\" class=\"button\" 
                        id=\"user_add_btn\" 
-                       onclick=\"javascript:addUser()\" value=\"".__('Create user')."\"></div>";
+                       onclick=\"javascript:addUser()\" value=\"".__('Create user')."\">";
+
+               print "                         
+                       <input type=\"submit\" class=\"button\"
+                               onclick=\"javascript:selectedUserDetails()\" value=\"".__('Details')."\">
+                       <input type=\"submit\" class=\"button\"
+                               onclick=\"javascript:editSelectedUser()\" value=\"".__('Edit')."\">
+                       <input type=\"submit\" class=\"button\"
+                               onclick=\"javascript:removeSelectedUsers()\" value=\"".__('Remove')."\">
+                       <input type=\"submit\" class=\"button\"
+                               onclick=\"javascript:resetSelectedUserPass()\" value=\"".__('Reset password')."\">";
+
+               print "</div>";
 
                if ($user_search) {
 
 
                print "</table>";
 
-               print "<p id='userOpToolbar'>";
-
-               print "                         
-                       <input type=\"submit\" class=\"button\" disabled=\"true\"
-                               onclick=\"javascript:selectedUserDetails()\" value=\"".__('User details')."\">
-                       <input type=\"submit\" class=\"button\" disabled=\"true\"
-                               onclick=\"javascript:editSelectedUser()\" value=\"".__('Edit')."\">
-                       <input type=\"submit\" class=\"button\" disabled=\"true\"
-                               onclick=\"javascript:removeSelectedUsers()\" value=\"".__('Remove')."\">
-                       <input type=\"submit\" class=\"button\" disabled=\"true\"
-                               onclick=\"javascript:resetSelectedUserPass()\" value=\"".__('Reset password')."\">";
-
                } else {
                        print "<p>";
                        if (!$user_search) {
index 36665532e315e95597e546a4c02b83a22d5d4b86..8bacbfddb7b532fdb3219d13f46f23989c525030 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -946,8 +946,7 @@ function editSelectedFeed() {
        }
 
        if (rows.length > 1) {
-               alert(__("Please select one feed."));
-               return;
+               return editSelectedFeeds();
        }
 
        notify("");