]> git.wh0rd.org Git - tt-rss.git/commitdiff
Add callback to Popups, focus subscribe URL input.
authorAdrian Lang <mail@adrianlang.de>
Wed, 6 Jan 2010 11:17:28 +0000 (12:17 +0100)
committerAndrew Dolgov <fox@bah.org.ru>
Wed, 13 Jan 2010 08:46:11 +0000 (11:46 +0300)
functions.js
modules/popup-dialog.php
tt-rss.js
viewfeed.js

index 1e167c94f806eff23388e8c29ea66925b0508ef5..a5d803c9fd1c2affd59eb5a69825dfa3dcc7b034 100644 (file)
@@ -1313,7 +1313,7 @@ function closeInfoBox(cleanup) {
 }
 
 
-function displayDlg(id, param) {
+function displayDlg(id, param, callback) {
 
        notify_progress("Loading, please wait...", true);
 
@@ -1326,6 +1326,7 @@ function displayDlg(id, param) {
                parameters: query,
                onComplete: function (transport) {
                        infobox_callback2(transport);
+                       if (callback) callback(transport);
                } });
 
        return false;
@@ -1366,14 +1367,6 @@ function infobox_callback2(transport) {
 
                }
 
-               /* FIXME this needs to be moved out somewhere */
-
-               if ($("tags_choices")) {
-                       new Ajax.Autocompleter('tags_str', 'tags_choices',
-                               "backend.php?op=rpc&subop=completeTags",
-                               { tokens: ',', paramName: "search" });
-               }
-
                disableHotkeys();
 
                notify("");
index e75d8a9ad3044c989c974d1a726f8b83fefd1ed0..a035cfe91142bef7480cb50050b41d07d22b245c 100644 (file)
 
                        print "<input size=\"40\"
                                        onkeypress=\"return filterCR(event, subscribeToFeed)\"
-                                       name=\"feed_url\"></td></tr>";
+                                       name=\"feed_url\" id=\"feed_url\"></td></tr>";
 
                        print "<br/>";
 
index aeb63eb0fa63d4ca77adf54b2601ff9ac1e6bc9e..fefbf963aaa1311ef9f19edfc80f63321d2239be 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -581,7 +581,8 @@ function quickMenuGo(opid) {
                }
        
                if (opid == "qmcAddFeed") {
-                       displayDlg("quickAddFeed");
+                       displayDlg('quickAddFeed', '',
+                                          function () {$('feed_url').focus();});
                        return;
                }
 
index ad7e14553aaf2383778858db9f39236e3e0ed165..d2425d99c8e9e56d44341eb02fb0dc4e9ac53fd5 100644 (file)
@@ -1468,7 +1468,12 @@ function catchupSelection() {
 }
 
 function editArticleTags(id, feed_id, cdm_enabled) {
-       displayDlg('editArticleTags', id);
+       displayDlg('editArticleTags', id,
+                          function () {
+                                  new Ajax.Autocompleter('tags_str', 'tags_choices',
+                                          "backend.php?op=rpc&subop=completeTags",
+                                          { tokens: ',', paramName: "search" });
+                          });
 }