]> git.wh0rd.org Git - tt-rss.git/commitdiff
more input focusing improvements in popup dialogs
authorAndrew Dolgov <fox@bah.org.ru>
Wed, 3 Feb 2010 13:54:17 +0000 (16:54 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Wed, 3 Feb 2010 13:54:17 +0000 (16:54 +0300)
functions.js
modules/pref-feeds.php
modules/pref-filters.php
prefs.js
tt-rss.js

index 6ca221acef714163cc27d94da1950f2dd91e1133..3baaffa3aededdf32c762ef6039db8ba237f9196 100644 (file)
@@ -2147,3 +2147,12 @@ function addLabel() {
        }
 }
 
+function quickAddFeed() {
+       displayDlg('quickAddFeed', '',
+          function () {$('feed_url').focus();});
+}
+
+function quickAddFilter() {
+       displayDlg('quickAddFilter', '',
+          function () {document.forms['filter_add_form'].reg_exp.focus();});
+}
index 59159733798c4924b2da5057ae9c582c6d03be48..0ffecf1161d7b835ac4843b3f33967837f30b107 100644 (file)
                                __('Search')."</button>
                        </div>";
                
-               print "<button onclick=\"javascript:displayDlg('quickAddFeed')\">"
+               print "<button onclick=\"quickAddFeed()\">"
                        .__('Subscribe to feed')."</button> ";
 
-               print "<button onclick=\"javascript:editSelectedFeed()\">".
+               print "<button onclick=\"editSelectedFeed()\">".
                        __('Edit feeds')."</button> ";
 
                if (get_pref($link, 'ENABLE_FEED_CATS')) {
index 5c71fcb03f8d6b90e2742b4e32a5dc444b308a88..f3ca8e4cb4557f37c8f08bd016dd809143ead544 100644 (file)
                        <img style='vertical-align : top;' src='".theme_image($link, "images/sign_quest.png")."'></a>
                </div>";
 
-               print "<button onclick=\"return displayDlg('quickAddFilter', false)\">".
+               print "<button onclick=\"return quickAddFilter()\">".
                        __('Create filter')."</button> "; 
 
                print "<button onclick=\"return editSelectedFilter()\">".
index 018c6234576475b5ff67b69ce90d26bbd91ce2fe..3212d0066ceb161b08681164101ad23b25740593 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -400,6 +400,7 @@ function editFeed(feed) {
                        parameters: query,
                        onComplete: function(transport) {
                                        infobox_callback2(transport);
+                                       document.forms["edit_feed_form"].title.focus();
                                } });
 
        } catch (e) {
@@ -1446,20 +1447,15 @@ function pref_hotkey_handler(e) {
                        hotkey_prefix = false;
 
                        if (keycode == 70) { // f
-                               displayDlg("quickAddFilter");
+                               quickAddFilter();
                                return false;
                        }
 
                        if (keycode == 83) { // s
-                               displayDlg("quickAddFeed");
+                               quickAddFeed();
                                return false;
                        }
 
-/*                     if (keycode == 76) { // l
-                               displayDlg("quickAddLabel");
-                               return false;
-                       } */
-
                        if (keycode == 85) { // u
                                // no-op
                        }
index 5d62fb25be081416461411d42eda56e48d16f6c3..233de669a7a4dc3fe44bd56551735b8afa75fa1f 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -534,8 +534,7 @@ function quickMenuGo(opid) {
                }
        
                if (opid == "qmcAddFeed") {
-                       displayDlg('quickAddFeed', '',
-                                          function () {$('feed_url').focus();});
+                       quickAddFeed();
                        return;
                }
 
@@ -791,6 +790,7 @@ function editFeedDlg(feed) {
                        parameters: query,
                        onComplete: function(transport) { 
                                infobox_callback2(transport); 
+                               document.forms["edit_feed_form"].title.focus();
                        } });
 
        } catch (e) {
@@ -1236,9 +1236,7 @@ function hotkey_handler(e) {
                        }
 
                        if (keycode == 83) { // s
-                               displayDlg('quickAddFeed', '',
-                                          function () {$('feed_url').focus();});
-
+                               quickAddFeed();
                                return false;
                        }