mirror of
https://git.tt-rss.org/fox/tt-rss.git
synced 2025-08-07 06:37:44 +02:00
editarticletags: load dialog via XHR
This commit is contained in:
parent
0706a328a4
commit
42b5564d1e
@ -1,12 +1,6 @@
|
||||
<?php
|
||||
class Article extends Handler_Protected {
|
||||
|
||||
function csrf_ignore($method) {
|
||||
$csrf_ignored = array("editarticletags");
|
||||
|
||||
return array_search($method, $csrf_ignored) !== false;
|
||||
}
|
||||
|
||||
function redirect() {
|
||||
$id = clean($_REQUEST['id']);
|
||||
|
||||
|
@ -257,15 +257,16 @@ const Article = {
|
||||
return false;
|
||||
},
|
||||
editTags: function (id) {
|
||||
const query = "backend.php?op=article&method=editArticleTags¶m=" + encodeURIComponent(id);
|
||||
|
||||
if (dijit.byId("editTagsDlg"))
|
||||
dijit.byId("editTagsDlg").destroyRecursive();
|
||||
|
||||
xhrPost("backend.php", {op: "article", method: "editarticletags", param: id}, (transport) => {
|
||||
|
||||
const dialog = new dijit.Dialog({
|
||||
id: "editTagsDlg",
|
||||
title: __("Edit article Tags"),
|
||||
style: "width: 600px",
|
||||
content: transport.responseText,
|
||||
execute: function () {
|
||||
if (this.validate()) {
|
||||
Notify.progress("Saving article tags...", true);
|
||||
@ -292,7 +293,6 @@ const Article = {
|
||||
});
|
||||
}
|
||||
},
|
||||
href: query
|
||||
});
|
||||
|
||||
const tmph = dojo.connect(dialog, 'onLoad', function () {
|
||||
@ -304,6 +304,9 @@ const Article = {
|
||||
});
|
||||
|
||||
dialog.show();
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
cdmMoveToId: function (id, params) {
|
||||
params = params || {};
|
||||
|
Loading…
Reference in New Issue
Block a user