diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-23 16:08:39 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-23 16:08:39 +0100 |
commit | d65fa8090469286396342ff2299b58b79d83f8f3 (patch) | |
tree | c1364cc456f556205d8e14f729b38ba745b3ba06 /js/app | |
parent | 1f670b3180cfd71b8085c4ef0fe414a6a78e7d44 (diff) |
fixed dicontainer and added basic controllers
Diffstat (limited to 'js/app')
-rw-r--r-- | js/app/controllers/controllers.coffee | 43 | ||||
-rw-r--r-- | js/app/controllers/feedcontroller.coffee | 31 | ||||
-rw-r--r-- | js/app/controllers/itemcontroller.coffee | 31 | ||||
-rw-r--r-- | js/app/controllers/settingscontroller.coffee | 31 | ||||
-rw-r--r-- | js/app/services/services.coffee | 11 |
5 files changed, 144 insertions, 3 deletions
diff --git a/js/app/controllers/controllers.coffee b/js/app/controllers/controllers.coffee new file mode 100644 index 000000000..55566f7d0 --- /dev/null +++ b/js/app/controllers/controllers.coffee @@ -0,0 +1,43 @@ +### + +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 'SettingsController', +['$scope', '_SettingsController', +($scope, _SettingsController)-> + + return new _SettingsController($scope) +] + + +angular.module('News').controller 'FeedController', +['$scope', '_FeedController', 'FolderModel', 'FeedModel', +($scope, _FeedController, FolderModel, FeedModel)-> + + return new _FeedController($scope, FolderModel, FeedModel) +] + +angular.module('News').controller 'ItemController', +['$scope', '_ItemController', 'ItemModel', +($scope, _ItemController, ItemModel)-> + + return new _ItemController($scope, ItemModel) +]
\ No newline at end of file diff --git a/js/app/controllers/feedcontroller.coffee b/js/app/controllers/feedcontroller.coffee new file mode 100644 index 000000000..a641a8a9c --- /dev/null +++ b/js/app/controllers/feedcontroller.coffee @@ -0,0 +1,31 @@ +### + +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').factory '_FeedController', -> + + class FeedController + + constructor: (@$scope, @folderModel, @feedModel) -> + + + return FeedController
\ No newline at end of file diff --git a/js/app/controllers/itemcontroller.coffee b/js/app/controllers/itemcontroller.coffee new file mode 100644 index 000000000..3350c674e --- /dev/null +++ b/js/app/controllers/itemcontroller.coffee @@ -0,0 +1,31 @@ +### + +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').factory '_ItemController', -> + + class ItemController + + constructor: (@$scope, @itemModel) -> + + + return ItemController
\ No newline at end of file diff --git a/js/app/controllers/settingscontroller.coffee b/js/app/controllers/settingscontroller.coffee new file mode 100644 index 000000000..0383b13fe --- /dev/null +++ b/js/app/controllers/settingscontroller.coffee @@ -0,0 +1,31 @@ +### + +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').factory '_SettingsController', -> + + class SettingsController + + constructor: (@$scope) -> + + + return SettingsController
\ No newline at end of file diff --git a/js/app/services/services.coffee b/js/app/services/services.coffee index 31b33871c..08d4d6274 100644 --- a/js/app/services/services.coffee +++ b/js/app/services/services.coffee @@ -23,9 +23,9 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. # request related stuff angular.module('News').factory 'Persistence', ['_Persistence', 'Request', -'Loading', 'Config', '$rootScope', 'ActiveFeed', -(_Persistence, Request, Loading, Config, ActiveFeed, $rootScope) -> - return new _Persistence(Request, Loading, Config, ActiveFeed, $rootScope) +'FeedLoading', 'Config', '$rootScope', 'ActiveFeed', +(_Persistence, Request, FeedLoading, Config, ActiveFeed, $rootScope) -> + return new _Persistence(Request, FeedLoading, Config, ActiveFeed, $rootScope) ] angular.module('News').factory 'Request', @@ -34,6 +34,11 @@ angular.module('News').factory 'Request', return new _Request($http, Publisher, Router) ] +# loading helpers +angular.module('News').factory 'FeedLoading', +['_Loading', (_Loading) -> + return new _Loading() +] # models angular.module('News').factory 'ActiveFeed', ['_ActiveFeed', (_ActiveFeed) -> |