]>
git.wh0rd.org - tt-rss.git/blob - js/prefs.js
5 function notify_callback2(transport
, sticky
) {
6 notify_info(transport
.responseText
, sticky
);
9 function updateFeedList() {
11 const user_search
= $("feed_search");
13 if (user_search
) { search
= user_search
.value
; }
15 xhrPost("backend.php", { op
: "pref-feeds", search
: search
}, (transport
) => {
16 dijit
.byId('feedConfigTab').attr('content', transport
.responseText
);
17 selectTab("feedConfig", true);
22 function checkInactiveFeeds() {
23 xhrPost("backend.php", { op
: "pref-feeds", method
: "getinactivefeeds" }, (transport
) => {
24 if (parseInt(transport
.responseText
) > 0) {
25 Element
.show(dijit
.byId("pref_feeds_inactive_btn").domNode
);
30 function updateUsersList(sort_key
) {
31 const user_search
= $("user_search");
32 const search
= user_search
? user_search
.value
: "";
34 const query
= { op
: "pref-users", sort
: sort_key
, search
: search
};
36 xhrPost("backend.php", query
, (transport
) => {
37 dijit
.byId('userConfigTab').attr('content', transport
.responseText
);
38 selectTab("userConfig", true)
44 const login
= prompt(__("Please enter login:"), "");
51 alert(__("Can't create user: no login specified."));
55 notify_progress("Adding user...");
57 xhrPost("backend.php", { op
: "pref-users", method
: "add", login
: login
}, (transport
) => {
58 notify_callback2(transport
);
64 function editUser(id
) {
66 const query
= "backend.php?op=pref-users&method=edit&id=" +
69 if (dijit
.byId("userEditDlg"))
70 dijit
.byId("userEditDlg").destroyRecursive();
72 const dialog
= new dijit
.Dialog({
74 title
: __("User Editor"),
75 style
: "width: 600px",
76 execute: function () {
77 if (this.validate()) {
78 notify_progress("Saving data...", true);
80 xhrPost("backend.php", dojo
.formToObject("user_edit_form"), (transport
) => {
92 function editFilter(id
) {
94 const query
= "backend.php?op=pref-filters&method=edit&id=" + param_escape(id
);
96 if (dijit
.byId("feedEditDlg"))
97 dijit
.byId("feedEditDlg").destroyRecursive();
99 if (dijit
.byId("filterEditDlg"))
100 dijit
.byId("filterEditDlg").destroyRecursive();
102 const dialog
= new dijit
.Dialog({
104 title
: __("Edit Filter"),
105 style
: "width: 600px",
108 const query
= "backend.php?" + dojo
.formToQuery("filter_edit_form") + "&savemode=test";
110 editFilterTest(query
);
112 selectRules: function (select
) {
113 $$("#filterDlg_Matches input[type=checkbox]").each(function (e
) {
116 e
.parentNode
.addClassName("Selected");
118 e
.parentNode
.removeClassName("Selected");
121 selectActions: function (select
) {
122 $$("#filterDlg_Actions input[type=checkbox]").each(function (e
) {
126 e
.parentNode
.addClassName("Selected");
128 e
.parentNode
.removeClassName("Selected");
132 editRule: function (e
) {
133 const li
= e
.parentNode
;
134 const rule
= li
.getElementsByTagName("INPUT")[1].value
;
135 addFilterRule(li
, rule
);
137 editAction: function (e
) {
138 const li
= e
.parentNode
;
139 const action
= li
.getElementsByTagName("INPUT")[1].value
;
140 addFilterAction(li
, action
);
142 removeFilter: function () {
143 const msg
= __("Remove filter?");
148 notify_progress("Removing filter...");
150 const query
= { op
: "pref-filters", method
: "remove", ids
: this.attr('value').id
};
152 xhrPost("backend.php", query
, () => {
157 addAction: function () {
160 addRule: function () {
163 deleteAction: function () {
164 $$("#filterDlg_Actions li[class*=Selected]").each(function (e
) {
165 e
.parentNode
.removeChild(e
)
168 deleteRule: function () {
169 $$("#filterDlg_Matches li[class*=Selected]").each(function (e
) {
170 e
.parentNode
.removeChild(e
)
173 execute: function () {
174 if (this.validate()) {
176 notify_progress("Saving data...", true);
178 xhrPost("backend.php", dojo
.formToObject("filter_edit_form"), () => {
191 function getSelectedLabels() {
192 const tree
= dijit
.byId("labelTree");
193 const items
= tree
.model
.getCheckedItems();
196 items
.each(function(item
) {
197 rv
.push(tree
.model
.store
.getValue(item
, 'bare_id'));
203 function getSelectedUsers() {
204 return getSelectedTableRowIds("prefUserList");
207 function getSelectedFeeds() {
208 const tree
= dijit
.byId("feedTree");
209 const items
= tree
.model
.getCheckedItems();
212 items
.each(function(item
) {
213 if (item
.id
[0].match("FEED:"))
214 rv
.push(tree
.model
.store
.getValue(item
, 'bare_id'));
220 function getSelectedCategories() {
221 const tree
= dijit
.byId("feedTree");
222 const items
= tree
.model
.getCheckedItems();
225 items
.each(function(item
) {
226 if (item
.id
[0].match("CAT:"))
227 rv
.push(tree
.model
.store
.getValue(item
, 'bare_id'));
233 function getSelectedFilters() {
234 const tree
= dijit
.byId("filterTree");
235 const items
= tree
.model
.getCheckedItems();
238 items
.each(function(item
) {
239 rv
.push(tree
.model
.store
.getValue(item
, 'bare_id'));
246 function removeSelectedLabels() {
248 const sel_rows
= getSelectedLabels();
250 if (sel_rows
.length
> 0) {
252 const ok
= confirm(__("Remove selected labels?"));
255 notify_progress("Removing selected labels...");
257 const query
= { op
: "pref-labels", method
: "remove",
258 ids
: sel_rows
.toString() };
260 xhrPost("backend.php", query
, () => {
265 alert(__("No labels are selected."));
271 function removeSelectedUsers() {
273 const sel_rows
= getSelectedUsers();
275 if (sel_rows
.length
> 0) {
277 const ok
= confirm(__("Remove selected users? Neither default admin nor your account will be removed."));
280 notify_progress("Removing selected users...");
282 const query
= { op
: "pref-users", method
: "remove",
283 ids
: sel_rows
.toString() };
285 xhrPost("backend.php", query
, () => {
291 alert(__("No users are selected."));
297 function removeSelectedFilters() {
299 const sel_rows
= getSelectedFilters();
301 if (sel_rows
.length
> 0) {
303 const ok
= confirm(__("Remove selected filters?"));
306 notify_progress("Removing selected filters...");
308 const query
= { op
: "pref-filters", method
: "remove",
309 ids
: sel_rows
.toString() };
311 xhrPost("backend.php", query
, () => {
316 alert(__("No filters are selected."));
322 function removeSelectedFeeds() {
324 const sel_rows
= getSelectedFeeds();
326 if (sel_rows
.length
> 0) {
328 const ok
= confirm(__("Unsubscribe from selected feeds?"));
332 notify_progress("Unsubscribing from selected feeds...", true);
334 const query
= { op
: "pref-feeds", method
: "remove",
335 ids
: sel_rows
.toString() };
337 xhrPost("backend.php", query
, () => {
343 alert(__("No feeds are selected."));
349 function editSelectedUser() {
350 const rows
= getSelectedUsers();
352 if (rows
.length
== 0) {
353 alert(__("No users are selected."));
357 if (rows
.length
> 1) {
358 alert(__("Please select only one user."));
367 function resetSelectedUserPass() {
369 const rows
= getSelectedUsers();
371 if (rows
.length
== 0) {
372 alert(__("No users are selected."));
376 if (rows
.length
> 1) {
377 alert(__("Please select only one user."));
381 const ok
= confirm(__("Reset password of selected user?"));
384 notify_progress("Resetting password for selected user...");
388 xhrPost("backend.php", { op
: "pref-users", method
: "resetPass", id
: id
}, (transport
) => {
389 notify_info(transport
.responseText
, true);
395 function selectedUserDetails() {
397 const rows
= getSelectedUsers();
399 if (rows
.length
== 0) {
400 alert(__("No users are selected."));
404 if (rows
.length
> 1) {
405 alert(__("Please select only one user."));
409 const query
= "backend.php?op=pref-users&method=userdetails&id=" + param_escape(rows
[0]);
411 if (dijit
.byId("userDetailsDlg"))
412 dijit
.byId("userDetailsDlg").destroyRecursive();
414 const dialog
= new dijit
.Dialog({
415 id
: "userDetailsDlg",
416 title
: __("User details"),
417 style
: "width: 600px",
418 execute: function () {
428 function editSelectedFilter() {
429 const rows
= getSelectedFilters();
431 if (rows
.length
== 0) {
432 alert(__("No filters are selected."));
436 if (rows
.length
> 1) {
437 alert(__("Please select only one filter."));
447 function joinSelectedFilters() {
448 const rows
= getSelectedFilters();
450 if (rows
.length
== 0) {
451 alert(__("No filters are selected."));
455 const ok
= confirm(__("Combine selected filters?"));
458 notify_progress("Joining filters...");
460 xhrPost("backend.php", { op
: "pref-filters", method
: "join", ids
: rows
.toString() }, () => {
466 function editSelectedFeed() {
467 const rows
= getSelectedFeeds();
469 if (rows
.length
== 0) {
470 alert(__("No feeds are selected."));
474 if (rows
.length
> 1) {
475 return editSelectedFeeds();
480 editFeed(rows
[0], {});
484 function editSelectedFeeds() {
485 const rows
= getSelectedFeeds();
487 if (rows
.length
== 0) {
488 alert(__("No feeds are selected."));
492 notify_progress("Loading, please wait...");
494 if (dijit
.byId("feedEditDlg"))
495 dijit
.byId("feedEditDlg").destroyRecursive();
497 xhrPost("backend.php", { op
: "pref-feeds", method
: "editfeeds", ids
: rows
.toString() }, (transport
) => {
500 const dialog
= new dijit
.Dialog({
502 title
: __("Edit Multiple Feeds"),
503 style
: "width: 600px",
504 getChildByName: function (name
) {
506 this.getChildren().each(
508 if (child
.name
== name
) {
515 toggleField: function (checkbox
, elem
, label
) {
516 this.getChildByName(elem
).attr('disabled', !checkbox
.checked
);
519 if (checkbox
.checked
)
520 $(label
).removeClassName('insensitive');
522 $(label
).addClassName('insensitive');
525 execute: function () {
526 if (this.validate() && confirm(__("Save changes to selected feeds?"))) {
527 const query
= this.attr('value');
529 /* normalize unchecked checkboxes because [] is not serialized */
531 Object
.keys(query
).each((key
) => {
532 let val
= query
[key
];
534 if (typeof val
== "object" && val
.length
== 0)
535 query
[key
] = ["off"];
538 notify_progress("Saving data...", true);
540 xhrPost("backend.php", query
, () => {
546 content
: transport
.responseText
553 function opmlImportComplete(iframe
) {
554 if (!iframe
.contentDocument
.body
.innerHTML
) return false;
556 Element
.show(iframe
);
560 if (dijit
.byId('opmlImportDlg'))
561 dijit
.byId('opmlImportDlg').destroyRecursive();
563 const content
= iframe
.contentDocument
.body
.innerHTML
;
565 const dialog
= new dijit
.Dialog({
567 title
: __("OPML Import"),
568 style
: "width: 600px",
569 onCancel: function () {
570 window
.location
.reload();
572 execute: function () {
573 window
.location
.reload();
581 function opmlImport() {
583 const opml_file
= $("opml_file");
585 if (opml_file
.value
.length
== 0) {
586 alert(__("Please choose an OPML file first."));
589 notify_progress("Importing, please wait...", true);
591 Element
.show("upload_iframe");
598 function updateFilterList() {
599 const user_search
= $("filter_search");
601 if (user_search
) { search
= user_search
.value
; }
603 xhrPost("backend.php", { op
: "pref-filters", search
: search
}, (transport
) => {
604 dijit
.byId('filterConfigTab').attr('content', transport
.responseText
);
609 function updateLabelList() {
610 xhrPost("backend.php", { op
: "pref-labels" }, (transport
) => {
611 dijit
.byId('labelConfigTab').attr('content', transport
.responseText
);
616 function updatePrefsList() {
617 xhrPost("backend.php", { op
: "pref-prefs" }, (transport
) => {
618 dijit
.byId('genConfigTab').attr('content', transport
.responseText
);
623 function updateSystemList() {
624 xhrPost("backend.php", { op
: "pref-system" }, (transport
) => {
625 dijit
.byId('systemConfigTab').attr('content', transport
.responseText
);
630 function selectTab(id
, noupdate
) {
632 notify_progress("Loading, please wait...");
654 console
.warn("unknown tab", id
);
657 const tab
= dijit
.byId(id
+ "Tab");
658 dijit
.byId("pref-tabs").selectChild(tab
);
663 function init_second_stage() {
664 document
.onkeydown
= pref_hotkey_handler
;
665 loading_set_progress(50);
668 let tab
= getURLParam('tab');
671 tab
= dijit
.byId(tab
+ "Tab");
672 if (tab
) dijit
.byId("pref-tabs").selectChild(tab
);
675 const method
= getURLParam('method');
677 if (method
== 'editFeed') {
678 const param
= getURLParam('methodparam');
680 window
.setTimeout(function() { editFeed(param
) }, 100);
683 setInterval(hotkey_prefix_timeout
, 5*1000);
687 window
.onerror = function (message
, filename
, lineno
, colno
, error
) {
688 report_error(message
, filename
, lineno
, colno
, error
);
691 require(["dojo/_base/kernel",
696 "dijit/ColorPalette",
699 "dijit/form/CheckBox",
700 "dijit/form/DropDownButton",
701 "dijit/form/FilteringSelect",
702 "dijit/form/MultiSelect",
704 "dijit/form/RadioButton",
705 "dijit/form/ComboButton",
707 "dijit/form/SimpleTextarea",
708 "dijit/form/TextBox",
709 "dijit/form/ValidationTextBox",
710 "dijit/InlineEditBox",
711 "dijit/layout/AccordionContainer",
712 "dijit/layout/AccordionPane",
713 "dijit/layout/BorderContainer",
714 "dijit/layout/ContentPane",
715 "dijit/layout/TabContainer",
720 "dijit/tree/dndSource",
721 "dojo/data/ItemFileWriteStore",
722 "lib/CheckBoxStoreModel",
725 "fox/PrefFilterStore",
727 "fox/PrefFilterTree",
728 "fox/PrefLabelTree"], function (dojo
, ready
, parser
) {
734 loading_set_progress(50);
736 const clientTzOffset
= new Date().getTimezoneOffset() * 60;
737 const params
= { op
: "rpc", method
: "sanityCheck", clientTzOffset
: clientTzOffset
};
739 xhrPost("backend.php", params
, (transport
) => {
740 backend_sanity_check_callback(transport
);
751 function validatePrefsReset() {
752 if (confirm(__("Reset to defaults?"))) {
754 const query
= "?op=pref-prefs&method=resetconfig";
756 xhrPost("backend.php", { op
: "pref-prefs", method
: "resetconfig" }, (transport
) => {
758 notify_info(transport
.responseText
);
765 function pref_hotkey_handler(e
) {
766 if (e
.target
.nodeName
== "INPUT" || e
.target
.nodeName
== "TEXTAREA") return;
768 const action_name
= keyevent_to_action(e
);
771 switch (action_name
) {
772 case "feed_subscribe":
778 case "create_filter":
785 console
.log("unhandled action: " + action_name
+ "; keycode: " + e
.which
);
790 function removeCategory(id
, item
) {
792 if (confirm(__("Remove category %s? Any nested feeds would be placed into Uncategorized.").replace("%s", item
.name
))) {
793 notify_progress("Removing category...");
795 const query
= { op
: "pref-feeds", method
: "removeCat",
798 xhrPost("backend.php", query
, () => {
805 function removeSelectedCategories() {
806 const sel_rows
= getSelectedCategories();
808 if (sel_rows
.length
> 0) {
809 if (confirm(__("Remove selected categories?"))) {
810 notify_progress("Removing selected categories...");
812 const query
= { op
: "pref-feeds", method
: "removeCat",
813 ids
: sel_rows
.toString() };
815 xhrPost("backend.php", query
, () => {
820 alert(__("No categories are selected."));
826 function createCategory() {
827 const title
= prompt(__("Category title:"));
830 notify_progress("Creating category...");
832 xhrPost("backend.php", { op
: "pref-feeds", method
: "addCat", cat
: title
}, () => {
839 function showInactiveFeeds() {
840 const query
= "backend.php?op=pref-feeds&method=inactiveFeeds";
842 if (dijit
.byId("inactiveFeedsDlg"))
843 dijit
.byId("inactiveFeedsDlg").destroyRecursive();
845 const dialog
= new dijit
.Dialog({
846 id
: "inactiveFeedsDlg",
847 title
: __("Feeds without recent updates"),
848 style
: "width: 600px",
849 getSelectedFeeds: function () {
850 return getSelectedTableRowIds("prefInactiveFeedList");
852 removeSelected: function () {
853 const sel_rows
= this.getSelectedFeeds();
855 if (sel_rows
.length
> 0) {
856 if (confirm(__("Remove selected feeds?"))) {
857 notify_progress("Removing selected feeds...", true);
859 const query
= { op
: "pref-feeds", method
: "remove",
860 ids
: sel_rows
.toString() };
862 xhrPost("backend.php", query
, () => {
870 alert(__("No feeds are selected."));
873 execute: function () {
874 if (this.validate()) {
883 function opmlRegenKey() {
884 if (confirm(__("Replace current OPML publishing address with a new one?"))) {
885 notify_progress("Trying to change address...", true);
887 xhrJson("backend.php", { op
: "pref-feeds", method
: "regenOPMLKey" }, (reply
) => {
889 const new_link
= reply
.link
;
890 const e
= $('pub_opml_url');
894 e
.innerHTML
= new_link
;
896 new Effect
.Highlight(e
);
901 notify_error("Could not change feed URL.");
909 function labelColorReset() {
910 const labels
= getSelectedLabels();
912 if (labels
.length
> 0) {
913 if (confirm(__("Reset selected labels to default colors?"))) {
915 const query
= { op
: "pref-labels", method
: "colorreset",
916 ids
: labels
.toString() };
918 xhrPost("backend.php", query
, () => {
924 alert(__("No labels are selected."));
928 function inPreferences() {
932 function editProfiles() {
934 if (dijit
.byId("profileEditDlg"))
935 dijit
.byId("profileEditDlg").destroyRecursive();
937 const query
= "backend.php?op=pref-prefs&method=editPrefProfiles";
939 const dialog
= new dijit
.Dialog({
940 id
: "profileEditDlg",
941 title
: __("Settings Profiles"),
942 style
: "width: 600px",
943 getSelectedProfiles: function () {
944 return getSelectedTableRowIds("prefFeedProfileList");
946 removeSelected: function () {
947 const sel_rows
= this.getSelectedProfiles();
949 if (sel_rows
.length
> 0) {
950 const ok
= confirm(__("Remove selected profiles? Active and default profiles will not be removed."));
953 notify_progress("Removing selected profiles...", true);
955 const query
= { op
: "rpc", method
: "remprofiles",
956 ids
: sel_rows
.toString() };
958 xhrPost("backend.php", query
, () => {
965 alert(__("No profiles are selected."));
968 activateProfile: function () {
969 const sel_rows
= this.getSelectedProfiles();
971 if (sel_rows
.length
== 1) {
973 const ok
= confirm(__("Activate selected profile?"));
976 notify_progress("Loading, please wait...");
978 xhrPost("backend.php", { op
: "rpc", method
: "setprofile", id
: sel_rows
.toString() }, () => {
979 window
.location
.reload();
984 alert(__("Please choose a profile to activate."));
987 addProfile: function () {
988 if (this.validate()) {
989 notify_progress("Creating profile...", true);
991 const query
= { op
: "rpc", method
: "addprofile", title
: dialog
.attr('value').newprofile
};
993 xhrPost("backend.php", query
, () => {
1000 execute: function () {
1001 if (this.validate()) {
1011 function activatePrefProfile() {
1013 const sel_rows = getSelectedFeedCats();
1015 if (sel_rows.length == 1) {
1017 const ok = confirm(__("Activate selected profile?"));
1020 notify_progress("Loading, please wait...");
1022 xhrPost("backend.php", { op: "rpc", method: "setprofile", id: sel_rows.toString() }, () => {
1023 window.location.reload();
1028 alert(__("Please choose a profile to activate."));
1034 function clearFeedAccessKeys() {
1036 const ok
= confirm(__("This will invalidate all previously generated feed URLs. Continue?"));
1039 notify_progress("Clearing URLs...");
1041 xhrPost("backend.php", { op
: "pref-feeds", method
: "clearKeys" }, () => {
1042 notify_info("Generated URLs cleared.");
1049 function resetFilterOrder() {
1050 notify_progress("Loading, please wait...");
1052 xhrPost("backend.php", { op
: "pref-filters", method
: "filtersortreset" }, () => {
1058 function resetFeedOrder() {
1059 notify_progress("Loading, please wait...");
1061 xhrPost("backend.php", { op
: "pref-feeds", method
: "feedsortreset" }, () => {
1066 function resetCatOrder() {
1067 notify_progress("Loading, please wait...");
1069 xhrPost("backend.php", { op
: "pref-feeds", method
: "catsortreset" }, () => {
1074 function editCat(id
, item
) {
1075 const new_name
= prompt(__('Rename category to:'), item
.name
);
1077 if (new_name
&& new_name
!= item
.name
) {
1079 notify_progress("Loading, please wait...");
1081 xhrPost("backend.php", { op
: 'pref-feeds', method
: 'renamecat', id
: id
, title
: new_name
}, () => {
1087 function editLabel(id
) {
1088 const query
= "backend.php?op=pref-labels&method=edit&id=" +
1091 if (dijit
.byId("labelEditDlg"))
1092 dijit
.byId("labelEditDlg").destroyRecursive();
1094 const dialog
= new dijit
.Dialog({
1096 title
: __("Label Editor"),
1097 style
: "width: 600px",
1098 setLabelColor: function (id
, fg
, bg
) {
1113 const e
= $("LICID-" + id
);
1116 if (fg
) e
.style
.color
= fg
;
1117 if (bg
) e
.style
.backgroundColor
= bg
;
1120 const query
= { op
: "pref-labels", method
: "colorset", kind
: kind
,
1121 ids
: id
, fg
: fg
, bg
: bg
, color
: color
};
1123 xhrPost("backend.php", query
, () => {
1124 updateFilterList(); // maybe there's labels in there
1128 execute: function () {
1129 if (this.validate()) {
1130 const caption
= this.attr('value').caption
;
1131 const fg_color
= this.attr('value').fg_color
;
1132 const bg_color
= this.attr('value').bg_color
;
1134 dijit
.byId('labelTree').setNameById(id
, caption
);
1135 this.setLabelColor(id
, fg_color
, bg_color
);
1138 xhrPost("backend.php", this.attr('value'), () => {
1139 updateFilterList(); // maybe there's labels in there
1150 function customizeCSS() {
1151 const query
= "backend.php?op=pref-prefs&method=customizeCSS";
1153 if (dijit
.byId("cssEditDlg"))
1154 dijit
.byId("cssEditDlg").destroyRecursive();
1156 const dialog
= new dijit
.Dialog({
1158 title
: __("Customize stylesheet"),
1159 style
: "width: 600px",
1160 execute: function () {
1161 notify_progress('Saving data...', true);
1163 xhrPost("backend.php", this.attr('value'), () => {
1164 window
.location
.reload();
1174 function insertSSLserial(value
) {
1175 dijit
.byId("SSL_CERT_SERIAL").attr('value', value
);
1178 function gotoExportOpml(filename
, settings
) {
1179 const tmp
= settings
? 1 : 0;
1180 document
.location
.href
= "backend.php?op=opml&method=export&filename=" + filename
+ "&settings=" + tmp
;
1184 function batchSubscribe() {
1185 const query
= "backend.php?op=pref-feeds&method=batchSubscribe";
1187 // overlapping widgets
1188 if (dijit
.byId("batchSubDlg")) dijit
.byId("batchSubDlg").destroyRecursive();
1189 if (dijit
.byId("feedAddDlg")) dijit
.byId("feedAddDlg").destroyRecursive();
1191 const dialog
= new dijit
.Dialog({
1193 title
: __("Batch subscribe"),
1194 style
: "width: 600px",
1195 execute: function () {
1196 if (this.validate()) {
1197 notify_progress(__("Subscribing to feeds..."), true);
1199 xhrPost("backend.php", this.attr('value'), () => {
1212 function clearPluginData(name
) {
1213 if (confirm(__("Clear stored data for this plugin?"))) {
1214 notify_progress("Loading, please wait...");
1216 xhrPost("backend.php", { op
: "pref-prefs", method
: "clearplugindata", name
: name
}, () => {
1223 function clearSqlLog() {
1225 if (confirm(__("Clear all messages in the error log?"))) {
1227 notify_progress("Loading, please wait...");
1229 xhrPost("backend.php", { op
: "pref-system", method
: "clearLog" }, () => {
1236 function updateSelectedPrompt() {
1237 // no-op shim for toggleSelectedRow()