From 6dfbc778ab3070ac8d0e5dec9095e150342fe78f Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Tue, 3 Sep 2013 17:15:59 +0200 Subject: add hint in readme to make data directory readable --- js/public/app.js | 344 ++++++------------------------------------------------- 1 file changed, 34 insertions(+), 310 deletions(-) (limited to 'js') diff --git a/js/public/app.js b/js/public/app.js index b7c4b1aa8..79c08094c 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -1,4 +1,3 @@ -(function(angular, $, moment, undefined){ /** * ownCloud News App - v0.0.1 @@ -11,7 +10,7 @@ */ -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -37,7 +36,6 @@ License along with this library. If not, see . (function() { angular.module('News', ['OC', 'ui']).config(function($provide) { var config; - return $provide.value('Config', config = { markReadTimeout: 500, scrollTimeout: 500, @@ -68,7 +66,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -94,7 +92,6 @@ License along with this library. If not, see . (function() { angular.module('News').directive('newsAudio', function() { var directive; - return directive = { restrict: 'E', scope: { @@ -105,7 +102,6 @@ License along with this library. If not, see . template: '' + '' + '', link: function(scope, elm, attrs) { var cantPlay, source; - source = elm.children().children('source')[0]; cantPlay = false; source.addEventListener('error', function() { @@ -122,7 +118,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -150,7 +146,6 @@ License along with this library. If not, see . '$rootScope', function($rootScope) { return function(scope, elm, attr) { var $elem, details; - $elem = $(elm); details = { accept: '.feed', @@ -158,7 +153,6 @@ License along with this library. If not, see . greedy: true, drop: function(event, ui) { var data; - $('.drag-and-drop').removeClass('drag-and-drop'); data = { folderId: parseInt($elem.data('id'), 10), @@ -175,101 +169,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 -/* - -ownCloud - News - -@author Alessandro Cosentino -@copyright 2013 Alessandro Cosentino cosenal@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 . -*/ - - -(function() { - angular.module('News').directive('globalShortcuts', [ - '$window', function($window) { - return function(scope, elm, attr) { - var jumpTo; - - jumpTo = function($scrollArea, $item) { - var position; - - position = $item.offset().top - $scrollArea.offset().top + $scrollArea.scrollTop(); - return $scrollArea.scrollTop(position); - }; - return $($window.document).keydown(function(e) { - var focused; - - focused = $(':focus'); - if (!(focused.is('input') || focused.is('select') || focused.is('textarea') || focused.is('checkbox') || focused.is('button'))) { - if (e.keyCode === 191) { - return jumpToNextItem(scrollArea); - } - } - }); - }; - } - ]); - -}).call(this); - -// Generated by CoffeeScript 1.6.2 -/* - -ownCloud - News - -@author Alessandro Cosentino -@copyright 2013 Alessandro Cosentino cosenal@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 . -*/ - - -(function() { - angular.module('News').directive('hideOnClick', function() { - return function(scope, elm, attr) { - var options; - - options = scope.$eval(attr.hideOnClick); - if (angular.isDefined(options) && angular.isDefined(options.selector)) { - return $(elm).click(function() { - return $(options.selector).fadeOut(); - }); - } else { - return $(elm).click(function() { - return $(elm).fadeOut(); - }); - } - }; - }); - -}).call(this); - -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -297,16 +197,13 @@ License along with this library. If not, see . '$window', function($window) { return function(scope, elm, attr) { var getCurrentItem, jumpTo, jumpToNextItem, jumpToPreviousItem, keepUnreadCurrentItem, openCurrentItem, starCurrentItem; - jumpTo = function($scrollArea, $item) { var position; - position = $item.offset().top - $scrollArea.offset().top + $scrollArea.scrollTop(); return $scrollArea.scrollTop(position); }; jumpToPreviousItem = function(scrollArea) { var $item, $items, $previous, $scrollArea, item, notJumped, _i, _len; - $scrollArea = $(scrollArea); $items = $scrollArea.find('.feed_item'); notJumped = true; @@ -328,7 +225,6 @@ License along with this library. If not, see . }; jumpToNextItem = function(scrollArea) { var $item, $items, $scrollArea, item, jumped, _i, _len; - $scrollArea = $(scrollArea); $items = $scrollArea.find('.feed_item'); jumped = false; @@ -347,7 +243,6 @@ License along with this library. If not, see . }; getCurrentItem = function(scrollArea) { var $item, $items, $scrollArea, item, _i, _len; - $scrollArea = $(scrollArea); $items = $scrollArea.find('.feed_item'); for (_i = 0, _len = $items.length; _i < _len; _i++) { @@ -360,26 +255,22 @@ License along with this library. If not, see . }; keepUnreadCurrentItem = function(scrollArea) { var $item; - $item = getCurrentItem(scrollArea); return $item.find('.keep_unread').trigger('click'); }; starCurrentItem = function(scrollArea) { var $item; - $item = getCurrentItem(scrollArea); return $item.find('.star').trigger('click'); }; openCurrentItem = function(scrollArea) { var $item; - $item = getCurrentItem(scrollArea).find('.item_title a'); $item.trigger('click'); return window.open($item.attr('href'), '_blank'); }; return $($window.document).keydown(function(e) { var focused, scrollArea; - focused = $(':focus'); if (!(focused.is('input') || focused.is('select') || focused.is('textarea') || focused.is('checkbox') || focused.is('button'))) { scrollArea = elm; @@ -405,7 +296,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -433,16 +324,13 @@ License along with this library. If not, see . '$timeout', function($timeout) { return function(scope, elm, attr) { var options; - options = scope.$eval(attr.newsClickScroll); return elm.click(function() { var direction, scrollArea; - scrollArea = $(options.scrollArea); direction = options.direction; return $timeout(function() { var scrollPosition; - if (direction === 'top') { scrollPosition = 0; } else { @@ -457,7 +345,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -492,7 +380,6 @@ License along with this library. If not, see . return function(scope, elm, attr) { return elm.bind('scroll', function() { var counter, item, _i, _ref, _results; - if (scrolling) { scrolling = false; setTimeout(function() { @@ -502,7 +389,6 @@ License along with this library. If not, see . markingRead = false; setTimeout(function() { var $elems, feedItem, id, offset, _i, _len, _results; - markingRead = true; $elems = elm.find('.feed_item:not(.read)'); _results = []; @@ -542,7 +428,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -570,19 +456,16 @@ License along with this library. If not, see . '$rootScope', '$timeout', 'Config', function($rootScope, $timeout, Config) { return function(scope, elm, attr) { var caption, timeout, undo; - undo = function() {}; caption = ''; timeout = null; $(elm).click(function() { var timout; - timout = null; return $(this).fadeOut(); }); $(elm).find('a').click(function() { var timout; - undo(); timout = null; $rootScope.$apply(); @@ -593,7 +476,6 @@ License along with this library. If not, see . }; return scope.$on('undoMessage', function(scope, data) { var _this = this; - if (timeout) { $timeout.cancel(timeout.promise); } @@ -610,7 +492,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -637,12 +519,10 @@ License along with this library. If not, see . angular.module('News').controller('AppController', [ '$scope', 'Persistence', 'FeedBusinessLayer', function($scope, Persistence, FeedBusinessLayer) { var AppController; - AppController = (function() { function AppController(_$scope, _persistence, _feedBusinessLayer) { var successCallback, _this = this; - this._$scope = _$scope; this._persistence = _persistence; this._feedBusinessLayer = _feedBusinessLayer; @@ -663,7 +543,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -690,11 +570,9 @@ License along with this library. If not, see . angular.module('News').controller('FeedController', [ '$scope', '_ExistsError', 'Persistence', 'FolderBusinessLayer', 'FeedBusinessLayer', 'SubscriptionsBusinessLayer', 'StarredBusinessLayer', 'unreadCountFormatter', 'ActiveFeed', 'FeedType', '$window', function($scope, _ExistsError, Persistence, FolderBusinessLayer, FeedBusinessLayer, SubscriptionsBusinessLayer, StarredBusinessLayer, unreadCountFormatter, ActiveFeed, FeedType, $window) { 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; @@ -714,7 +592,6 @@ License along with this library. If not, see . this._$scope.unreadCountFormatter = this._unreadCountFormatter; this._$scope.getTotalUnreadCount = function() { var count, title, titleCount; - count = _this._subscriptionsBusinessLayer.getUnreadCount(0); if (count > 0) { titleCount = _this._unreadCountFormatter(count); @@ -735,7 +612,6 @@ License along with this library. If not, see . }; this._$scope.addFeed = function(feedUrl, parentFolderId) { var error; - if (parentFolderId == null) { parentFolderId = 0; } @@ -762,13 +638,11 @@ License along with this library. If not, see . }; 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; @@ -799,60 +673,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 -/* - -ownCloud - News - -@_author Alessandro Cosentino -@copyright 2013 Alessandro Cosentino cosenal@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 . -*/ - - -(function() { - angular.module('News').controller('InitController', [ - '$scope', 'Persistence', 'FeedBusinessLayer', function($scope, Persistence, FeedBusinessLayer) { - var InitController; - - InitController = (function() { - function InitController(_$scope, _persistence, _feedBusinessLayer) { - var successCallback, - _this = this; - - 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; - }; - this._persistence.init().then(successCallback); - } - - return InitController; - - })(); - return new InitController($scope, Persistence, FeedBusinessLayer); - } - ]); - -}).call(this); - -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -879,11 +700,9 @@ License along with this library. If not, see . angular.module('News').controller('ItemController', [ '$scope', 'ItemBusinessLayer', 'FeedModel', 'FeedLoading', 'FeedBusinessLayer', 'Language', 'AutoPageLoading', function($scope, ItemBusinessLayer, FeedModel, FeedLoading, FeedBusinessLayer, Language, AutoPageLoading) { var ItemController; - ItemController = (function() { function ItemController(_$scope, _itemBusinessLayer, _feedModel, _feedLoading, _autoPageLoading, _feedBusinessLayer, _language) { var _this = this; - this._$scope = _$scope; this._itemBusinessLayer = _itemBusinessLayer; this._feedModel = _feedModel; @@ -902,7 +721,6 @@ License along with this library. If not, see . }; this._$scope.getFeedTitle = function(feedId) { var feed; - feed = _this._feedModel.getById(feedId); if (angular.isDefined(feed)) { return feed.title; @@ -939,7 +757,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -966,11 +784,9 @@ License along with this library. If not, see . angular.module('News').controller('SettingsController', [ '$scope', 'FeedBusinessLayer', 'FolderBusinessLayer', 'ShowAll', function($scope, FeedBusinessLayer, FolderBusinessLayer, ShowAll) { var _this = this; - $scope.feedBusinessLayer = FeedBusinessLayer; $scope["import"] = function(fileContent) { var error; - $scope.error = false; ShowAll.setShowAll(true); try { @@ -983,7 +799,6 @@ License along with this library. If not, see . }; return $scope.importGoogleReader = function(fileContent) { var error, parsedJSON; - $scope.jsonError = false; ShowAll.setShowAll(true); try { @@ -1000,7 +815,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -1026,12 +841,12 @@ License along with this library. If not, see . (function() { angular.module('News').factory('ActiveFeed', function() { var ActiveFeed; - ActiveFeed = (function() { function ActiveFeed() { /* Default value is all feeds */ + this._id = 0; this._type = 3; } @@ -1057,7 +872,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -1083,7 +898,6 @@ License along with this library. If not, see . (function() { angular.module('News').factory('_BusinessLayer', function() { var BusinessLayer; - BusinessLayer = (function() { function BusinessLayer(_activeFeed, _persistence, _itemModel, _type) { this._activeFeed = _activeFeed; @@ -1113,7 +927,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -1143,7 +957,6 @@ License along with this library. If not, see . angular.module('News').factory('FeedBusinessLayer', [ '_BusinessLayer', 'ShowAll', 'Persistence', 'ActiveFeed', 'FeedType', 'ItemModel', 'FeedModel', 'NewLoading', '_ExistsError', 'Utils', '$rootScope', 'NewestItem', function(_BusinessLayer, ShowAll, Persistence, ActiveFeed, FeedType, ItemModel, FeedModel, NewLoading, _ExistsError, Utils, $rootScope, NewestItem) { var FeedBusinessLayer; - FeedBusinessLayer = (function(_super) { __extends(FeedBusinessLayer, _super); @@ -1177,7 +990,6 @@ License along with this library. If not, see . FeedBusinessLayer.prototype["delete"] = function(feedId) { var data, feed, _this = this; - feed = this._feedModel.removeById(feedId); data = { undoCallback: function() { @@ -1192,7 +1004,6 @@ License along with this library. If not, see . FeedBusinessLayer.prototype.markRead = function(feedId) { var feed, item, newestItemId, _i, _len, _ref; - feed = this._feedModel.getById(feedId); newestItemId = this._newestItem.getId(); if (angular.isDefined(feed) && newestItemId !== 0) { @@ -1226,7 +1037,6 @@ License along with this library. If not, see . FeedBusinessLayer.prototype.move = function(feedId, folderId) { var feed; - feed = this._feedModel.getById(feedId); if (angular.isDefined(feed) && feed.folderId !== folderId) { this._feedModel.update({ @@ -1241,7 +1051,6 @@ License along with this library. If not, see . FeedBusinessLayer.prototype.setShowAll = function(showAll) { var callback, _this = this; - this._showAll.setShowAll(showAll); callback = function() { _this._itemModel.clear(); @@ -1267,7 +1076,6 @@ License along with this library. If not, see . FeedBusinessLayer.prototype.getFeedLink = function(feedId) { var feed; - feed = this._feedModel.getById(feedId); if (angular.isDefined(feed)) { return feed.link; @@ -1277,7 +1085,6 @@ License along with this library. If not, see . FeedBusinessLayer.prototype.create = function(url, parentId, onSuccess, onFailure) { var feed, success, _this = this; - if (parentId == null) { parentId = 0; } @@ -1326,7 +1133,6 @@ License along with this library. If not, see . FeedBusinessLayer.prototype.importGoogleReader = function(json) { var feed, onSuccess, url, _this = this; - url = 'http://owncloud/googlereader'; if (angular.isUndefined(this._feedModel.getByUrl(url))) { feed = { @@ -1340,7 +1146,6 @@ License along with this library. If not, see . } onSuccess = function(response) { var id; - id = response.data.feeds[0].id; return _this.load(id); }; @@ -1356,7 +1161,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -1386,7 +1191,6 @@ License along with this library. If not, see . angular.module('News').factory('FolderBusinessLayer', [ '_BusinessLayer', 'FolderModel', 'FeedBusinessLayer', 'Persistence', 'FeedType', 'ActiveFeed', 'ItemModel', 'ShowAll', '_ExistsError', 'OPMLParser', 'NewestItem', 'FeedModel', '$rootScope', function(_BusinessLayer, FolderModel, FeedBusinessLayer, Persistence, FeedType, ActiveFeed, ItemModel, ShowAll, _ExistsError, OPMLParser, NewestItem, FeedModel, $rootScope) { var FolderBusinessLayer; - FolderBusinessLayer = (function(_super) { __extends(FolderBusinessLayer, _super); @@ -1409,7 +1213,6 @@ License along with this library. If not, see . FolderBusinessLayer.prototype["delete"] = function(folderId) { var data, feed, feeds, folder, _i, _len, _ref, _this = this; - feeds = []; _ref = this._feedBusinessLayer.getFeedsOfFolder(folderId); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -1436,7 +1239,6 @@ License along with this library. If not, see . FolderBusinessLayer.prototype.open = function(folderId) { var folder; - folder = this._folderModel.getById(folderId); if (angular.isDefined(folder)) { if (!folder.opened) { @@ -1448,7 +1250,6 @@ License along with this library. If not, see . FolderBusinessLayer.prototype.toggleFolder = function(folderId) { var folder; - folder = this._folderModel.getById(folderId); if (angular.isDefined(folder)) { folder.opened = !folder.opened; @@ -1462,7 +1263,6 @@ License along with this library. If not, see . FolderBusinessLayer.prototype.markRead = function(folderId) { var feed, folder, item, newestItemId, _i, _j, _len, _len1, _ref, _ref1; - newestItemId = this._newestItem.getId(); folder = this._folderModel.getById(folderId); if (newestItemId !== 0 && angular.isDefined(folder)) { @@ -1488,7 +1288,6 @@ License along with this library. If not, see . FolderBusinessLayer.prototype.isVisible = function(folderId) { var feed, _i, _len, _ref; - if (this._showAll.getShowAll()) { return true; } else { @@ -1515,7 +1314,6 @@ License along with this library. If not, see . FolderBusinessLayer.prototype.create = function(folderName, onSuccess, onFailure) { var folder, success, _this = this; - if (onSuccess == null) { onSuccess = null; } @@ -1553,7 +1351,6 @@ License along with this library. If not, see . FolderBusinessLayer.prototype["import"] = function(xml) { var opml; - opml = this._opmlParser.parseXML(xml); return this._importElement(opml, 0); }; @@ -1561,14 +1358,12 @@ License along with this library. If not, see . FolderBusinessLayer.prototype._importElement = function(opml, parentFolderId) { var item, _i, _len, _ref, _results, _this = this; - _ref = opml.getItems(); _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { item = _ref[_i]; _results.push((function(item) { var error, folder; - if (item.isFolder()) { try { return _this.create(item.getName(), function(data) { @@ -1608,7 +1403,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -1635,7 +1430,6 @@ License along with this library. If not, see . angular.module('News').factory('ItemBusinessLayer', [ 'ItemModel', 'FeedModel', 'Persistence', 'ActiveFeed', 'FeedType', 'StarredBusinessLayer', 'NewestItem', function(ItemModel, FeedModel, Persistence, ActiveFeed, FeedType, StarredBusinessLayer, NewestItem) { var ItemBusinessLayer; - ItemBusinessLayer = (function() { function ItemBusinessLayer(_itemModel, _feedModel, _persistence, _activeFeed, _feedType, _starredBusinessLayer, _newestItem) { this._itemModel = _itemModel; @@ -1657,7 +1451,6 @@ License along with this library. If not, see . ItemBusinessLayer.prototype.isKeptUnread = function(itemId) { var item; - item = this._itemModel.getById(itemId); if (angular.isDefined(item) && angular.isDefined(item.keptUnread)) { return item.keptUnread; @@ -1667,7 +1460,6 @@ License along with this library. If not, see . ItemBusinessLayer.prototype.toggleKeepUnread = function(itemId) { var item; - item = this._itemModel.getById(itemId); if (angular.isDefined(item) && !item.keptUnread) { item.keptUnread = true; @@ -1681,7 +1473,6 @@ License along with this library. If not, see . ItemBusinessLayer.prototype.toggleStarred = function(itemId) { var item; - item = this._itemModel.getById(itemId); if (item.isStarred()) { item.setUnstarred(); @@ -1696,7 +1487,6 @@ License along with this library. If not, see . ItemBusinessLayer.prototype.setRead = function(itemId) { var feed, item, keptUnread; - item = this._itemModel.getById(itemId); if (angular.isDefined(item)) { keptUnread = angular.isDefined(item.keptUnread) && item.keptUnread; @@ -1713,7 +1503,6 @@ License along with this library. If not, see . ItemBusinessLayer.prototype.setUnread = function(itemId) { var feed, item; - item = this._itemModel.getById(itemId); if (angular.isDefined(item)) { if (item.isRead()) { @@ -1729,7 +1518,6 @@ License along with this library. If not, see . ItemBusinessLayer.prototype.getFeedTitle = function(itemId) { var feed, item; - item = this._itemModel.getById(itemId); if (angular.isDefined(item)) { feed = this._feedModel.getById(item.feedId); @@ -1741,7 +1529,6 @@ License along with this library. If not, see . ItemBusinessLayer.prototype.loadNext = function(callback) { var lowestItemId; - lowestItemId = this._itemModel.getLowestId(); if (lowestItemId !== 0) { return this._persistence.getItems(this._activeFeed.getType(), this._activeFeed.getId(), lowestItemId, callback); @@ -1761,7 +1548,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -1791,7 +1578,6 @@ License along with this library. If not, see . angular.module('News').factory('StarredBusinessLayer', [ '_BusinessLayer', 'StarredCount', 'Persistence', 'ActiveFeed', 'FeedType', 'ItemModel', function(_BusinessLayer, StarredCount, Persistence, ActiveFeed, FeedType, ItemModel) { var StarredBusinessLayer; - StarredBusinessLayer = (function(_super) { __extends(StarredBusinessLayer, _super); @@ -1829,7 +1615,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -1859,7 +1645,6 @@ License along with this library. If not, see . angular.module('News').factory('SubscriptionsBusinessLayer', [ '_BusinessLayer', 'FeedBusinessLayer', 'Persistence', 'ShowAll', 'ActiveFeed', 'FeedType', 'ItemModel', 'FeedModel', 'NewestItem', function(_BusinessLayer, FeedBusinessLayer, Persistence, ShowAll, ActiveFeed, FeedType, ItemModel, FeedModel, NewestItem) { var SubscriptionsBusinessLayer; - SubscriptionsBusinessLayer = (function(_super) { __extends(SubscriptionsBusinessLayer, _super); @@ -1873,7 +1658,6 @@ License along with this library. If not, see . SubscriptionsBusinessLayer.prototype.isVisible = function() { var visible; - if (this.isActive(0) && this._feedBusinessLayer.getNumberOfFeeds() > 0) { return true; } @@ -1887,7 +1671,6 @@ License along with this library. If not, see . SubscriptionsBusinessLayer.prototype.markRead = function() { var feed, item, newestItemId, _i, _j, _len, _len1, _ref, _ref1; - newestItemId = this._newestItem.getId(); if (newestItemId !== 0) { _ref = this._feedModel.getAll(); @@ -1917,7 +1700,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -1943,7 +1726,6 @@ License along with this library. If not, see . (function() { angular.module('News').factory('_ExistsError', function() { var ExistsError; - ExistsError = (function() { function ExistsError(message) { this.message = message; @@ -1957,7 +1739,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -1983,7 +1765,6 @@ License along with this library. If not, see . (function() { angular.module('News').factory('FeedType', function() { var feedType; - return feedType = { Feed: 0, Folder: 1, @@ -1995,7 +1776,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -2023,7 +1804,6 @@ License along with this library. If not, see . angular.module('News').factory('Language', function() { var Language; - Language = (function() { function Language() { this._language = 'en'; @@ -2057,7 +1837,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -2087,7 +1867,6 @@ License along with this library. If not, see . angular.module('News').factory('FeedModel', [ '_Model', '_EqualQuery', 'Utils', function(_Model, _EqualQuery, Utils) { var FeedModel; - FeedModel = (function(_super) { __extends(FeedModel, _super); @@ -2104,7 +1883,6 @@ License along with this library. If not, see . FeedModel.prototype.add = function(data, clearCache) { var item, updateById, updateByUrl; - if (clearCache == null) { clearCache = true; } @@ -2141,7 +1919,6 @@ License along with this library. If not, see . FeedModel.prototype.update = function(data, clearCache) { var item, itemWithId; - if (clearCache == null) { clearCache = true; } @@ -2166,7 +1943,6 @@ License along with this library. If not, see . FeedModel.prototype.removeById = function(id) { var item; - item = this.getById(id); delete this._url[item.url]; return FeedModel.__super__.removeById.call(this, id); @@ -2178,7 +1954,6 @@ License along with this library. If not, see . FeedModel.prototype.getUnreadCount = function() { var count, feed, _i, _len, _ref; - count = 0; _ref = this.getAll(); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -2190,7 +1965,6 @@ License along with this library. If not, see . FeedModel.prototype.getFeedUnreadCount = function(feedId) { var count, feed; - feed = this.getById(feedId); count = 0; if (angular.isDefined(feed)) { @@ -2202,7 +1976,6 @@ License along with this library. If not, see . FeedModel.prototype.getFolderUnreadCount = function(folderId) { var count, feed, query, _i, _len, _ref; - query = new _EqualQuery('folderId', parseInt(folderId)); count = 0; _ref = this.get(query); @@ -2215,14 +1988,12 @@ License along with this library. If not, see . FeedModel.prototype.getAllOfFolder = function(folderId) { var query; - query = new _EqualQuery('folderId', parseInt(folderId)); return this.get(query); }; FeedModel.prototype.removeByUrl = function(url, clearCache) { var counter, entry, key, value, _i, _len, _ref, _ref1, _results; - if (clearCache == null) { clearCache = true; } @@ -2265,7 +2036,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -2295,7 +2066,6 @@ License along with this library. If not, see . angular.module('News').factory('FolderModel', [ '_Model', '_EqualQuery', function(_Model, _EqualQuery) { var FolderModel; - FolderModel = (function(_super) { __extends(FolderModel, _super); @@ -2306,7 +2076,6 @@ License along with this library. If not, see . FolderModel.prototype.add = function(data, clearCache) { var item, updateById, updateByName; - if (clearCache == null) { clearCache = true; } @@ -2337,7 +2106,6 @@ License along with this library. If not, see . FolderModel.prototype.update = function(data, clearCache) { var item, itemWithId; - if (clearCache == null) { clearCache = true; } @@ -2371,7 +2139,6 @@ License along with this library. If not, see . FolderModel.prototype.removeById = function(id, clearCache) { var item; - if (clearCache == null) { clearCache = true; } @@ -2386,7 +2153,6 @@ License along with this library. If not, see . FolderModel.prototype.removeByName = function(name, clearCache) { var counter, entry, key, value, _i, _len, _ref, _ref1, _results; - if (clearCache == null) { clearCache = true; } @@ -2430,7 +2196,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -2460,7 +2226,6 @@ License along with this library. If not, see . angular.module('News').factory('ItemModel', [ '_Model', '_MinimumQuery', 'StatusFlag', function(_Model, _MinimumQuery, StatusFlag) { var ItemModel; - ItemModel = (function(_super) { __extends(ItemModel, _super); @@ -2476,7 +2241,6 @@ License along with this library. If not, see . ItemModel.prototype.add = function(data, clearCache) { var entry, hash; - if (clearCache == null) { clearCache = true; } @@ -2514,7 +2278,6 @@ License along with this library. If not, see . ItemModel.prototype.update = function(data, clearCache) { var entry, hash, key, value; - if (clearCache == null) { clearCache = true; } @@ -2535,14 +2298,12 @@ License along with this library. If not, see . ItemModel.prototype.getByGuidHashAndFeedId = function(guidHash, feedId) { var hash; - hash = feedId + '_' + guidHash; return this._guidFeedIdHash[hash]; }; ItemModel.prototype.removeById = function(id) { var hash, item; - item = this.getById(id); hash = item.feedId + '_' + item.guidHash; delete this._guidFeedIdHash[hash]; @@ -2551,7 +2312,6 @@ License along with this library. If not, see . ItemModel.prototype.getLowestId = function() { var lowestId, query; - query = new _MinimumQuery('id'); lowestId = this.get(query); if (angular.isDefined(lowestId)) { @@ -2570,7 +2330,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -2596,7 +2356,6 @@ License along with this library. If not, see . (function() { angular.module('News').factory('NewestItem', function() { var NewestItem; - NewestItem = (function() { function NewestItem() { this._id = 0; @@ -2618,7 +2377,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -2644,7 +2403,6 @@ License along with this library. If not, see . (function() { angular.module('News').factory('OPMLParser', function() { var Feed, Folder, OPMLParser; - Feed = (function() { function Feed(_name, _url) { this._name = _name; @@ -2696,7 +2454,6 @@ License along with this library. If not, see . OPMLParser.prototype.parseXML = function(xml) { var $root, $xml, structure; - $xml = $($.parseXML(xml)); $root = $xml.find('body'); structure = new Folder('root'); @@ -2706,7 +2463,6 @@ License along with this library. If not, see . OPMLParser.prototype._recursivelyParse = function($xml, structure) { var $outline, feed, folder, outline, title, _i, _len, _ref, _results; - _ref = $xml.children('outline'); _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -2733,7 +2489,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -2760,7 +2516,6 @@ License along with this library. If not, see . angular.module('News').factory('Persistence', [ 'Request', 'FeedLoading', 'AutoPageLoading', 'NewLoading', 'Config', 'ActiveFeed', '$rootScope', '$q', function(Request, FeedLoading, AutoPageLoading, NewLoading, Config, ActiveFeed, $rootScope, $q) { var Persistence; - Persistence = (function() { function Persistence(_request, _feedLoading, _autoPageLoading, _newLoading, _config, _activeFeed, _$rootScope) { this._request = _request; @@ -2779,7 +2534,6 @@ License along with this library. If not, see . var successCallback, _this = this; - this.deferred = $q.defer(); this.getActiveFeed(function() { return _this.getItems(_this._activeFeed.getType(), _this._activeFeed.getId()); @@ -2802,7 +2556,6 @@ License along with this library. If not, see . Persistence.prototype.getItems = function(type, id, offset, onSuccess) { var failureCallbackWrapper, loading, params, successCallbackWrapper, _this = this; - if (onSuccess == null) { onSuccess = null; } @@ -2839,7 +2592,6 @@ License along with this library. If not, see . */ var params; - params = { routeParams: { feedId: feedId, @@ -2855,7 +2607,6 @@ License along with this library. If not, see . */ var params; - params = { routeParams: { feedId: feedId, @@ -2871,7 +2622,6 @@ License along with this library. If not, see . */ var params; - params = { routeParams: { itemId: itemId @@ -2886,7 +2636,6 @@ License along with this library. If not, see . */ var params; - params = { routeParams: { itemId: itemId @@ -2901,7 +2650,6 @@ License along with this library. If not, see . */ var params; - params = { data: { highestItemId: highestItemId @@ -2918,7 +2666,6 @@ License along with this library. If not, see . Persistence.prototype.getAllFeeds = function(onSuccess, showLoading) { var failureCallbackWrapper, params, successCallbackWrapper, _this = this; - if (showLoading == null) { showLoading = true; } @@ -2948,7 +2695,6 @@ License along with this library. If not, see . Persistence.prototype.getActiveFeed = function(onSuccess) { var failureCallbackWrapper, params, successCallbackWrapper, _this = this; - this._feedLoading.increase(); successCallbackWrapper = function(data) { onSuccess(); @@ -2966,7 +2712,6 @@ License along with this library. If not, see . Persistence.prototype.createFeed = function(url, parentFolderId, onSuccess, onFailure) { var params; - if (onSuccess == null) { onSuccess = null; } @@ -2988,7 +2733,6 @@ License along with this library. If not, see . Persistence.prototype.deleteFeed = function(feedId) { var params; - params = { routeParams: { feedId: feedId @@ -2999,7 +2743,6 @@ License along with this library. If not, see . Persistence.prototype.restoreFeed = function(feedId, onSuccess) { var params; - if (onSuccess == null) { onSuccess = null; } @@ -3019,7 +2762,6 @@ License along with this library. If not, see . */ var params; - params = { routeParams: { feedId: feedId @@ -3037,7 +2779,6 @@ License along with this library. If not, see . */ var params; - params = { routeParams: { feedId: feedId @@ -3055,7 +2796,6 @@ License along with this library. If not, see . */ var params; - params = { routeParams: { feedId: feedId @@ -3066,7 +2806,6 @@ License along with this library. If not, see . Persistence.prototype.importGoogleReader = function(json, onSuccess) { var params; - params = { data: { json: json @@ -3084,7 +2823,6 @@ License along with this library. If not, see . Persistence.prototype.getAllFolders = function(onSuccess, showLoading) { var failureCallbackWrapper, params, successCallbackWrapper, _this = this; - if (showLoading == null) { showLoading = true; } @@ -3117,7 +2855,6 @@ License along with this library. If not, see . */ var params; - params = { routeParams: { folderId: folderId @@ -3132,7 +2869,6 @@ License along with this library. If not, see . */ var params; - params = { routeParams: { folderId: folderId @@ -3143,7 +2879,6 @@ License along with this library. If not, see . Persistence.prototype.createFolder = function(folderName, parentFolderId, onSuccess, onFailure) { var params; - if (parentFolderId == null) { parentFolderId = 0; } @@ -3172,7 +2907,6 @@ License along with this library. If not, see . */ var params; - params = { routeParams: { folderId: folderId @@ -3183,7 +2917,6 @@ License along with this library. If not, see . Persistence.prototype.restoreFolder = function(folderId, onSuccess) { var params; - if (onSuccess == null) { onSuccess = null; } @@ -3203,7 +2936,6 @@ License along with this library. If not, see . */ var params; - params = { routeParams: { folderId: folderId @@ -3221,7 +2953,6 @@ License along with this library. If not, see . */ var params; - params = { routeParams: { folderId: folderId @@ -3242,6 +2973,7 @@ License along with this library. If not, see . /* Prompts for an OPML download */ + return this._request.get('news_export_opml'); }; @@ -3253,7 +2985,6 @@ License along with this library. If not, see . Persistence.prototype.userSettingsRead = function(onSuccess) { var failureCallbackWrapper, params, successCallbackWrapper, _this = this; - if (onSuccess == null) { onSuccess = null; } @@ -3283,7 +3014,6 @@ License along with this library. If not, see . */ var data; - data = { onSuccess: callback }; @@ -3296,7 +3026,6 @@ License along with this library. If not, see . */ var data; - data = { onSuccess: callback }; @@ -3306,7 +3035,6 @@ License along with this library. If not, see . Persistence.prototype.userSettingsLanguage = function(onSuccess) { var data, failureCallbackWrapper, successCallbackWrapper, _this = this; - if (onSuccess == null) { onSuccess = null; } @@ -3339,7 +3067,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -3390,7 +3118,6 @@ License along with this library. If not, see . angular.module('News').factory('Publisher', [ '_Publisher', 'ActiveFeed', 'ShowAll', 'StarredCount', 'ItemModel', 'FolderModel', 'FeedModel', 'Language', 'NewestItem', function(_Publisher, ActiveFeed, ShowAll, StarredCount, ItemModel, FolderModel, FeedModel, Language, NewestItem) { var publisher; - publisher = new _Publisher(); publisher.subscribeObjectTo(ActiveFeed, 'activeFeed'); publisher.subscribeObjectTo(ShowAll, 'showAll'); @@ -3406,7 +3133,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -3432,7 +3159,6 @@ License along with this library. If not, see . (function() { angular.module('News').factory('ShowAll', function() { var ShowAll; - ShowAll = (function() { function ShowAll() { this._showAll = false; @@ -3458,7 +3184,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -3484,7 +3210,6 @@ License along with this library. If not, see . (function() { angular.module('News').factory('StarredCount', function() { var StarredCount; - StarredCount = (function() { function StarredCount() { this._count = 0; @@ -3510,7 +3235,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -3545,7 +3270,7 @@ License along with this library. If not, see . }).call(this); -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 /* ownCloud - News @@ -3580,4 +3305,3 @@ License along with this library. If not, see . }).call(this); -})(window.angular, window.jQuery, window.moment); \ No newline at end of file -- cgit v1.2.3