diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-13 22:48:54 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-13 22:48:54 +0200 |
commit | f333f6b38f985c40247f7c82dd462f3016611dfe (patch) | |
tree | 80d7b1eed242e46af01cba658313703428ccb699 | |
parent | b9de58c0c9da63f6a489df416df1819a40cb507d (diff) |
fix js tests
-rw-r--r-- | appinfo/app.php | 2 | ||||
-rw-r--r-- | appinfo/application.php | 2 | ||||
-rw-r--r-- | controller/itemapicontroller.php | 18 | ||||
-rw-r--r-- | controller/itemcontroller.php | 18 | ||||
-rw-r--r-- | js/public/app.js | 1067 | ||||
-rw-r--r-- | js/tests/services/businesslayer/feedbusinesslayerSpec.coffee | 4 | ||||
-rw-r--r-- | js/tests/services/businesslayer/folderbusinesslayerSpec.coffee | 4 | ||||
-rw-r--r-- | utility/config.php | 4 | ||||
-rw-r--r-- | warn | 12 |
9 files changed, 590 insertions, 541 deletions
diff --git a/appinfo/app.php b/appinfo/app.php index ebd5f47a7..daf0ec5b4 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -27,6 +27,6 @@ try { } catch(\OCA\News\Config\DependencyException $e) { $logger = $container->getLogger(); $params = $container->getLoggerParameters(); - $logger->warn($e->getMessage(), $params); + $logger->warning($e->getMessage(), $params); } diff --git a/appinfo/application.php b/appinfo/application.php index bf11936bd..8b7f46e25 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -288,7 +288,7 @@ class Application extends App { return array('app' => $c->query('AppName')); }); - $container->registerService('Db', function() { + $container->registerService('Db', function($c) { return $c->query('ServerContainer')->getDb(); }); diff --git a/controller/itemapicontroller.php b/controller/itemapicontroller.php index 8cd8b5578..5ab728d55 100644 --- a/controller/itemapicontroller.php +++ b/controller/itemapicontroller.php @@ -82,15 +82,6 @@ class ItemApiController extends ApiController { } - private function setStarred($isStarred, $feedId, $guidHash) { - try { - $this->itemBusinessLayer->star($feedId, $guidHash, $isStarred, $this->userId); - } catch(BusinessLayerException $ex){ - return $this->error($ex, Http::STATUS_NOT_FOUND); - } - } - - /** * @NoAdminRequired * @NoCSRFRequired @@ -115,6 +106,15 @@ class ItemApiController extends ApiController { } + private function setStarred($isStarred, $feedId, $guidHash) { + try { + $this->itemBusinessLayer->star($feedId, $guidHash, $isStarred, $this->userId); + } catch(BusinessLayerException $ex){ + return $this->error($ex, Http::STATUS_NOT_FOUND); + } + } + + /** * @NoAdminRequired * @NoCSRFRequired diff --git a/controller/itemcontroller.php b/controller/itemcontroller.php index 3313f583b..67efb4b85 100644 --- a/controller/itemcontroller.php +++ b/controller/itemcontroller.php @@ -116,11 +116,6 @@ class ItemController extends Controller { } - private function setStarred($isStarred, $feedId, $guidHash){ - $this->itemBusinessLayer->star($feedId, $guidHash, $isStarred, $this->userId); - } - - /** * @NoAdminRequired * @@ -129,7 +124,7 @@ class ItemController extends Controller { */ public function star($feedId, $guidHash){ try { - $this->setStarred(true, $feedId, $guidHash); + $this->itemBusinessLayer->star($feedId, $guidHash, true, $this->userId); } catch(BusinessLayerException $ex) { return $this->error($ex, Http::STATUS_NOT_FOUND); } @@ -144,18 +139,13 @@ class ItemController extends Controller { */ public function unstar($feedId, $guidHash){ try { - $this->setStarred(false, $feedId, $guidHash); + $this->itemBusinessLayer->star($feedId, $guidHash, false, $this->userId); } catch(BusinessLayerException $ex) { return $this->error($ex, Http::STATUS_NOT_FOUND); } } - private function setRead($isRead, $itemId){ - $this->itemBusinessLayer->read($itemId, $isRead, $this->userId); - } - - /** * @NoAdminRequired * @@ -163,7 +153,7 @@ class ItemController extends Controller { */ public function read($itemId){ try { - $this->setRead(true); + $this->itemBusinessLayer->read($itemId, true, $this->userId); } catch(BusinessLayerException $ex) { return $this->error($ex, Http::STATUS_NOT_FOUND); } @@ -177,7 +167,7 @@ class ItemController extends Controller { */ public function unread($itemId){ try { - $this->setRead(false); + $this->itemBusinessLayer->read($itemId, false, $this->userId); } catch(BusinessLayerException $ex) { return $this->error($ex, Http::STATUS_NOT_FOUND); } diff --git a/js/public/app.js b/js/public/app.js index c1c2363be..608fdb4d7 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -10,7 +10,8 @@ */ -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -30,8 +31,7 @@ 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/>. -*/ - + */ (function() { angular.module('News', ['ui']).config([ @@ -69,7 +69,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -89,8 +90,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').directive('newsAudio', function() { @@ -121,7 +121,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 (function() { angular.module('News').directive('newsAutoFocus', function() { var directive; @@ -137,7 +137,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -157,8 +158,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').directive('newsBindHtmlUnsafe', function() { @@ -171,7 +171,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -191,8 +192,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').directive('ocClickFocus', [ @@ -217,7 +217,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -237,8 +238,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').directive('ocClickSlideToggle', [ @@ -298,7 +298,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -318,8 +319,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').directive('ocDraggable', function() { @@ -336,7 +336,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -356,8 +357,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').directive('droppable', [ @@ -387,7 +387,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -407,8 +408,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').directive('ocForwardClick', function() { @@ -425,7 +425,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -445,8 +446,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').directive('itemShortcuts', [ @@ -568,7 +568,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -588,8 +589,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').directive('newsClickScroll', [ @@ -617,7 +617,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -637,8 +638,7 @@ 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/>. -*/ - + */ (function() { var markingRead, scrolling; @@ -700,7 +700,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -720,8 +721,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').directive('newsPullToRefresh', [ @@ -751,7 +751,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -771,15 +772,14 @@ 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/>. -*/ + */ /* This directive can be bound on an input element with type file When a file is input, the content will be passed to the given function as $fileContent parameter -*/ - + */ (function() { angular.module('News').directive('ocReadFile', [ @@ -802,7 +802,8 @@ $fileContent parameter }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -822,8 +823,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').directive('ocTooltip', function() { @@ -834,7 +834,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -854,8 +855,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').directive('newsTranslate', function() { @@ -872,7 +872,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -892,8 +893,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').directive('undoNotification', [ @@ -935,7 +935,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -955,8 +956,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').filter('trustUrl', [ @@ -969,7 +969,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -989,8 +990,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').controller('AppController', [ @@ -998,16 +998,17 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. var AppController; AppController = (function() { function AppController(_$scope, _persistence, _feedBusinessLayer) { - var successCallback, - _this = this; + var successCallback; this._$scope = _$scope; this._persistence = _persistence; this._feedBusinessLayer = _feedBusinessLayer; this._$scope.initialized = false; this._$scope.feedBusinessLayer = this._feedBusinessLayer; - successCallback = function() { - return _this._$scope.initialized = true; - }; + successCallback = (function(_this) { + return function() { + return _this._$scope.initialized = true; + }; + })(this); this._persistence.init().then(successCallback); } @@ -1020,7 +1021,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -1040,8 +1042,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').controller('FeedController', [ @@ -1049,7 +1050,6 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. var FeedController; FeedController = (function() { function FeedController(_$scope, _persistence, _folderBusinessLayer, _feedBusinessLayer, _subscriptionsBusinessLayer, _starredBusinessLayer, _unreadCountFormatter, _activeFeed, _feedType, _$window) { - var _this = this; this._$scope = _$scope; this._persistence = _persistence; this._folderBusinessLayer = _folderBusinessLayer; @@ -1075,83 +1075,95 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. feed.editing = false; return feed.title = feed.originalValue; }; - this._$scope.getTotalUnreadCount = function() { - var appName, count, title, titleCount; - count = _this._subscriptionsBusinessLayer.getUnreadCount(0); - if (_this._$scope.translations && _this._$scope.translations.appName) { - appName = _this._$scope.translations.appName; - } else { - appName = ''; - } - if (count > 0) { - titleCount = _this._unreadCountFormatter(count); - title = appName + ' (' + titleCount + ') | ownCloud'; - } else { - title = appName + ' | ownCloud'; - } - if (_this._$window.document.title !== title) { - _this._$window.document.title = title; - } - return count; - }; - this._$scope.isAddingFolder = function() { - return _this._isAddingFolder; - }; - this._$scope.isAddingFeed = function() { - return _this._isAddingFeed; - }; - this._$scope.addFeed = function(feedUrl, parentFolderId) { - var error; - if (parentFolderId == null) { - parentFolderId = 0; - } - _this._$scope.feedExistsError = false; - try { - _this._isAddingFeed = true; - if (parentFolderId !== 0) { - _this._folderBusinessLayer.open(parentFolderId); + this._$scope.getTotalUnreadCount = (function(_this) { + return function() { + var appName, count, title, titleCount; + count = _this._subscriptionsBusinessLayer.getUnreadCount(0); + if (_this._$scope.translations && _this._$scope.translations.appName) { + appName = _this._$scope.translations.appName; + } else { + appName = ''; + } + if (count > 0) { + titleCount = _this._unreadCountFormatter(count); + title = appName + ' (' + titleCount + ') | ownCloud'; + } else { + title = appName + ' | ownCloud'; } - _this._$scope.feedUrl = ''; - return _this._feedBusinessLayer.create(feedUrl, parentFolderId, function(data) { - _this._isAddingFeed = false; - return _this._feedBusinessLayer.load(data['feeds'][0].id); - }, function() { + if (_this._$window.document.title !== title) { + _this._$window.document.title = title; + } + return count; + }; + })(this); + this._$scope.isAddingFolder = (function(_this) { + return function() { + return _this._isAddingFolder; + }; + })(this); + this._$scope.isAddingFeed = (function(_this) { + return function() { + return _this._isAddingFeed; + }; + })(this); + this._$scope.addFeed = (function(_this) { + return function(feedUrl, parentFolderId) { + var error; + if (parentFolderId == null) { + parentFolderId = 0; + } + _this._$scope.feedExistsError = false; + try { + _this._isAddingFeed = true; + if (parentFolderId !== 0) { + _this._folderBusinessLayer.open(parentFolderId); + } + _this._$scope.feedUrl = ''; + return _this._feedBusinessLayer.create(feedUrl, parentFolderId, function(data) { + _this._isAddingFeed = false; + return _this._feedBusinessLayer.load(data['feeds'][0].id); + }, function() { + return _this._isAddingFeed = false; + }); + } catch (_error) { + error = _error; + if (error instanceof _ExistsError) { + _this._$scope.feedExistsError = true; + } return _this._isAddingFeed = false; - }); - } catch (_error) { - error = _error; - if (error instanceof _ExistsError) { - _this._$scope.feedExistsError = true; } - return _this._isAddingFeed = false; - } - }; - this._$scope.addFolder = function(folderName) { - var error; - _this._$scope.folderExistsError = false; - try { - _this._isAddingFolder = true; - return _this._folderBusinessLayer.create(folderName, function(data) { - var activeId; - _this._$scope.folderName = ''; - _this._$scope.addNewFolder = false; - _this._isAddingFolder = false; - activeId = data['folders'][0].id; - return _this._$scope.folderId = _this._folderBusinessLayer.getById(activeId); - }, function() { + }; + })(this); + this._$scope.addFolder = (function(_this) { + return function(folderName) { + var error; + _this._$scope.folderExistsError = false; + try { + _this._isAddingFolder = true; + return _this._folderBusinessLayer.create(folderName, function(data) { + var activeId; + _this._$scope.folderName = ''; + _this._$scope.addNewFolder = false; + _this._isAddingFolder = false; + activeId = data['folders'][0].id; + return _this._$scope.folderId = _this._folderBusinessLayer.getById(activeId); + }, function() { + return _this._isAddingFolder = false; + }); + } catch (_error) { + error = _error; + if (error instanceof _ExistsError) { + _this._$scope.folderExistsError = true; + } return _this._isAddingFolder = false; - }); - } catch (_error) { - error = _error; - if (error instanceof _ExistsError) { - _this._$scope.folderExistsError = true; } - return _this._isAddingFolder = false; - } - }; - this._$scope.$on('moveFeedToFolder', function(scope, data) { - return _this._feedBusinessLayer.move(data.feedId, data.folderId); - }); + }; + })(this); + this._$scope.$on('moveFeedToFolder', (function(_this) { + return function(scope, data) { + return _this._feedBusinessLayer.move(data.feedId, data.folderId); + }; + })(this)); } return FeedController; @@ -1163,7 +1175,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -1183,8 +1196,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').controller('ItemController', [ @@ -1192,7 +1204,6 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. var ItemController; ItemController = (function() { function ItemController(_$scope, _itemBusinessLayer, _feedModel, _feedLoading, _autoPageLoading, _feedBusinessLayer, _language, _compact) { - var _this = this; this._$scope = _$scope; this._itemBusinessLayer = _itemBusinessLayer; this._feedModel = _feedModel; @@ -1204,48 +1215,64 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. this._autoPaging = true; this._$scope.itemBusinessLayer = this._itemBusinessLayer; this._$scope.feedBusinessLayer = this._feedBusinessLayer; - this._$scope.isLoading = function() { - return _this._feedLoading.isLoading(); - }; - this._$scope.isAutoPaging = function() { - return _this._autoPageLoading.isLoading(); - }; - this._$scope.getFeedTitle = function(feedId) { - var feed; - feed = _this._feedModel.getById(feedId); - if (angular.isDefined(feed)) { - return feed.title; - } else { - return ''; - } - }; - this._$scope.getRelativeDate = function(date) { - if (date) { - return _this._language.getMomentFromTimestamp(date).fromNow(); - } else { - return ''; - } - }; - this._$scope.loadNew = function() { - _this._$scope.refresh = true; - return _this._itemBusinessLayer.loadNew(function() { - return _this._$scope.refresh = false; - }); - }; - this._$scope.$on('readItem', function(scope, data) { - return _this._itemBusinessLayer.setRead(data); - }); - this._$scope.$on('autoPage', function() { - if (_this._autoPaging) { - _this._autoPaging = false; - return _this._itemBusinessLayer.loadNext(function(data) { - return _this._autoPaging = true; + this._$scope.isLoading = (function(_this) { + return function() { + return _this._feedLoading.isLoading(); + }; + })(this); + this._$scope.isAutoPaging = (function(_this) { + return function() { + return _this._autoPageLoading.isLoading(); + }; + })(this); + this._$scope.getFeedTitle = (function(_this) { + return function(feedId) { + var feed; + feed = _this._feedModel.getById(feedId); + if (angular.isDefined(feed)) { + return feed.title; + } else { + return ''; + } + }; + })(this); + this._$scope.getRelativeDate = (function(_this) { + return function(date) { + if (date) { + return _this._language.getMomentFromTimestamp(date).fromNow(); + } else { + return ''; + } + }; + })(this); + this._$scope.loadNew = (function(_this) { + return function() { + _this._$scope.refresh = true; + return _this._itemBusinessLayer.loadNew(function() { + return _this._$scope.refresh = false; }); - } - }); - this._$scope.isCompactView = function() { - return _this._compact.isCompact(); - }; + }; + })(this); + this._$scope.$on('readItem', (function(_this) { + return function(scope, data) { + return _this._itemBusinessLayer.setRead(data); + }; + })(this)); + this._$scope.$on('autoPage', (function(_this) { + return function() { + if (_this._autoPaging) { + _this._autoPaging = false; + return _this._itemBusinessLayer.loadNext(function(data) { + return _this._autoPaging = true; + }); + } + }; + })(this)); + this._$scope.isCompactView = (function(_this) { + return function() { + return _this._compact.isCompact(); + }; + })(this); } return ItemController; @@ -1257,7 +1284,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); -// Generated by CoffeeScript 1.6.3 +// Generated by CoffeeScript 1.7.1 + /* ownCloud - News @@ -1277,8 +1305,7 @@ 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/>. -*/ - + */ (function() { angular.module('News').controller('SettingsController', [ @@ -1322,7 +1349,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. }).call(this); |