mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-22 08:41:29 +00:00
rework filter dialogs to use dijit.Form
This commit is contained in:
40
prefs.js
40
prefs.js
@@ -288,27 +288,31 @@ function editUser(id, event) {
|
||||
}
|
||||
|
||||
function editFilter(id, event) {
|
||||
|
||||
try {
|
||||
|
||||
if (!event || !event.ctrlKey) {
|
||||
var query = "backend.php?op=pref-filters&subop=edit&id=" + param_escape(id);
|
||||
|
||||
notify_progress("Loading, please wait...", true);
|
||||
if (dijit.byId("filterEditDlg"))
|
||||
dijit.byId("filterEditDlg").destroyRecursive();
|
||||
|
||||
dialog = new dijit.Dialog({
|
||||
id: "filterEditDlg",
|
||||
title: __("Edit Filter"),
|
||||
style: "width: 600px",
|
||||
execute: function() {
|
||||
if (this.validate()) {
|
||||
this.hide();
|
||||
new Ajax.Request("backend.php", {
|
||||
parameters: dojo.objectToQuery(this.attr('value')),
|
||||
onComplete: function(transport) {
|
||||
updateFilterList();
|
||||
}});
|
||||
}
|
||||
},
|
||||
href: query});
|
||||
|
||||
dialog.show();
|
||||
|
||||
var query = "?op=pref-filters&subop=edit&id=" +
|
||||
param_escape(id);
|
||||
|
||||
new Ajax.Request("backend.php", {
|
||||
parameters: query,
|
||||
onComplete: function(transport) {
|
||||
infobox_callback2(transport);
|
||||
document.forms['filter_edit_form'].reg_exp.focus();
|
||||
} });
|
||||
} else if (event.ctrlKey) {
|
||||
var cb = $('FICHK-' + id);
|
||||
cb.checked = !cb.checked;
|
||||
toggleSelectRow(cb);
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
exception_error("editFilter", e);
|
||||
@@ -1099,6 +1103,8 @@ function init() {
|
||||
dojo.require("dijit.layout.ContentPane");
|
||||
dojo.require("dijit.Dialog");
|
||||
dojo.require("dijit.form.Button");
|
||||
dojo.require("dijit.form.Select");
|
||||
dojo.require("dijit.form.FilteringSelect");
|
||||
dojo.require("dijit.form.TextBox");
|
||||
dojo.require("dijit.form.ValidationTextBox");
|
||||
dojo.require("dijit.form.RadioButton");
|
||||
|
||||
Reference in New Issue
Block a user