From e6d926de620a470a487010f02b47e3932512db93 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Mon, 8 Apr 2013 15:23:06 +0200 Subject: add link to feed which gets opened when clicked on the subheading of an item --- js/public/app.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'js/public') 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 . ]); 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 . 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 . 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); -- cgit v1.2.3