From: Adrian Lang Date: Wed, 6 Jan 2010 11:17:28 +0000 (+0100) Subject: Add callback to Popups, focus subscribe URL input. X-Git-Tag: 1.4.0~70 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=542aebacb73d9fe571048d01d9ffc12d4bca1643;p=tt-rss.git Add callback to Popups, focus subscribe URL input. --- diff --git a/functions.js b/functions.js index 1e167c94..a5d803c9 100644 --- a/functions.js +++ b/functions.js @@ -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(""); diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php index e75d8a9a..a035cfe9 100644 --- a/modules/popup-dialog.php +++ b/modules/popup-dialog.php @@ -101,7 +101,7 @@ print ""; + name=\"feed_url\" id=\"feed_url\">"; print "
"; diff --git a/tt-rss.js b/tt-rss.js index aeb63eb0..fefbf963 100644 --- 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; } diff --git a/viewfeed.js b/viewfeed.js index ad7e1455..d2425d99 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -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" }); + }); }