1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 07:35:56 +00:00

refactor tags dialog

This commit is contained in:
Andrew Dolgov
2010-11-23 13:26:02 +03:00
parent 8cd576a12a
commit 8386f8614b
6 changed files with 62 additions and 144 deletions

View File

@@ -41,10 +41,6 @@ function exception_error(location, e, ext_info) {
content += "<div><b>Stack trace:</b></div>" +
"<textarea readonly=\"1\">" + e.stack + "</textarea>";
// content += "<div style='text-align : center'>" +
// "<button onclick=\"closeInfoBox()\">" +
// "Close this window" + "</button></div>";
content += "</div>";
// TODO: add code to automatically report errors to tt-rss.org
@@ -490,62 +486,6 @@ function infobox_callback2(transport) {
}
}
function createFilter() {
try {
var form = document.forms['filter_add_form'];
var reg_exp = form.reg_exp.value;
if (reg_exp == "") {
alert(__("Can't add filter: nothing to match on."));
return false;
}
var query = "?op=rpc&subop=verifyRegexp&reg_exp=" + param_escape(reg_exp);
notify_progress("Verifying regular expression...");
new Ajax.Request("backend.php", {
parameters: query,
onComplete: function(transport) {
handle_rpc_reply(transport);
var response = transport.responseXML;
if (response) {
var s = response.getElementsByTagName("status")[0].firstChild.nodeValue;
notify('');
if (s == "INVALID") {
alert("Match regular expression seems to be invalid.");
return;
} else {
var query = Form.serialize("filter_add_form");
// we can be called from some other tab in Prefs
if (typeof active_tab != 'undefined' && active_tab) {
active_tab = "filterConfig";
}
new Ajax.Request("backend.php?" + query, {
onComplete: function (transport) {
infobox_submit_callback2(transport);
} });
return true;
}
}
} });
} catch (e) {
exception_error("createFilter", e);
}
}
function filterCR(e, f)
{
var key;