diff --git a/backend.php b/backend.php index 378b645f8..6937a9af4 100644 --- a/backend.php +++ b/backend.php @@ -1315,6 +1315,19 @@ } + if ($op == "dlg") { + $id = $_GET["id"]; + + if ($id == "quickAddFeed") { + print "Feed URL: + + "; + } + } + db_close($link); ?> diff --git a/functions.js b/functions.js index fe77163cb..baee89558 100644 --- a/functions.js +++ b/functions.js @@ -396,8 +396,3 @@ function popupHelp(tid) { } } -function cancelDialog(sender) { - - sender.offsetParent.style.display = "none"; - -} diff --git a/tt-rss.css b/tt-rss.css index d72ccf949..b2b5dc2f4 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -388,7 +388,7 @@ pre { background : #f0f0f0; } -#qafDialog { +#userDlg { left : 400px; top : 18px; background : #fffff0; diff --git a/tt-rss.js b/tt-rss.js index 664e5c8a5..c49a52c13 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -49,15 +49,20 @@ function toggleTags() { } function qaf_add_callback() { - var container = document.getElementById('feeds'); if (xmlhttp.readyState == 4) { updateFeedList(false, false); - var qafDialog = document.getElementById("qafDialog"); - qafDialog.style.display = "none"; - + closeDlg(); } } +function dialog_refresh_callback() { + if (xmlhttp.readyState == 4) { + var dlg = document.getElementById("userDlg"); + + dlg.innerHTML = xmlhttp.responseText; + dlg.style.display = "block"; + } +} function refetch_callback() { if (xmlhttp.readyState == 4) { @@ -428,8 +433,7 @@ function quickMenuGo() { } if (opname == "Add new feed") { - var qafDialog = document.getElementById("qafDialog"); - qafDialog.style.display = "block"; + displayDlg("quickAddFeed"); } } @@ -459,6 +463,19 @@ function qafAdd() { link.value = ""; } +} +function displayDlg(id) { + + xmlhttp.open("GET", "backend.php?op=dlg&id=" + + param_escape(id), true); + xmlhttp.onreadystatechange=dialog_refresh_callback; + xmlhttp.send(null); } + +function closeDlg() { + var dlg = document.getElementById("userDlg"); + dlg.style.display = "none"; +} + diff --git a/tt-rss.php b/tt-rss.php index cf11e564d..6fc00c556 100644 --- a/tt-rss.php +++ b/tt-rss.php @@ -44,13 +44,8 @@ -