|
|
@ -1,5 +1,6 @@
|
|
|
|
'use strict'
|
|
|
|
'use strict'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* eslint-disable no-new */
|
|
|
|
/* global __, ngettext, App, Headlines, xhrPost, xhrJson, dojo, dijit, PluginHost, Notify, $$, Ajax, fox */
|
|
|
|
/* global __, ngettext, App, Headlines, xhrPost, xhrJson, dojo, dijit, PluginHost, Notify, $$, Ajax, fox */
|
|
|
|
|
|
|
|
|
|
|
|
const Article = {
|
|
|
|
const Article = {
|
|
|
@ -250,52 +251,52 @@ const Article = {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
editTags: function (id) {
|
|
|
|
editTags: function (id) {
|
|
|
|
xhrPost("backend.php", {op: "article", method: "editarticletags", param: id}, (transport) => {
|
|
|
|
const dialog = new fox.SingleUseDialog({
|
|
|
|
|
|
|
|
id: "editTagsDlg",
|
|
|
|
const dialog = new fox.SingleUseDialog({
|
|
|
|
title: __("Edit article Tags"),
|
|
|
|
id: "editTagsDlg",
|
|
|
|
content: __("Loading, please wait..."),
|
|
|
|
title: __("Edit article Tags"),
|
|
|
|
execute: function () {
|
|
|
|
content: transport.responseText,
|
|
|
|
if (this.validate()) {
|
|
|
|
execute: function () {
|
|
|
|
Notify.progress("Saving article tags...", true);
|
|
|
|
if (this.validate()) {
|
|
|
|
|
|
|
|
Notify.progress("Saving article tags...", true);
|
|
|
|
xhrPost("backend.php", this.attr('value'), (transport) => {
|
|
|
|
|
|
|
|
try {
|
|
|
|
xhrPost("backend.php", this.attr('value'), (transport) => {
|
|
|
|
Notify.close();
|
|
|
|
try {
|
|
|
|
dialog.hide();
|
|
|
|
Notify.close();
|
|
|
|
|
|
|
|
dialog.hide();
|
|
|
|
const data = JSON.parse(transport.responseText);
|
|
|
|
|
|
|
|
|
|
|
|
const data = JSON.parse(transport.responseText);
|
|
|
|
if (data) {
|
|
|
|
|
|
|
|
const id = data.id;
|
|
|
|
if (data) {
|
|
|
|
|
|
|
|
const id = data.id;
|
|
|
|
const tags = $("ATSTR-" + id);
|
|
|
|
|
|
|
|
const tooltip = dijit.byId("ATSTRTIP-" + 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);
|
|
|
|
if (tags) tags.innerHTML = data.content;
|
|
|
|
|
|
|
|
if (tooltip) tooltip.attr('label', data.content_full);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
App.Error.report(e);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
} catch (e) {
|
|
|
|
}
|
|
|
|
App.Error.report(e);
|
|
|
|
},
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const tmph = dojo.connect(dialog, 'onShow', function () {
|
|
|
|
|
|
|
|
dojo.disconnect(tmph);
|
|
|
|
|
|
|
|
|
|
|
|
const tmph = dojo.connect(dialog, 'onShow', function () {
|
|
|
|
xhrPost("backend.php", {op: "article", method: "editarticletags", param: id}, (transport) => {
|
|
|
|
dojo.disconnect(tmph);
|
|
|
|
dialog.attr('content', transport.responseText);
|
|
|
|
|
|
|
|
|
|
|
|
new Ajax.Autocompleter('tags_str', 'tags_choices',
|
|
|
|
new Ajax.Autocompleter('tags_str', 'tags_choices',
|
|
|
|
"backend.php?op=article&method=completeTags",
|
|
|
|
"backend.php?op=article&method=completeTags",
|
|
|
|
{tokens: ',', paramName: "search"});
|
|
|
|
{tokens: ',', paramName: "search"});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
dialog.show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dialog.show();
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
cdmMoveToId: function (id, params) {
|
|
|
|
cdmMoveToId: function (id, params) {
|
|
|
|
params = params || {};
|
|
|
|
params = params || {};
|
|
|
|