diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/build/app.js | 46 | ||||
-rw-r--r-- | js/controller/ContentController.js | 18 | ||||
-rw-r--r-- | js/controller/NavigationController.js | 37 | ||||
-rw-r--r-- | js/controller/SettingsController.js | 12 | ||||
-rw-r--r-- | js/tests/unit/controller/ContentControllerSpec.js | 14 |
5 files changed, 102 insertions, 25 deletions
diff --git a/js/build/app.js b/js/build/app.js index 185447e6b..2725a18a1 100644 --- a/js/build/app.js +++ b/js/build/app.js @@ -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', [ diff --git a/js/controller/ContentController.js b/js/controller/ContentController.js index 796fea71a..9edac534f 100644 --- a/js/controller/ContentController.js +++ b/js/controller/ContentController.js @@ -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); + }; + });
\ No newline at end of file diff --git a/js/controller/NavigationController.js b/js/controller/NavigationController.js index 292f98110..299d433da 100644 --- a/js/controller/NavigationController.js +++ b/js/controller/NavigationController.js @@ -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'); + }; + });
\ No newline at end of file diff --git a/js/controller/SettingsController.js b/js/controller/SettingsController.js index 37dbaa9b3..781790acc 100644 --- a/js/controller/SettingsController.js +++ b/js/controller/SettingsController.js @@ -34,19 +34,19 @@ function ($route, SettingsResource, FeedResource) { }; - this.importOpml = (content) => { - console.log(content); + this.feedSize = () => { + return FeedResource.size(); }; - this.importArticles = (content) => { + // TBD + this.importOpml = (content) => { console.log(content); }; - this.feedSize = () => { - return FeedResource.size(); + this.importArticles = (content) => { + console.log(content); }; - });
\ No newline at end of file diff --git a/js/tests/unit/controller/ContentControllerSpec.js b/js/tests/unit/controller/ContentControllerSpec.js index 20dd3c71f..dc062474a 100644 --- a/js/tests/unit/controller/ContentControllerSpec.js +++ b/js/tests/unit/controller/ContentControllerSpec.js @@ -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); })); |