summaryrefslogtreecommitdiff
path: root/js/Article.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-12 19:02:09 +0300
committerAndrew Dolgov <[email protected]>2021-02-12 19:02:09 +0300
commit7f0800537e8268dcbc4fce19f38fcbaa3d78a1cd (patch)
treed80b1c1a4194265c4c340661a1388f77c2a048c1 /js/Article.js
parentad7842c98af21bf400c0f347455a3a8432c01140 (diff)
silence (or fix) a bunch of eslint warnings
Diffstat (limited to 'js/Article.js')
-rw-r--r--js/Article.js75
1 files changed, 38 insertions, 37 deletions
diff --git a/js/Article.js b/js/Article.js
index d6e7bbad9..61368dfed 100644
--- a/js/Article.js
+++ b/js/Article.js
@@ -1,5 +1,6 @@
'use strict'
+/* eslint-disable no-new */
/* global __, ngettext, App, Headlines, xhrPost, xhrJson, dojo, dijit, PluginHost, Notify, $$, Ajax, fox */
const Article = {
@@ -250,52 +251,52 @@ const Article = {
return false;
},
editTags: function (id) {
- xhrPost("backend.php", {op: "article", method: "editarticletags", param: id}, (transport) => {
-
- const dialog = new fox.SingleUseDialog({
- id: "editTagsDlg",
- title: __("Edit article Tags"),
- content: transport.responseText,
- execute: function () {
- if (this.validate()) {
- Notify.progress("Saving article tags...", true);
-
- xhrPost("backend.php", this.attr('value'), (transport) => {
- try {
- Notify.close();
- dialog.hide();
-
- const data = JSON.parse(transport.responseText);
-
- if (data) {
- const id = data.id;
-
- const tags = $("ATSTR-" + id);
- const tooltip = dijit.byId("ATSTRTIP-" + id);
-
- if (tags) tags.innerHTML = data.content;
- if (tooltip) tooltip.attr('label', data.content_full);
- }
- } catch (e) {
- App.Error.report(e);
+ const dialog = new fox.SingleUseDialog({
+ id: "editTagsDlg",
+ title: __("Edit article Tags"),
+ content: __("Loading, please wait..."),
+ execute: function () {
+ if (this.validate()) {
+ Notify.progress("Saving article tags...", true);
+
+ xhrPost("backend.php", this.attr('value'), (transport) => {
+ try {
+ Notify.close();
+ dialog.hide();
+
+ const data = JSON.parse(transport.responseText);
+
+ if (data) {
+ const id = data.id;
+
+ const tags = $("ATSTR-" + id);
+ const tooltip = dijit.byId("ATSTRTIP-" + id);
+
+ if (tags) tags.innerHTML = data.content;
+ if (tooltip) tooltip.attr('label', data.content_full);
}
- });
- }
- },
- });
+ } catch (e) {
+ App.Error.report(e);
+ }
+ });
+ }
+ },
+ });
+
+ const tmph = dojo.connect(dialog, 'onShow', function () {
+ dojo.disconnect(tmph);
- const tmph = dojo.connect(dialog, 'onShow', function () {
- dojo.disconnect(tmph);
+ xhrPost("backend.php", {op: "article", method: "editarticletags", param: id}, (transport) => {
+ dialog.attr('content', transport.responseText);
new Ajax.Autocompleter('tags_str', 'tags_choices',
"backend.php?op=article&method=completeTags",
{tokens: ',', paramName: "search"});
});
-
- dialog.show();
-
});
+ dialog.show();
+
},
cdmMoveToId: function (id, params) {
params = params || {};