mirror of
https://github.com/chylex/Nextcloud-News.git
synced 2025-04-09 10:15:44 +02:00
add missing controller methods bodies
This commit is contained in:
parent
f27198da9d
commit
4fa9c6d6cf
js
build
controller
tests/unit/controller
@ -187,8 +187,17 @@ var $__build_47_app__ = function () {
|
||||
this.getItems = function () {
|
||||
return ItemResource.getAll();
|
||||
};
|
||||
this.getFeeds = function () {
|
||||
return FeedResource.getAll();
|
||||
this.toggleStar = function (itemId) {
|
||||
console.log(itemId);
|
||||
};
|
||||
this.markRead = function (itemId) {
|
||||
console.log(itemId);
|
||||
};
|
||||
this.getFeed = function (feedId) {
|
||||
console.log(feedId);
|
||||
};
|
||||
this.keepUnread = function (itemId) {
|
||||
console.log(itemId);
|
||||
};
|
||||
}
|
||||
]);
|
||||
@ -225,6 +234,33 @@ var $__build_47_app__ = function () {
|
||||
ItemResource.markRead();
|
||||
FeedResource.markRead();
|
||||
};
|
||||
this.createFeed = function () {
|
||||
console.log('TBD');
|
||||
};
|
||||
this.createFolder = function () {
|
||||
console.log('TBD');
|
||||
};
|
||||
this.renameFeed = function () {
|
||||
console.log('TBD');
|
||||
};
|
||||
this.renameFolder = function () {
|
||||
console.log('TBD');
|
||||
};
|
||||
this.deleteFeed = function () {
|
||||
console.log('TBD');
|
||||
};
|
||||
this.deleteFolder = function () {
|
||||
console.log('TBD');
|
||||
};
|
||||
this.moveFeed = function () {
|
||||
console.log('TBD');
|
||||
};
|
||||
this.isActive = function () {
|
||||
console.log('TBD');
|
||||
};
|
||||
this.isVisible = function () {
|
||||
console.log('TBD');
|
||||
};
|
||||
}
|
||||
]);
|
||||
app.controller('SettingsController', [
|
||||
@ -252,15 +288,15 @@ var $__build_47_app__ = function () {
|
||||
this.getSetting = function (key) {
|
||||
return SettingsResource.get(key);
|
||||
};
|
||||
this.feedSize = function () {
|
||||
return FeedResource.size();
|
||||
};
|
||||
this.importOpml = function (content) {
|
||||
console.log(content);
|
||||
};
|
||||
this.importArticles = function (content) {
|
||||
console.log(content);
|
||||
};
|
||||
this.feedSize = function () {
|
||||
return FeedResource.size();
|
||||
};
|
||||
}
|
||||
]);
|
||||
app.factory('FeedResource', [
|
||||
|
@ -20,7 +20,21 @@ function (Publisher, FeedResource, ItemResource, data) {
|
||||
return ItemResource.getAll();
|
||||
};
|
||||
|
||||
this.getFeeds = () => {
|
||||
return FeedResource.getAll();
|
||||
// TBD
|
||||
this.toggleStar = (itemId) => {
|
||||
console.log(itemId);
|
||||
};
|
||||
|
||||
this.markRead = (itemId) => {
|
||||
console.log(itemId);
|
||||
};
|
||||
|
||||
this.getFeed = (feedId) => {
|
||||
console.log(feedId);
|
||||
};
|
||||
|
||||
this.keepUnread = (itemId) => {
|
||||
console.log(itemId);
|
||||
};
|
||||
|
||||
});
|
@ -37,4 +37,41 @@ function (FeedResource, FolderResource, ItemResource) {
|
||||
FeedResource.markRead();
|
||||
};
|
||||
|
||||
// TBD
|
||||
this.createFeed = () => {
|
||||
console.log('TBD');
|
||||
};
|
||||
|
||||
this.createFolder = () => {
|
||||
console.log('TBD');
|
||||
};
|
||||
|
||||
this.renameFeed = () => {
|
||||
console.log('TBD');
|
||||
};
|
||||
|
||||
this.renameFolder = () => {
|
||||
console.log('TBD');
|
||||
};
|
||||
|
||||
this.deleteFeed = () => {
|
||||
console.log('TBD');
|
||||
};
|
||||
|
||||
this.deleteFolder = () => {
|
||||
console.log('TBD');
|
||||
};
|
||||
|
||||
this.moveFeed = () => {
|
||||
console.log('TBD');
|
||||
};
|
||||
|
||||
this.isActive = () => {
|
||||
console.log('TBD');
|
||||
};
|
||||
|
||||
this.isVisible = () => {
|
||||
console.log('TBD');
|
||||
};
|
||||
|
||||
});
|
@ -34,6 +34,12 @@ function ($route, SettingsResource, FeedResource) {
|
||||
};
|
||||
|
||||
|
||||
this.feedSize = () => {
|
||||
return FeedResource.size();
|
||||
};
|
||||
|
||||
|
||||
// TBD
|
||||
this.importOpml = (content) => {
|
||||
console.log(content);
|
||||
};
|
||||
@ -43,10 +49,4 @@ function ($route, SettingsResource, FeedResource) {
|
||||
console.log(content);
|
||||
};
|
||||
|
||||
|
||||
this.feedSize = () => {
|
||||
return FeedResource.size();
|
||||
};
|
||||
|
||||
|
||||
});
|
@ -24,23 +24,13 @@ describe('ContentController', () => {
|
||||
let controller = $controller('ContentController', {
|
||||
data: {
|
||||
'items': [
|
||||
{
|
||||
id: 3
|
||||
},
|
||||
{
|
||||
id: 4
|
||||
}
|
||||
],
|
||||
'feeds': [
|
||||
{
|
||||
url: 'hi'
|
||||
}
|
||||
{id: 3},
|
||||
{id: 4}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
expect(controller.getItems().length).toBe(2);
|
||||
expect(controller.getFeeds().length).toBe(1);
|
||||
}));
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user