diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-08 15:23:06 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-08 15:23:06 +0200 |
commit | e6d926de620a470a487010f02b47e3932512db93 (patch) | |
tree | 36811b84a47fb74e8bda708c4bdacbc7d5e110c5 /js/public | |
parent | e2381ea22cfd3fc1ab6b6c8e472740005ad02f87 (diff) |
add link to feed which gets opened when clicked on the subheading of an item
Diffstat (limited to 'js/public')
-rw-r--r-- | js/public/app.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/js/public/app.js b/js/public/app.js index f4f2b41cb..f62a0c645 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -177,8 +177,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. ]); angular.module('News').controller('ItemController', [ - '$scope', '_ItemController', 'ItemBl', 'FeedModel', 'FeedLoading', function($scope, _ItemController, ItemBl, FeedModel, FeedLoading) { - return new _ItemController($scope, ItemBl, FeedModel, FeedLoading); + '$scope', '_ItemController', 'ItemBl', 'FeedModel', 'FeedLoading', 'FeedBl', function($scope, _ItemController, ItemBl, FeedModel, FeedLoading, FeedBl) { + return new _ItemController($scope, ItemBl, FeedModel, FeedLoading, FeedBl); } ]); @@ -323,13 +323,15 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. var ItemController; ItemController = (function() { - function ItemController(_$scope, _itemBl, _feedModel, _feedLoading) { + function ItemController(_$scope, _itemBl, _feedModel, _feedLoading, _feedBl) { var _this = this; this._$scope = _$scope; this._itemBl = _itemBl; this._feedModel = _feedModel; this._feedLoading = _feedLoading; + this._feedBl = _feedBl; this._$scope.itemBl = this._itemBl; + this._$scope.feedBl = this._feedBl; this._$scope.isLoading = function() { return _this._feedLoading.isLoading(); }; @@ -664,6 +666,14 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. return this._feedModel.getAll(); }; + FeedBl.prototype.getFeedLink = function(feedId) { + var feed; + feed = this._feedModel.getById(feedId); + if (angular.isDefined(feed)) { + return feed.link; + } + }; + return FeedBl; })(_Bl); |