]> git.wh0rd.org Git - tt-rss.git/commitdiff
fancier label test dialog
authorAndrew Dolgov <fox@madoka.spb.ru>
Mon, 20 Aug 2007 06:02:11 +0000 (07:02 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Mon, 20 Aug 2007 06:02:11 +0000 (07:02 +0100)
functions.js
modules/pref-labels.php
tt-rss.css

index 9e21e0d4e42658f614c8a96b710780f9e5bdaea8..b9becec5004780b6cc1a7b8e584bdd3b69d2127f 100644 (file)
@@ -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 = "<p>Loading, please wait...</p>";
 
        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);
 
index aa6c4fa60cc67b2d340c1002548797fb1aaa9c79..78a84ac67e58eb4058dc1cca08304ab1f42ae7fc 100644 (file)
                        error_reporting (DEFAULT_ERROR_LEVEL);
 
                        if (!$result) {
-                               print "<p>" . db_last_error($link) . "</p>";
+                               print "<div class=\"labelTestError\">" . db_last_error($link) . "</div>";
                                print "</div>";
                                return;
                        }
index 77be649f73e86f2318dcb99946669d215d9ee6b8..511e4f57463381b7881e84bdac0aea11c6e22003 100644 (file)
@@ -1032,6 +1032,11 @@ ul.userFeedList {
        padding :0px;
 }*/
 
+div.labelTestError {
+       margin : 5px 0px 5px 0px;
+       color : #f04040;
+}
+
 ul.labelTestResults {
        height : 100px;
        overflow : auto;