mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 01:55:55 +00:00
allow to edit labels from main interface
This commit is contained in:
28
functions.js
28
functions.js
@@ -1921,3 +1921,31 @@ Position.Center = function(element, parent) {
|
||||
element.style.left = (pw/2) - (w/2) - Position.deltaX + "px";
|
||||
}
|
||||
|
||||
function labeltest_callback() {
|
||||
var container = document.getElementById('label_test_result');
|
||||
if (xmlhttp.readyState == 4) {
|
||||
container.innerHTML=xmlhttp.responseText;
|
||||
notify("");
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
xmlhttp.open("GET", "backend.php?op=pref-labels&subop=test&expr=" +
|
||||
param_escape(sql_exp) + "&descr=" + param_escape(description), true);
|
||||
|
||||
xmlhttp.onreadystatechange=labeltest_callback;
|
||||
xmlhttp.send(null);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user