diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-23 16:43:50 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-23 16:43:50 +0100 |
commit | 842b39c380a1996205042a62d00f0a22db94364a (patch) | |
tree | eb8c1ad5b2e12e6dfa3cf823e5325025ead8bc75 /js/public | |
parent | 01355fa6274ee8bc053798aa0a78d28944a0f304 (diff) |
various bugfixes
Diffstat (limited to 'js/public')
-rw-r--r-- | js/public/app.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/js/public/app.js b/js/public/app.js index d7b0d2f2a..f57367fa0 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -103,8 +103,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. ]); angular.module('News').controller('ItemController', [ - '$scope', '_ItemController', 'ItemModel', function($scope, _ItemController, ItemModel) { - return new _ItemController($scope, ItemModel); + '$scope', '_ItemController', 'ItemModel', 'FeedLoading', function($scope, _ItemController, ItemModel, FeedLoading) { + return new _ItemController($scope, ItemModel, FeedLoading); } ]); @@ -184,9 +184,14 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. var ItemController; ItemController = (function() { - function ItemController($scope, itemModel) { + function ItemController($scope, itemModel, feedLoading) { + var _this = this; this.$scope = $scope; this.itemModel = itemModel; + this.feedLoading = feedLoading; + this.$scope.isLoading = function() { + return _this.feedLoading.isLoading(); + }; } return ItemController; @@ -651,7 +656,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. var _this = this; this._loading.increase(); this.getActiveFeed(function() { - return _this.getItems(_this._activeFeed.getType(), _this._activeFeed.getId(), null, function() { + return _this.getItems(_this._activeFeed.getType(), _this._activeFeed.getId(), 0, function() { return _this._loading.decrease(); }); }); @@ -1032,7 +1037,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. (function() { angular.module('News').factory('Persistence', [ - '_Persistence', 'Request', 'FeedLoading', 'Config', '$rootScope', 'ActiveFeed', function(_Persistence, Request, FeedLoading, Config, ActiveFeed, $rootScope) { + '_Persistence', 'Request', 'FeedLoading', 'Config', 'ActiveFeed', '$rootScope', function(_Persistence, Request, FeedLoading, Config, ActiveFeed, $rootScope) { return new _Persistence(Request, FeedLoading, Config, ActiveFeed, $rootScope); } ]); |