- new Ajax.Request("backend.php", {
- parameters: query,
- onComplete: function (transport) {
-
- notify("");
-
- const dialog = new dijit.Dialog({
- id: "feedEditDlg",
- title: __("Edit Multiple Feeds"),
- style: "width: 600px",
- getChildByName: function (name) {
- let rv = null;
- this.getChildren().each(
- function (child) {
- if (child.name == name) {
- rv = child;
- return;
- }
- });
- return rv;
- },
- toggleField: function (checkbox, elem, label) {
- this.getChildByName(elem).attr('disabled', !checkbox.checked);
-
- if ($(label))
- if (checkbox.checked)
- $(label).removeClassName('insensitive');
- else
- $(label).addClassName('insensitive');
-
- },
- execute: function () {
- if (this.validate() && confirm(__("Save changes to selected feeds?"))) {
- const query = this.attr('value');
-
- /* normalize unchecked checkboxes because [] is not serialized */
-
- Object.keys(query).each((key) => {
- let val = query[key];
-
- if (typeof val == "object" && val.length == 0)
- query[key] = ["off"];
- });
-
- notify_progress("Saving data...", true);
-
- xhrPost("backend.php", query, () => {
- dialog.hide();
- updateFeedList();
- });
- }
- },
- content: transport.responseText
- });
+ xhrPost("backend.php", { op: "pref-feeds", method: "editfeeds", ids: rows.toString() }, (transport) => {
+ notify("");