diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-15 12:06:14 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-15 12:06:14 +0200 |
commit | 360966ab4bdafd15cdef21e34492f5d7d3151b74 (patch) | |
tree | 0d196a502d41a5234a2da5903fda09e7d51ddaed /js/app/controllers | |
parent | fe2bb06a2cc7bf3cd70388d6179728a600eabc9f (diff) |
get language from server and save it in a language object, dont use a seperate file for instantiating controllers
Diffstat (limited to 'js/app/controllers')
-rw-r--r-- | js/app/controllers/controllers.coffee | 38 | ||||
-rw-r--r-- | js/app/controllers/feedcontroller.coffee | 13 | ||||
-rw-r--r-- | js/app/controllers/itemcontroller.coffee | 10 |
3 files changed, 16 insertions, 45 deletions
diff --git a/js/app/controllers/controllers.coffee b/js/app/controllers/controllers.coffee deleted file mode 100644 index 8a73549cf..000000000 --- a/js/app/controllers/controllers.coffee +++ /dev/null @@ -1,38 +0,0 @@ -### - -ownCloud - News - -@author Bernhard Posselt -@copyright 2012 Bernhard Posselt nukeawhale@gmail.com - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -License as published by the Free Software Foundation; either -version 3 of the License, or any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU AFFERO GENERAL PUBLIC LICENSE for more details. - -You should have received a copy of the GNU Affero General Public -License along with this library. If not, see <http://www.gnu.org/licenses/>. - -### - -angular.module('News').controller 'FeedController', -['$scope', '_FeedController', 'Persistence', 'FolderBl', 'FeedBl', -'SubscriptionsBl', 'StarredBl', 'unreadCountFormatter', -($scope, _FeedController, Persistence, FolderBl, FeedBl, SubscriptionsBl, -StarredBl, unreadCountFormatter)-> - - return new _FeedController($scope, Persistence, FolderBl, FeedBl, - SubscriptionsBl, StarredBl, unreadCountFormatter) -] - -angular.module('News').controller 'ItemController', -['$scope', '_ItemController', 'ItemBl', 'FeedModel', 'FeedLoading', 'FeedBl', -($scope, _ItemController, ItemBl, FeedModel, FeedLoading, FeedBl)-> - - return new _ItemController($scope, ItemBl, FeedModel, FeedLoading, FeedBl) -]
\ No newline at end of file diff --git a/js/app/controllers/feedcontroller.coffee b/js/app/controllers/feedcontroller.coffee index 8f9f4e7b6..e9171a455 100644 --- a/js/app/controllers/feedcontroller.coffee +++ b/js/app/controllers/feedcontroller.coffee @@ -21,9 +21,12 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. ### -angular.module('News').factory '_FeedController', -['_ExistsError', -(_ExistsError)-> +angular.module('News').controller 'FeedController', +['$scope', '_ExistsError', 'Persistence', 'FolderBl', 'FeedBl', +'SubscriptionsBl', 'StarredBl', 'unreadCountFormatter', +($scope, _ExistsError, Persistence, FolderBl, FeedBl, SubscriptionsBl, +StarredBl, unreadCountFormatter) -> + class FeedController @@ -105,6 +108,8 @@ angular.module('News').factory '_FeedController', @_$scope.$on 'moveFeedToFolder', (scope, data) => @_feedBl.move(data.feedId, data.folderId) - return FeedController + + return new FeedController($scope, Persistence, FolderBl, FeedBl, + SubscriptionsBl, StarredBl, unreadCountFormatter) ]
\ No newline at end of file diff --git a/js/app/controllers/itemcontroller.coffee b/js/app/controllers/itemcontroller.coffee index 514186393..71bbb13be 100644 --- a/js/app/controllers/itemcontroller.coffee +++ b/js/app/controllers/itemcontroller.coffee @@ -21,12 +21,14 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. ### -angular.module('News').factory '_ItemController', -> +angular.module('News').controller 'ItemController', +['$scope', 'ItemBl', 'FeedModel', 'FeedLoading', 'FeedBl', 'Language', +($scope, ItemBl, FeedModel, FeedLoading, FeedBl, Language) -> class ItemController constructor: (@_$scope, @_itemBl, @_feedModel, @_feedLoading, - @_feedBl) -> + @_feedBl, @_language) -> @_$scope.itemBl = @_itemBl @_$scope.feedBl = @_feedBl @@ -42,4 +44,6 @@ angular.module('News').factory '_ItemController', -> return '' - return ItemController
\ No newline at end of file + return new ItemController($scope, ItemBl, FeedModel, FeedLoading, FeedBl, + Language) +]
\ No newline at end of file |