From 768858f1e3453a4ebbaedde9280d3bc0e5235c03 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 20 Aug 2007 07:02:11 +0100 Subject: [PATCH] fancier label test dialog --- functions.js | 8 ++++++-- modules/pref-labels.php | 2 +- tt-rss.css | 5 +++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/functions.js b/functions.js index 9e21e0d4..b9becec5 100644 --- a/functions.js +++ b/functions.js @@ -1924,7 +1924,11 @@ Position.Center = function(element, parent) { function labeltest_callback() { var container = document.getElementById('label_test_result'); if (xmlhttp.readyState == 4) { + container.innerHTML=xmlhttp.responseText; + if (!Element.visible(container)) { + Effect.SlideDown(container, { duration : 0.5 }); + } notify(""); } } @@ -1932,14 +1936,14 @@ function labeltest_callback() { function labelTest() { var container = document.getElementById('label_test_result'); - container.style.display = "block"; - container.innerHTML = "

Loading, please wait...

"; var form = document.forms['label_edit_form']; var sql_exp = form.sql_exp.value; var description = form.description.value; + notify_progress("Loading, please wait..."); + xmlhttp.open("GET", "backend.php?op=pref-labels&subop=test&expr=" + param_escape(sql_exp) + "&descr=" + param_escape(description), true); diff --git a/modules/pref-labels.php b/modules/pref-labels.php index aa6c4fa6..78a84ac6 100644 --- a/modules/pref-labels.php +++ b/modules/pref-labels.php @@ -103,7 +103,7 @@ error_reporting (DEFAULT_ERROR_LEVEL); if (!$result) { - print "

" . db_last_error($link) . "

"; + print "
" . db_last_error($link) . "
"; print ""; return; } diff --git a/tt-rss.css b/tt-rss.css index 77be649f..511e4f57 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -1032,6 +1032,11 @@ ul.userFeedList { padding :0px; }*/ +div.labelTestError { + margin : 5px 0px 5px 0px; + color : #f04040; +} + ul.labelTestResults { height : 100px; overflow : auto; -- 2.39.5