mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-16 01:35:56 +00:00
* switch to xhr.post() almost everywhere
* call App.handlerpcjson() automatically on json request (if possible) * show net/log indicators in prefs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* global dojo, Effect, Plugins, xhrJson, Notify, fox, xhrPost, __ */
|
||||
/* global dojo, Plugins, App, Notify, fox, xhr, __ */
|
||||
|
||||
Plugins.Share = {
|
||||
shareArticle: function(id) {
|
||||
@@ -40,8 +40,8 @@ Plugins.Share = {
|
||||
},
|
||||
unshare: function () {
|
||||
if (confirm(__("Remove sharing for this article?"))) {
|
||||
xhrPost("backend.php", App.getPhArgs("share", "unshare", {id: id}), (transport) => {
|
||||
Notify.info(transport.responseText);
|
||||
xhr.post("backend.php", App.getPhArgs("share", "unshare", {id: id}), (reply) => {
|
||||
Notify.info(reply);
|
||||
|
||||
const icon = document.querySelector(".share-icon-" + id);
|
||||
|
||||
@@ -59,8 +59,8 @@ Plugins.Share = {
|
||||
const tmph = dojo.connect(dialog, 'onShow', function () {
|
||||
dojo.disconnect(tmph);
|
||||
|
||||
xhrPost("backend.php", App.getPhArgs("share", "shareDialog", {id: id}), (transport) => {
|
||||
dialog.attr('content', transport.responseText)
|
||||
xhr.post("backend.php", App.getPhArgs("share", "shareDialog", {id: id}), (reply) => {
|
||||
dialog.attr('content', reply)
|
||||
|
||||
const icon = document.querySelector(".share-icon-" + id);
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* global Plugins, Notify, xhrPost */
|
||||
/* global Plugins, Notify, xhr, App */
|
||||
|
||||
Plugins.Share = {
|
||||
clearKeys: function() {
|
||||
if (confirm(__("This will invalidate all previously shared article URLs. Continue?"))) {
|
||||
Notify.progress("Clearing URLs...");
|
||||
|
||||
xhrPost("backend.php", App.getPhArgs("share", "clearArticleKeys"), (transport) => {
|
||||
Notify.info(transport.responseText);
|
||||
xhr.post("backend.php", App.getPhArgs("share", "clearArticleKeys"), (reply) => {
|
||||
Notify.info(reply);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user