fancier label test dialog
This commit is contained in:
parent
4adb243072
commit
768858f1e3
3 changed files with 12 additions and 3 deletions
|
@ -1924,7 +1924,11 @@ Position.Center = function(element, parent) {
|
||||||
function labeltest_callback() {
|
function labeltest_callback() {
|
||||||
var container = document.getElementById('label_test_result');
|
var container = document.getElementById('label_test_result');
|
||||||
if (xmlhttp.readyState == 4) {
|
if (xmlhttp.readyState == 4) {
|
||||||
|
|
||||||
container.innerHTML=xmlhttp.responseText;
|
container.innerHTML=xmlhttp.responseText;
|
||||||
|
if (!Element.visible(container)) {
|
||||||
|
Effect.SlideDown(container, { duration : 0.5 });
|
||||||
|
}
|
||||||
notify("");
|
notify("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1932,14 +1936,14 @@ function labeltest_callback() {
|
||||||
function labelTest() {
|
function labelTest() {
|
||||||
|
|
||||||
var container = document.getElementById('label_test_result');
|
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 form = document.forms['label_edit_form'];
|
||||||
|
|
||||||
var sql_exp = form.sql_exp.value;
|
var sql_exp = form.sql_exp.value;
|
||||||
var description = form.description.value;
|
var description = form.description.value;
|
||||||
|
|
||||||
|
notify_progress("Loading, please wait...");
|
||||||
|
|
||||||
xmlhttp.open("GET", "backend.php?op=pref-labels&subop=test&expr=" +
|
xmlhttp.open("GET", "backend.php?op=pref-labels&subop=test&expr=" +
|
||||||
param_escape(sql_exp) + "&descr=" + param_escape(description), true);
|
param_escape(sql_exp) + "&descr=" + param_escape(description), true);
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@
|
||||||
error_reporting (DEFAULT_ERROR_LEVEL);
|
error_reporting (DEFAULT_ERROR_LEVEL);
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
print "<p>" . db_last_error($link) . "</p>";
|
print "<div class=\"labelTestError\">" . db_last_error($link) . "</div>";
|
||||||
print "</div>";
|
print "</div>";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1032,6 +1032,11 @@ ul.userFeedList {
|
||||||
padding :0px;
|
padding :0px;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
div.labelTestError {
|
||||||
|
margin : 5px 0px 5px 0px;
|
||||||
|
color : #f04040;
|
||||||
|
}
|
||||||
|
|
||||||
ul.labelTestResults {
|
ul.labelTestResults {
|
||||||
height : 100px;
|
height : 100px;
|
||||||
overflow : auto;
|
overflow : auto;
|
||||||
|
|
Loading…
Reference in a new issue