mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 13:35:56 +00:00
move some more shared stuff to CommonDialogs, Filters, and Utils
This commit is contained in:
@@ -48,7 +48,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"],
|
||||
menu.addChild(new dijit.MenuItem({
|
||||
label: __("Edit feed"),
|
||||
onClick: function() {
|
||||
editFeed(this.getParent().row_id, false);
|
||||
CommonDialogs.editFeed(this.getParent().row_id, false);
|
||||
}}));
|
||||
|
||||
/* menu.addChild(new dijit.MenuItem({
|
||||
|
||||
@@ -55,13 +55,13 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
|
||||
menu.addChild(new dijit.MenuItem({
|
||||
label: __("Edit feed"),
|
||||
onClick: function() {
|
||||
editFeed(this.getParent().row_id);
|
||||
CommonDialogs.editFeed(this.getParent().row_id);
|
||||
}}));
|
||||
|
||||
menu.addChild(new dijit.MenuItem({
|
||||
label: __("Unsubscribe"),
|
||||
onClick: function() {
|
||||
unsubscribeFeed(this.getParent().row_id, this.getParent().item.name);
|
||||
CommonDialogs.unsubscribeFeed(this.getParent().row_id, this.getParent().item.name);
|
||||
}}));
|
||||
|
||||
menu.bindDomNode(tnode.domNode);
|
||||
|
||||
955
js/functions.js
955
js/functions.js
File diff suppressed because it is too large
Load Diff
@@ -82,7 +82,7 @@ const App = {
|
||||
const param = getURLParam('methodparam');
|
||||
|
||||
window.setTimeout(function () {
|
||||
editFeed(param)
|
||||
CommonDialogs.editFeed(param)
|
||||
}, 100);
|
||||
}
|
||||
},
|
||||
@@ -100,7 +100,7 @@ const App = {
|
||||
CommonDialogs.addLabel();
|
||||
return false;
|
||||
case "create_filter":
|
||||
quickAddFilter();
|
||||
Filters.quickAddFilter();
|
||||
return false;
|
||||
case "help_dialog":
|
||||
Utils.helpDialog("main");
|
||||
@@ -575,7 +575,7 @@ function editSelectedFeed() {
|
||||
|
||||
notify("");
|
||||
|
||||
editFeed(rows[0], {});
|
||||
CommonDialogs.editFeed(rows[0], {});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -360,7 +360,7 @@ const App = {
|
||||
if (Feeds.activeFeedIsCat())
|
||||
alert(__("You can't edit this kind of feed."));
|
||||
else
|
||||
editFeed(Feeds.getActiveFeedId());
|
||||
CommonDialogs.editFeed(Feeds.getActiveFeedId());
|
||||
};
|
||||
this.hotkey_actions["feed_catchup"] = function () {
|
||||
if (Feeds.getActiveFeedId() != undefined) {
|
||||
@@ -424,7 +424,7 @@ const App = {
|
||||
CommonDialogs.addLabel();
|
||||
};
|
||||
this.hotkey_actions["create_filter"] = function () {
|
||||
quickAddFilter();
|
||||
Filters.quickAddFilter();
|
||||
};
|
||||
this.hotkey_actions["collapse_sidebar"] = function () {
|
||||
Feeds.viewCurrentFeed();
|
||||
@@ -501,7 +501,7 @@ const App = {
|
||||
if (Feeds.activeFeedIsCat())
|
||||
alert(__("You can't edit this kind of feed."));
|
||||
else
|
||||
editFeed(Feeds.getActiveFeedId());
|
||||
CommonDialogs.editFeed(Feeds.getActiveFeedId());
|
||||
break;
|
||||
case "qmcRemoveFeed":
|
||||
var actid = Feeds.getActiveFeedId();
|
||||
@@ -521,7 +521,7 @@ const App = {
|
||||
var pr = __("Unsubscribe from %s?").replace("%s", fn);
|
||||
|
||||
if (confirm(pr)) {
|
||||
unsubscribeFeed(actid);
|
||||
CommonDialogs.unsubscribeFeed(actid);
|
||||
}
|
||||
break;
|
||||
case "qmcCatchupAll":
|
||||
|
||||
@@ -1560,7 +1560,7 @@ const Headlines = {
|
||||
menu.addChild(new dijit.MenuItem({
|
||||
label: __("Edit feed"),
|
||||
onClick: function () {
|
||||
editFeed(this.getParent().currentTarget.getAttribute("data-feed-id"));
|
||||
CommonDialogs.editFeed(this.getParent().currentTarget.getAttribute("data-feed-id"));
|
||||
}
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user