summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2015-05-08 10:13:42 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2015-05-08 10:13:42 +0200
commit5e1005f3e704c01476cd7f971698d42296ed3795 (patch)
tree385bd2ae8c3b4a6387e71f400e51618b4c868606
parente76e75ac80e209d9f3f5be0ef119282590173190 (diff)
fix #786
-rw-r--r--CHANGELOG.md1
-rw-r--r--js/build/app.js7
-rw-r--r--js/build/app.min.js4
-rw-r--r--js/build/app.min.js.map2
-rw-r--r--js/gui/KeyboardShortcuts.js7
5 files changed, 16 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d20dc8e69..edc224f4d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,7 @@
owncloud-news (5.3.3)
* **Enhancement**: Add shortcut for marking the current article's feed/folder read, #635
* **Bugfix**: When collapsing an article in compact view, remove content to stop playing audio/video from iframes, #787
+* **Bugfix**: If expand in compact view is enabled, keyboard shortcuts will now expand the first item if the scroll position is at the top and the first item has not been expanded yet, #786
owncloud-news (5.3.2)
* **Enhancement**: Disable expand on key navigation setting if compact view is not enabled, #774
diff --git a/js/build/app.js b/js/build/app.js
index 20330a0b8..31432ddf2 100644
--- a/js/build/app.js
+++ b/js/build/app.js
@@ -2343,7 +2343,12 @@ app.service('SettingsResource', ["$http", "BASE_URL", function ($http, BASE_URL)
items.each(function (index, item) {
item = $(item);
- if (item.position().top > 1) {
+ // special treatment for items that have expand enabled:
+ // if you click next and the first item has not been expaned and
+ // is on the top, it should be expanded instead of the next one
+ if ((item.position().top === 0 && expandItemInCompact &&
+ !item.hasClass('open')) ||
+ item.position().top > 1) {
scrollToItem(scrollArea, item, expandItemInCompact);
jumped = true;
diff --git a/js/build/app.min.js b/js/build/app.min.js
index 5e852cd7f..d7218e646 100644
--- a/js/build/app.min.js
+++ b/js/build/app.min.js
@@ -1,3 +1,3 @@
-!function(a,b,c,d,e,f,g,h,i){"use strict";var j=d.module("News",["ngRoute","ngSanitize","ngAnimate"]);j.config(["$routeProvider","$provide","$httpProvider",function(a,b,c){var d={FEED:0,FOLDER:1,STARRED:2,SUBSCRIPTIONS:3,SHARED:4,EXPLORE:5};b.constant("REFRESH_RATE",60),b.constant("ITEM_BATCH_SIZE",40),b.constant("ITEM_AUTO_PAGE_SIZE",20),b.constant("BASE_URL",f.generateUrl("/apps/news")),b.constant("FEED_TYPE",d),b.constant("MARK_READ_TIMEOUT",.5),b.constant("SCROLL_TIMEOUT",.1),b.factory("CSRFInterceptor",["$q","BASE_URL","$window",function(a,b,c){return{request:function(d){var e=c.location.href.split(c.location.pathname)[0];return(0===d.url.indexOf(b)||0===d.url.indexOf(e))&&(d.headers.requesttoken=g),d||a.when(d)}}}]);var e={0:t("news","Request failed, network connection unavailable!"),401:t("news","Request unauthorized. Are you logged in?"),403:t("news","Request forbidden. Are you an admin?"),412:t("news","Token expired or app not enabled! Reload the page!"),500:t("news","Internal server error! Please check your data/owncloud.log file for additional information!"),503:t("news","Request failed, ownCloud is in currently in maintenance mode!")};b.factory("ConnectionErrorInterceptor",["$q","$timeout",function(a,b){var c;return{responseError:function(d){return d.status in e&&(c&&b.cancel(c),f.Notification.hide(),f.Notification.showHtml(e[d.status]),c=b(function(){f.Notification.hide()},5e3)),a.reject(d)}}}]),c.interceptors.push("CSRFInterceptor"),c.interceptors.push("ConnectionErrorInterceptor");var h=function(a){return{data:["$http","$route","$q","$location","BASE_URL","ITEM_BATCH_SIZE","FEED_TYPE","SettingsResource","FeedResource",function(b,c,d,e,f,g,h,j,k){var l=j.get("showAll"),m=j.get("oldestFirst"),n=e.search().search||"",o=d.defer();if(null===l||null===m)o.resolve({});else{var p={type:a,limit:g,showAll:l,oldestFirst:m,search:n};if(c.current.params.id!==i&&(p.id=c.current.params.id),a===h.FEED){var q=k.getById(p.id);q===i||2===q.ordering?p.oldestFirst=!1:1===q.ordering&&(p.oldestFirst=!0)}b({url:f+"/items",method:"GET",params:p}).success(function(a){o.resolve(a)})}return o.promise}]}},j=function(){return{sites:["$http","$q","BASE_URL","Publisher","SettingsResource",function(a,b,c,d,e){var f=b.defer();return a.get(c+"/settings").then(function(b){d.publishAll(b);var c=e.get("exploreUrl"),f=e.get("language");return a({url:c,method:"GET",params:{lang:f}})}).then(function(a){f.resolve(a.data)})["catch"](function(){f.reject()}),f.promise}]}};a.when("/items",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.SUBSCRIPTIONS),type:d.SUBSCRIPTIONS}).when("/items/starred",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.STARRED),type:d.STARRED}).when("/items/feeds/:id",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.FEED),type:d.FEED}).when("/items/folders/:id",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.FOLDER),type:d.FOLDER}).when("/explore",{controller:"ExploreController as Explore",templateUrl:"explore.html",resolve:j(),type:d.EXPLORE}).when("/shortcuts",{templateUrl:"shortcuts.html",type:-1})}]),j.run(["$rootScope","$location","$http","$q","$interval","$route","Loading","ItemResource","FeedResource","FolderResource","SettingsResource","Publisher","BASE_URL","FEED_TYPE","REFRESH_RATE",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){g.setLoading("global",!0),l.subscribe(h).toChannels(["items","newestItemId","starred"]),l.subscribe(j).toChannels(["folders"]),l.subscribe(i).toChannels(["feeds"]),l.subscribe(k).toChannels(["settings"]);var p=d.defer();c.get(m+"/settings").success(function(a){l.publishAll(a),p.resolve()});var q=d.defer(),r=b.path();c.get(m+"/feeds/active").success(function(a){var c;switch(a.activeFeed.type){case n.FEED:c="/items/feeds/"+a.activeFeed.id;break;case n.FOLDER:c="/items/folders/"+a.activeFeed.id;break;case n.STARRED:c="/items/starred";break;case n.EXPLORE:c="/explore";break;default:c="/items"}/^\/items(\/(starred|explore|feeds\/\d+|folders\/\d+))?\/?$/.test(r)||b.path(c),q.resolve()});var s,t=d.defer();c.get(m+"/feeds").success(function(a){s=a,t.resolve()});var u,v=d.defer();c.get(m+"/folders").success(function(a){u=a,v.resolve()}),d.all([t.promise,v.promise]).then(function(){l.publishAll(s),l.publishAll(u),0===s.feeds.length&&0===u.folders.length&&b.path("/explore")}),d.all([p.promise,q.promise,t.promise,v.promise]).then(function(){f.reload(),g.setLoading("global",!1)}),e(function(){c.get(m+"/feeds").success(function(a){l.publishAll(a)}),c.get(m+"/folders").success(function(a){l.publishAll(a)})},1e3*o),a.$on("$routeChangeStart",function(){g.setLoading("content",!0)}),a.$on("$routeChangeSuccess",function(){g.setLoading("content",!1)}),a.$on("$routeChangeError",function(){b.path("/items")})}]),j.controller("AppController",["Loading","FeedResource","FolderResource",function(a,b,c){this.loading=a,this.isFirstRun=function(){return 0===b.size()&&0===c.size()},this.play=function(a){this.playingItem=a}}]),j.controller("ContentController",["Publisher","FeedResource","ItemResource","SettingsResource","data","$route","$routeParams","$location","FEED_TYPE","ITEM_AUTO_PAGE_SIZE","Loading",function(a,b,c,d,e,f,g,h,j,k,l){c.clear(),a.publishAll(e),this.isAutoPagingEnabled=!0,c.size()>=k?this.isNothingMoreToAutoPage=!1:this.isNothingMoreToAutoPage=!0,this.getItems=function(){return c.getAll()},this.toggleStar=function(a){c.toggleStar(a)},this.toggleItem=function(a){this.isCompactView()&&(a.show=!a.show)},this.isShowAll=function(){return d.get("showAll")},this.markRead=function(a){var d=c.get(a);d.keepUnread||d.unread!==!0||(c.markItemRead(a),b.markItemOfFeedRead(d.feedId))},this.getFeed=function(a){return b.getById(a)},this.toggleKeepUnread=function(a){var d=c.get(a);d.unread||(b.markItemOfFeedUnread(d.feedId),c.markItemRead(a,!1)),d.keepUnread=!d.keepUnread};var m=this,n=function(){var a=d.get("oldestFirst");if(m.isFeed()){var c=b.getById(g.id);c&&1===c.ordering?a=!0:c&&2===c.ordering&&(a=!1)}return a};this.orderBy=function(){return n()?"id":"-id"},this.isCompactView=function(){return d.get("compact")},this.isCompactExpand=function(){return d.get("compactExpand")},this.autoPagingEnabled=function(){return this.isAutoPagingEnabled},this.markReadEnabled=function(){return!d.get("preventReadOnScroll")},this.scrollRead=function(a){var d=[],e=[];a.forEach(function(a){var b=c.get(a);b.keepUnread||(d.push(a),e.push(b.feedId))}),d.length>0&&(b.markItemsOfFeedsRead(e),c.markItemsRead(d))},this.isFeed=function(){return f.current.$$route.type===j.FEED},this.autoPage=function(){if(!this.isNothingMoreToAutoPage){if(!this.isAutoPagingEnabled)return void(this.autoPageAgain=!0);this.isAutoPagingEnabled=!1,this.autoPageAgain=!1;var b=f.current.$$route.type,e=g.id,i=n(),j=d.get("showAll"),m=this,o=h.search().search;l.setLoading("autopaging",!0),c.autoPage(b,e,i,j,o).success(function(b){a.publishAll(b),b.items.length>=k?m.isAutoPagingEnabled=!0:m.isNothingMoreToAutoPage=!0,m.isAutoPagingEnabled&&m.autoPageAgain&&m.autoPage()}).error(function(){m.isAutoPagingEnabled=!0})["finally"](function(){l.setLoading("autopaging",!1)})}},this.getRelativeDate=function(a){if(a!==i&&""!==a){var b=d.get("language"),c=moment.unix(a).locale(b).fromNow()+"";return c}return""},this.refresh=function(){f.reload()},this.getMediaType=function(a){return a&&0===a.indexOf("audio")?"audio":a&&0===a.indexOf("video")?"video":i}}]),j.controller("ExploreController",["sites","$rootScope","FeedResource",function(a,b,c){this.sites=a,this.feedExists=function(a){return c.getByLocation(a)!==i},this.subscribeTo=function(a){b.$broadcast("addFeed",a)},this.isCategoryShown=function(a){return a.filter(function(a){return c.getByLocation(a.feed)===i}).length>0}}]),j.controller("NavigationController",["$route","FEED_TYPE","FeedResource","FolderResource","ItemResource","SettingsResource","Publisher","$rootScope","$location","$q",function(a,b,c,d,e,f,g,h,j,k){this.feedError="",this.showNewFolder=!1,this.renamingFolder=!1,this.addingFeed=!1,this.addingFolder=!1,this.folderError="",this.renameError="",this.feed={};var l=function(){return parseInt(a.current.params.id,10)};this.getFeeds=function(){return c.getAll()},this.getFolders=function(){return d.getAll()},this.markFolderRead=function(a){c.markFolderRead(a),c.getByFolderId(a).forEach(function(a){e.markFeedRead(a.id)})},this.markFeedRead=function(a){e.markFeedRead(a),c.markFeedRead(a)},this.markRead=function(){e.markRead(),c.markRead()},this.isShowAll=function(){return f.get("showAll")},this.getFeedsOfFolder=function(a){return c.getByFolderId(a)},this.getUnreadCount=function(){return c.getUnreadCount()},this.getFeedUnreadCount=function(a){var b=c.getById(a);return b!==i?b.unreadCount:0},this.getFolderUnreadCount=function(a){return c.getFolderUnreadCount(a)},this.getStarredCount=function(){return e.getStarredCount()},this.toggleFolder=function(a){d.toggleOpen(a)},this.hasFeeds=function(a){return c.getFolderUnreadCount(a)!==i},this.subFeedActive=function(d){var e=a.current.$$route.type;if(e===b.FEED){var f=c.getById(l());if(f!==i&&f.folderId===d)return!0}return!1},this.isSubscriptionsActive=function(){return a.current&&a.current.$$route.type===b.SUBSCRIPTIONS},this.isStarredActive=function(){return a.current&&a.current.$$route.type===b.STARRED},this.isExploreActive=function(){return a.current&&a.current.$$route.type===b.EXPLORE},this.isFolderActive=function(c){return a.current&&a.current.$$route.type===b.FOLDER&&l()===c},this.isFeedActive=function(c){return a.current&&a.current.$$route.type===b.FEED&&l()===c},this.folderNameExists=function(a){return a=a||"",d.get(a.trim())!==i},this.feedUrlExists=function(a){return a=a||"",a=a.trim(),c.get(a)!==i||c.get("http://"+a)!==i},this.createFeed=function(a){var b=this;this.showNewFolder=!1,this.addingFeed=!0;var e=a.newFolder,f=a.existingFolder||{id:0};e===i||""===e?(f.getsFeed=!0,c.create(a.url,f.id,i).then(function(a){g.publishAll(a),j.path("/items/feeds/"+a.feeds[0].id+"/")})["finally"](function(){f.getsFeed=i,a.url="",b.addingFeed=!1})):d.create(e).then(function(c){g.publishAll(c),a.existingFolder=d.get(c.folders[0].name),a.newFolder=i,b.createFeed(a)})},this.createFolder=function(a){var b=this;this.addingFolder=!0,d.create(a.name).then(function(a){g.publishAll(a)})["finally"](function(){b.addingFolder=!1,a.name=""})},this.moveFeed=function(b,d){var e=!1,f=c.getById(b);f.folderId!==d&&((this.isFolderActive(f.folderId)||this.isFolderActive(d))&&(e=!0),c.move(b,d),e&&a.reload())},this.renameFeed=function(a){c.rename(a.id,a.title),a.editing=!1},this.renameFolder=function(a,b){a.renameError="",this.renamingFolder=!0;var c=this;a.name===b?(a.renameError="",a.editing=!1,this.renamingFolder=!1):d.rename(a.name,b).then(function(){a.renameError="",a.editing=!1},function(b){a.renameError=b})["finally"](function(){c.renamingFolder=!1})},this.reversiblyDeleteFeed=function(b){c.reversiblyDelete(b.id)["finally"](function(){a.reload()})},this.undoDeleteFeed=function(b){c.undoDelete(b.id)["finally"](function(){a.reload()})},this.deleteFeed=function(a){c["delete"](a.url)},this.reversiblyDeleteFolder=function(b){k.all(c.reversiblyDeleteFolder(b.id),d.reversiblyDelete(b.name))["finally"](function(){a.reload()})},this.undoDeleteFolder=function(b){k.all(c.undoDeleteFolder(b.id),d.undoDelete(b.name))["finally"](function(){a.reload()})},this.deleteFolder=function(a){c.deleteFolder(a.id),d["delete"](a.name)},this.setOrdering=function(b,d){c.setOrdering(b.id,d),a.reload()},this.search=function(a){""===a?j.search("search",null):j.search("search",a)};var m=this;h.$on("moveFeedToFolder",function(a,b){m.moveFeed(b.feedId,b.folderId)});var n=function(){var e;a.current&&(e=a.current.$$route.type);var f=0;if(e===b.FOLDER)f=l();else if(e===b.FEED){var g=c.getById(l());g&&(f=g.folderId)}var h;0!==f&&(h=d.getById(f)),m.feed.existingFolder=h};h.$on("$routeChangeSuccess",function(){n()})}]),j.controller("SettingsController",["$route","$q","SettingsResource","ItemResource","OPMLParser","OPMLImporter","Publisher",function(a,b,c,d,e,f,g){this.isOPMLImporting=!1,this.isArticlesImporting=!1,this.opmlImportError=!1,this.articleImportError=!1;var h=function(b,d){c.set(b,d),["showAll","oldestFirst","compact"].indexOf(b)>=0&&a.reload()};this.toggleSetting=function(a){h(a,!this.getSetting(a))},this.getSetting=function(a){return c.get(a)},this.importOPML=function(a){this.opmlImportError=!1,this.articleImportError=!1;try{this.isOPMLImporting=!1;var b=e.parse(a),c=this,d=5;f.importFolders(b).then(function(a){return f.importFeedQueue(a,d)})["finally"](function(){c.isOPMLImporting=!1})}catch(g){console.error(g),this.isOPMLImporting=!1,this.opmlImportError=!0}},this.importArticles=function(a){this.opmlImportError=!1,this.articleImportError=!1;try{this.isArticlesImporting=!0;var b=JSON.parse(a),c=this;d.importArticles(b).success(function(a){g.publishAll(a)})["finally"](function(){c.isArticlesImporting=!1})}catch(e){console.error(e),this.articleImportError=!0,this.isArticlesImporting=!1}}}]),j.filter("trustUrl",["$sce",function(a){return function(b){return a.trustAsResourceUrl(b)}}]),j.filter("unreadCountFormatter",function(){return function(a){return a>999?"999+":a}}),j.factory("FeedResource",["Resource","$http","BASE_URL","$q",function(a,b,c,d){var e=function(b,c,d){a.call(this,b,c,"url"),this.ids={},this.locations={},this.unreadCount=0,this.folderUnreadCount={},this.folderIds={},this.$q=d};return e.prototype=Object.create(a.prototype),e.prototype.receive=function(b){a.prototype.receive.call(this,b),this.updateUnreadCache(),this.updateFolderCache()},e.prototype.clear=function(){a.prototype.clear.call(this),this.unreadCount=0,this.folderUnreadCount={},this.folderIds={},this.ids={},this.locations={}},e.prototype.updateUnreadCache=function(){this.unreadCount=0,this.folderUnreadCount={};var a=this;this.values.forEach(function(b){b.unreadCount&&(a.unreadCount+=b.unreadCount),b.folderId!==i&&(a.folderUnreadCount[b.folderId]=a.folderUnreadCount[b.folderId]||0,a.folderUnreadCount[b.folderId]+=b.unreadCount)})},e.prototype.updateFolderCache=function(){this.folderIds={};var a=this;this.values.forEach(function(b){a.folderIds[b.folderId]=a.folderIds[b.folderId]||[],a.folderIds[b.folderId].push(b)})},e.prototype.add=function(b){a.prototype.add.call(this,b),b.id!==i&&(this.ids[b.id]=this.hashMap[b.url]),b.location!==i&&(this.locations[b.location]=this.hashMap[b.url])},e.prototype.markRead=function(){this.values.forEach(function(a){a.unreadCount=0}),this.updateUnreadCache()},e.prototype.markFeedRead=function(a){this.ids[a].unreadCount=0,this.updateUnreadCache()},e.prototype.markFolderRead=function(a){this.values.forEach(function(b){b.folderId===a&&(b.unreadCount=0)}),this.updateUnreadCache()},e.prototype.markItemOfFeedRead=function(a){this.ids[a].unreadCount-=1,this.updateUnreadCache()},e.prototype.markItemsOfFeedsRead=function(a){var b=this;a.forEach(function(a){b.ids[a].unreadCount-=1}),this.updateUnreadCache()},e.prototype.markItemOfFeedUnread=function(a){this.ids[a].unreadCount+=1,this.updateUnreadCache()},e.prototype.getUnreadCount=function(){return this.unreadCount},e.prototype.getFolderUnreadCount=function(a){return this.folderUnreadCount[a]},e.prototype.getByFolderId=function(a){return this.folderIds[a]||[]},e.prototype.getById=function(a){return this.ids[a]},e.prototype.getByLocation=function(a){return this.locations[a]},e.prototype.rename=function(a,b){return this.http({method:"POST",url:this.BASE_URL+"/feeds/"+a+"/rename",data:{feedTitle:b}})},e.prototype.move=function(a,b){var c=this.getById(a);return c.folderId=b,this.updateFolderCache(),this.updateUnreadCache(),this.http({method:"POST",url:this.BASE_URL+"/feeds/"+c.id+"/move",data:{parentFolderId:b}})},e.prototype.create=function(a,b,c){a=a.trim(),a.startsWith("http")||(a="https://"+a),c!==i&&(c=c.trim());var d={url:a,folderId:b||0,title:c||a,unreadCount:0};this.add(d),this.updateFolderCache();var e=this.$q.defer();return this.http({method:"POST",url:this.BASE_URL+"/feeds",data:{url:a,parentFolderId:b||0,title:c}}).success(function(a){e.resolve(a)}).error(function(a){d.faviconLink="",d.error=a.message,e.reject()}),e.promise},e.prototype.reversiblyDelete=function(a,b,c){var d=this.getById(a);return d&&c!==!0&&(d.deleted=!0),b!==!1&&this.updateUnreadCache(),this.http["delete"](this.BASE_URL+"/feeds/"+a)},e.prototype.reversiblyDeleteFolder=function(a){var b=this,c=[];this.getByFolderId(a).forEach(function(a){c.push(b.reversiblyDelete(a.id,!1,!0))}),this.updateUnreadCache();var d=this.$q.all(c);return d.promise},e.prototype["delete"]=function(b,c){var d=this.get(b);return d!==i&&d.id&&delete this.ids[d.id],d!==i&&d.location&&delete this.locations[d.location],a.prototype["delete"].call(this,b),c!==!1&&(this.updateUnreadCache(),this.updateFolderCache()),d},e.prototype.deleteFolder=function(a){var b=this;this.getByFolderId(a).forEach(function(a){b["delete"](a.url,!1)}),this.updateUnreadCache(),this.updateFolderCache()},e.prototype.undoDelete=function(a,b){var c=this.getById(a);return c&&(c.deleted=!1),b!==!1&&this.updateUnreadCache(),this.http.post(this.BASE_URL+"/feeds/"+a+"/restore")},e.prototype.undoDeleteFolder=function(a){var b=this,c=[];this.getByFolderId(a).forEach(function(a){c.push(b.undoDelete(a.id,!1))}),this.updateUnreadCache();var d=this.$q.all(c);return d.promise},e.prototype.setOrdering=function(a,b){var c=this.getById(a);if(c){c.ordering=b;var d=this.BASE_URL+"/feeds/"+a+"/ordering";return this.http.post(d,{ordering:b})}},new e(b,c,d)}]),j.factory("FolderResource",["Resource","$http","BASE_URL","$q",function(a,b,c,d){var e=function(b,c,d){a.call(this,b,c,"name"),this.deleted=null,this.$q=d,this.ids={}};return e.prototype=Object.create(a.prototype),e.prototype.add=function(b){a.prototype.add.call(this,b),b.id!==i&&(this.ids[b.id]=this.hashMap[b.name])},e.prototype.clear=function(){a.prototype.clear.call(this),this.ids={}},e.prototype["delete"]=function(b){var c=this.get(b);return c!==i&&c.id&&delete this.ids[c.id],a.prototype["delete"].call(this,b),c},e.prototype.toggleOpen=function(a){var b=this.get(a);return b.opened=!b.opened,this.http({url:this.BASE_URL+"/folders/"+b.id+"/open",method:"POST",data:{folderId:b.id,open:b.opened}})},e.prototype.rename=function(a,b){var c=this.get(a),d=this.$q.defer(),e=this;return this.http({url:this.BASE_URL+"/folders/"+c.id+"/rename",method:"POST",data:{folderName:b}}).success(function(){c.name=b,delete e.hashMap[a],e.hashMap[b]=c,d.resolve()}).error(function(a){d.reject(a.message)}),d.promise},e.prototype.getById=function(a){return this.ids[a]},e.prototype.create=function(a){a=a.trim();var b={name:a};this.add(b);var c=this.$q.defer();return this.http({url:this.BASE_URL+"/folders",method:"POST",data:{folderName:a}}).success(function(a){c.resolve(a)}).error(function(a){b.error=a.message}),c.promise},e.prototype.reversiblyDelete=function(a){var b=this.get(a),c=b.id;return b.deleted=!0,this.http["delete"](this.BASE_URL+"/folders/"+c)},e.prototype.undoDelete=function(a){var b=this.get(a),c=b.id;return b.deleted=!1,this.http.post(this.BASE_URL+"/folders/"+c+"/restore")},new e(b,c,d)}]),j.factory("ItemResource",["Resource","$http","BASE_URL","ITEM_BATCH_SIZE",function(a,b,c,d){var e=function(b,c,d){a.call(this,b,c),this.batchSize=d,this.clear()};return e.prototype=Object.create(a.prototype),e.prototype.clear=function(){this.starredCount=0,this.lowestId=0,this.highestId=0,a.prototype.clear.call(this)},e.prototype.receive=function(b,c){switch(c){case"newestItemId":this.newestItemId=b;break;case"starred":this.starredCount=b;break;default:var d=this;b.forEach(function(a){0===d.lowestId&&(d.lowestId=a.id),0===d.highestId&&(d.highestId=a.id),a.id>d.highestId&&(d.highestId=a.id),a.id<d.lowestId&&(d.lowestId=a.id)}),a.prototype.receive.call(this,b,c)}},e.prototype.getNewestItemId=function(){return this.newestItemId},e.prototype.getStarredCount=function(){return this.starredCount},e.prototype.star=function(a,b){b===i&&(b=!0);var c=this.get(a),d=this.BASE_URL+"/items/"+c.feedId+"/"+c.guidHash+"/star";return c.starred=b,b?this.starredCount+=1:this.starredCount-=1,this.http({url:d,method:"POST",data:{isStarred:b}})},e.prototype.toggleStar=function(a){this.get(a).starred?this.star(a,!1):this.star(a,!0)},e.prototype.markItemRead=function(a,b){return b===i&&(b=!0),this.get(a).unread=!b,this.http({url:this.BASE_URL+"/items/"+a+"/read",method:"POST",data:{isRead:b}})},e.prototype.markItemsRead=function(a){var b=this;return a.forEach(function(a){b.get(a).unread=!1}),this.http({url:this.BASE_URL+"/items/read/multiple",method:"POST",data:{itemIds:a}})},e.prototype.markFeedRead=function(a,b){b===i&&(b=!0);var c=this.values.filter(function(b){return b.feedId===a});return c.forEach(function(a){a.unread=!b}),this.http.post(this.BASE_URL+"/feeds/"+a+"/read",{highestItemId:this.getNewestItemId()})},e.prototype.markRead=function(){return this.values.forEach(function(a){a.unread=!1}),this.http({url:this.BASE_URL+"/items/read",method:"POST",data:{highestItemId:this.getNewestItemId()}})},e.prototype.autoPage=function(a,b,c,d,e){var f;return f=c?this.highestId:this.lowestId,this.http({url:this.BASE_URL+"/items",method:"GET",params:{type:a,id:b,offset:f,limit:this.batchSize,oldestFirst:c,showAll:d,search:e}})},e.prototype.importArticles=function(a){return this.http({url:this.BASE_URL+"/feeds/import/articles",method:"POST",data:{json:a}})},new e(b,c,d)}]),j.service("Loading",function(){this.loading={global:!1,content:!1,autopaging:!1},this.setLoading=function(a,b){this.loading[a]=b},this.isLoading=function(a){return this.loading[a]}}),j.service("OPMLImporter",["FeedResource","FolderResource","Publisher","$q",function(a,b,c,d){var e=function(f){var g=d.defer();if(f.length>0){var h=f.pop(),j=h.url,k=h.title,l=0,m=h.folderName;if(m!==i&&b.get(m)!==i){var n=b.get(m);n.opened=!0,l=n.id,n.getsFeed=!0,n.getsFeedCounter=n.getsFeedCounter||0,n.getsFeedCounter+=1}j!==i&&a.get(j)===i&&a.create(j,l,k).then(function(a){c.publishAll(a)})["finally"](function(){0!==l&&(n.getsFeedCounter-=1,0===n.getsFeedCounter&&(n.getsFeed=!1)),e(f)})}else g.resolve();return g.promise};this.importFolders=function(a){var e=[],f=[];a.folders.forEach(function(a){if(a.name!==i){if(b.get(a.name)===i){var d=b.create(a.name).then(function(a){c.publishAll(a)});f.push(d)}a.feeds.forEach(function(b){b.folderName=a.name,e.push(b)})}}),e=e.concat(a.feeds);var g=d.defer();return d.all(f)["finally"](function(){g.resolve(e)}),g.promise},this.importFeedQueue=function(a,b){for(var c=d.defer(),f=[],g=0;b>g;g+=1)f.push(e(a));return d.all(f).then(function(){c.resolve()}),c.promise}}]),j.service("OPMLParser",function(){var a=function(a){var b=a.attr("xmlUrl")||a.attr("htmlUrl"),c=a.attr("title")||a.attr("text")||b;return b===i?{type:"folder",name:c,feeds:[]}:{type:"feed",name:c,url:b}},b=function(c,d,f){for(var g=0;g<c.length;g+=1){var h=e(c[g]),i=a(h);"feed"===i.type?d.feeds.push(i):f?(b(h.children("outline"),i,!1),d.folders.push(i)):b(h.children("outline"),d,!1)}return d};this.parse=function(a){a=e.parseXML(a);var c=e(a).find("body > outline"),d={feeds:[],folders:[]};return b(c,d,!0)}}),j.service("Publisher",function(){this.channels={},this.subscribe=function(a){var b=this;return{toChannels:function(c){c.forEach(function(c){b.channels[c]=b.channels[c]||[],b.channels[c].push(a)})}}},this.publishAll=function(a){var b=this;Object.keys(a).forEach(function(c){var d=b.channels[c];d!==i&&d.forEach(function(b){b.receive(a[c],c)})})}}),j.factory("Resource",function(){var a=function(a,b,c){this.id=c||"id",this.values=[],this.hashMap={},this.http=a,this.BASE_URL=b};return a.prototype.receive=function(a){var b=this;a.forEach(function(a){b.add(a)})},a.prototype.add=function(a){var b=this.hashMap[a[this.id]];b===i?(this.values.push(a),this.hashMap[a[this.id]]=a):Object.keys(a).forEach(function(c){b[c]=a[c]})},a.prototype.size=function(){return this.values.length},a.prototype.get=function(a){return this.hashMap[a]},a.prototype["delete"]=function(a){var b=this,c=this.values.findIndex(function(c){return c[b.id]===a});c!==i&&this.values.splice(c,1),this.hashMap[a]!==i&&delete this.hashMap[a]},a.prototype.clear=function(){for(this.hashMap={};this.values.length>0;)this.values.pop()},a.prototype.getAll=function(){return this.values},a}),j.service("SettingsResource",["$http","BASE_URL",function(a,b){this.settings={language:"en",showAll:null,compact:!1,oldestFirst:null,preventReadOnScroll:!1,compactExpand:!1,exploreUrl:""},this.defaultLanguageCode="en",this.supportedLanguageCodes=["ar-ma","ar","bg","ca","cs","cv","da","de","el","en-ca","en-gb","eo","es","et","eu","fi","fr-ca","fr","gl","he","hi","hu","id","is","it","ja","ka","ko","lv","ms-my","nb","ne","nl","pl","pt-br","pt","ro","ru","sk","sl","sv","th","tr","tzm-la","tzm","uk","zh-cn","zh-tw"],this.receive=function(a){var b=this;Object.keys(a).forEach(function(c){var d=a[c];"language"===c&&(d=b.processLanguageCode(d)),b.settings[c]=d})},this.get=function(a){return this.settings[a]},this.set=function(c,d){return this.settings[c]=d,a({url:b+"/settings",method:"PUT",data:{language:this.settings.language,showAll:this.settings.showAll,compact:this.settings.compact,oldestFirst:this.settings.oldestFirst,compactExpand:this.settings.compactExpand,preventReadOnScroll:this.settings.preventReadOnScroll}})},this.processLanguageCode=function(a){return a=a.replace("_","-").toLowerCase(),this.supportedLanguageCodes.indexOf(a)<0&&(a=a.split("-")[0]),this.supportedLanguageCodes.indexOf(a)<0&&(a=this.defaultLanguageCode),a}}]),function(a,b,c,d,e,f){var g=a.location,h=a.localStorage,i=function(a,b,d){var e=c.isContentHandlerRegistered,f=function(a,b){return e?"new"!==e(a,b):h.getItem("registeredHandler")===b};c.registerContentHandler&&!f(a,b)&&(c.registerContentHandler(a,k,d),e||h.setItem("registeredHandler",b))},j=g.protocol+"//"+g.host+g.pathname,k=j+"?subscribe_to=%s",l="application/vnd.mozilla.maybe.feed",m="ownCloud News @ "+j;i(l,k,m),e(b).ready(function(){var b=a.decodeURIComponent(d("?subscribe_to"));if(b&&"null"!==b){e("#new-feed").show();var c=e('input[ng-model="Navigation.feed.url"]');c.val(b),c.trigger("input"),setTimeout(function(){c.focus()},1e3)}})}(b,c,a,h,e),function(a,b,c){var d=function(a){return!(a.is("input")||a.is("select")||a.is("textarea")||a.is("checkbox"))},e=function(a){return!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey)},f=function(a){var b=".active > .app-navigation-entry-menu .mark-read button",c=a.find(b);c.length>0&&c.trigger("click")},g=function(a,b){var c=a.offset().top-b.offset().top,d=c+a.height(),e=b.height();return c>=0&&e>d},h=function(a,b,c){0===a.length||!c&&g(a,b)||b.scrollTop(a.offset().top-b.offset().top+b.scrollTop())},i=function(a){var b=a.find(".active");h(b,a.children("ul"),!0)},j=function(a){a.find(".active > a:visible").trigger("click")},k=function(a,b){if(0===b.scrollTop()){var c=b.find(".pull-to-refresh");c.hasClass("show-pull-to-refresh")?c.hasClass("done")&&j(a):c.addClass("show-pull-to-refresh")}},l=function(a,b){a.children("a:visible").trigger("click"),h(a,b.children("ul"))},m=function(a){var b=a.find(".active"),d=a.find(".explore-feed,.subscriptions-feed:visible,.starred-feed:visible,.feed:visible");if(b.hasClass("folder"))for(;b.length>0;){var e=b.find(".feed:visible");if(e.length>0)return void l(c(e[0]),a);b=b.next(".folder")}else for(var f=0;f<d.length-1;f+=1){var g=d[f];if(g===b[0]){var h=d[f+1];l(c(h),a);break}}},n=function(a){return a.parent().parent(".folder")},o=function(a,b){var d,e=a.find(".folder:visible");d=b?e.length-1:0,e.length>0&&l(c(e[d]),a)},p=function(a){var b=a.find(".active");if(b.hasClass("folder"))l(b.prevAll(".folder:visible").first(),a);else if(b.hasClass("feed")){var c=n(b);c.length>0?l(c,a):o(a,!0)}else o(a,!0)},q=function(a){var b=a.find(".active");if(b.hasClass("folder"))l(b.nextAll(".folder:visible").first(),a);else if(b.hasClass("feed")){var c=n(b);c.length>0?l(c.nextAll(".folder:visible").first(),a):o(a)}else o(a)},r=function(a){var b=a.find(".active"),d=a.find(".explore-feed,.subscriptions-feed:visible,.starred-feed:visible,.feed:visible");if(b.hasClass("folder")){for(var e=b.prev(".folder");e.length>0;){var f=e.find(".feed:visible");if(f.length>0)return void l(c(f[f.length-1]),a);e=e.prev(".folder")}var g=b.siblings(".feed");if(g.length>0)return void l(c(g[g.length-1]),a);var h=c(".starred-feed:visible");return void(h.length>0&&l(h,a))}for(var i=d.length-1;i>0;i-=1){var j=d[i];if(j===b[0]){var k=d[i-1];l(c(k),a);break}}},s=function(a,b){var d=a.find(".item");d.each(function(a,d){return d=c(d),d.height()+d.position().top>30?(b(d),!1):void 0})},t=function(a){s(a,function(a){a.find(".toggle-keep-unread").trigger("click")})},u=function(a){s(a,function(a){a.find(".star").trigger("click")})},v=function(a){s(a,function(a){a.find(".utils").trigger("click")})},w=function(b){s(b,function(b){b.trigger("click"),a.open(b.find(".external:visible").attr("href"),"_blank")})},x=function(a,b,c){a.scrollTop(b.offset().top-a.offset().top+a.scrollTop()),c&&s(a,function(a){a.hasClass("open")||a.find(".utils").trigger("click")})},y=function(a,b){var d=a.find(".item"),e=!1;d.each(function(d,f){return f=c(f),f.position().top>1?(x(a,f,b),e=!0,!1):void 0}),e||a.scrollTop(a.prop("scrollHeight"))},z=function(a,b,d){var e=b.find(".item"),f=!1;e.each(function(e,g){if(g=c(g),g.position().top>=0){var h=g.prev();return h.length>0?x(b,h,d):(k(a,b),b.scrollTop(0)),f=!0,!1}}),!f&&e.length>0&&x(b,e.last())};c(b).keyup(function(a){var b=a.keyCode,g=c("#app-content"),h=c("#app-navigation"),l=c("#articles.compact").length>0,n="true"===c("#articles").attr("news-compact-expand"),o=l&&n;d(c(":focus"))&&e(a)?[74,78,39].indexOf(b)>=0?(a.preventDefault(),y(g,o)):[75,80,37].indexOf(b)>=0?(a.preventDefault(),z(h,g,o)):[85].indexOf(b)>=0?(a.preventDefault(),t(g)):[69].indexOf(b)>=0?(a.preventDefault(),v(g)):[73,83,76].indexOf(b)>=0?(a.preventDefault(),u(g)):[72].indexOf(b)>=0?(a.preventDefault(),u(g),y(g)):[79].indexOf(b)>=0?(a.preventDefault(),w(g)):[82].indexOf(b)>=0?(a.preventDefault(),j(h)):[70].indexOf(b)>=0?(a.preventDefault(),m(h)):[68].indexOf(b)>=0?(a.preventDefault(),r(h)):[67].indexOf(b)>=0?(a.preventDefault(),p(h)):[65].indexOf(b)>=0?(a.preventDefault(),i(h)):[86].indexOf(b)>=0?(a.preventDefault(),q(h)):[81].indexOf(b)>=0?(a.preventDefault(),c("#searchbox").focus()):[33].indexOf(b)>=0&&k(h,g):d(c(":focus"))&&a.shiftKey&&[65].indexOf(b)>=0&&(a.preventDefault(),f(h))})}(b,c,e),b.News=b.News||{},function(a,b,c,d,e){var f=[];d.addArticleAction=function(a){f.push(a)},d.getArticleActionPlugins=function(){return f}}(b,c,jQuery,b.News),j.run(["$document","$rootScope",function(a,b){a.click(function(a){b.$broadcast("documentClicked",a)})}]),j.directive("appNavigationEntryUtils",function(){return{restrict:"C",link:function(a,b){var c=b.siblings(".app-navigation-entry-menu"),d=e(b).find(".app-navigation-entry-utils-menu-button button");d.click(function(){c.toggleClass("open")}),a.$on("documentClicked",function(a,b){b.target!==d[0]&&c.removeClass("open")})}}}),j.directive("newsAddFeed",["$rootScope","$timeout",function(a,b){return{restrict:"A",link:function(c,d){a.$on("addFeed",function(a,e){b(function(){d.is(":animated")?(d.stop(!0,!0),d.show()):d.is(":visible")||d.slideDown(),d.find('[ng-model="Navigation.feed.url"]').focus()}),c.Navigation.feed.url=e})}}}]),j.directive("newsArticleActions",function(){return{restrict:"E",scope:{article:"="},link:function(a,b){for(var c=News.getArticleActionPlugins(),d=0;d<c.length;d+=1)c[d](b,a.article)}}}),j.directive("newsAutoFocus",["$timeout",function(a){return function(b,c,d){var f=c;d.newsAutoFocus&&(f=e(d.newsAutoFocus)),a(function(){f.focus()},0)}}]),j.directive("newsBindHtmlUnsafe",function(){return function(a,b,c){a.$watch(c.newsBindHtmlUnsafe,function(){b.html(a.$eval(c.newsBindHtmlUnsafe))})}}),j.directive("newsDraggable",function(){return function(a,b,c){var e=a.$eval(c.newsDraggable);d.isDefined(e)?b.draggable(e):b.draggable(),c.$observe("newsDraggableDisable",function(a){
-b.draggable("true"===a?"disable":"enable")})}}),j.directive("newsDroppable",["$rootScope",function(a){return function(b,c,d){var f={accept:".feed",hoverClass:"drag-and-drop",greedy:!0,drop:function(f,g){e(".drag-and-drop").removeClass("drag-and-drop");var h={folderId:parseInt(c.data("id"),10),feedId:parseInt(e(g.draggable).data("id"),10)};a.$broadcast("moveFeedToFolder",h),b.$apply(d.droppable)}};c.droppable(f)}}]),j.directive("newsFinishedTransition",function(){return function(a,b,c){b.on("transitionend",function(){b.addClass(c.newsFinishedTransition)})}}),j.directive("newsFocus",["$timeout","$interpolate",function(a,b){return function(c,d,f){d.click(function(){var d=e(b(f.newsFocus)(c));a(function(){d.focus()},500)})}}]),j.directive("newsInstantNotification",function(){return{restrict:"E",link:function(a,b){b.hide();var c=b.html();f.Notification.showHtml(c)}}}),j.directive("newsPlayOne",["$rootScope",function(a){return{restrict:"A",link:function(b,c){c.on("play",function(){a.$broadcast("playing",c)}),a.$on("playing",function(a,b){b[0]!==c[0]&&c[0].pause()})}}}]),j.directive("newsPullToRefresh",["$rootScope",function(a){var b=!1;return{restrict:"A",scope:{newsPullToRefresh:"="},link:function(c,d){a.$on("$routeChangeStart",function(){b=!1,c.newsPullToRefresh=!1}),d.on("scroll",function(){0===d.scrollTop()&&b&&(c.newsPullToRefresh=!0),b=!0})}}}]),j.directive("newsReadFile",function(){return function(a,b,c){b.change(function(){var d=b[0].files[0],e=new FileReader;e.onload=function(b){a.$fileContent=b.target.result,a.$apply(c.newsReadFile)},e.readAsText(d)})}}),j.directive("newsScroll",["$timeout","ITEM_AUTO_PAGE_SIZE","MARK_READ_TIMEOUT","SCROLL_TIMEOUT",function(a,b,c,d){var f,g=function(a,b,c){for(var d=0,f=b.find(".item"),g=f.length-1;g>=0;g-=1){var h=e(f[g]);if(d>=a)break;if(h.position().top<0){c.$apply(c.newsScrollAutoPage);break}d+=1}},h=function(a,b,c){if(a){var d=[],f=b.find(".item:not(.read)");f.each(function(a,b){var c=e(b);return c.position().top<=-10?void d.push(parseInt(c.data("id"),10)):!1}),c.itemIds=d,c.$apply(c.newsScrollMarkRead)}};return{restrict:"A",scope:{newsScroll:"@",newsScrollAutoPage:"&",newsScrollMarkRead:"&",newsScrollEnabledMarkRead:"="},link:function(j,k){var l=!0,m=k;j.newsScroll&&(m=e(j.newsScroll));var n=function(){l&&(l=!1,a(function(){l=!0},1e3*d),g(b,k,j),f&&a.cancel(f),f=a(function(){h(j.newsScrollEnabledMarkRead,k,j),f=i},1e3*c))};m.on("scroll",n),j.$on("$destroy",function(){m.off("scroll",n)})}}}]),j.directive("newsSearch",["$document","$location",function(a,b){return{restrict:"E",scope:{onSearch:"="},link:function(a){var c=e("#searchbox");c.val(b.search().search),c.on("search",function(){var b=e(this).val();a.$apply(function(){a.onSearch(b)})}),a.$watch(function(){return b.search()},function(a){c.val(a&&a.search?a.search:"")})}}}]),j.directive("newsStickyMenu",function(){return function(a,b,c){var d=40;e(c.newsStickyMenu).scroll(function(){var a=e(this).scrollTop();a>d?(b.addClass("fixed"),b.css("top",a)):b.removeClass("fixed")})}}),j.directive("newsStopPropagation",function(){return{restrict:"A",link:function(a,b){b.bind("click",function(a){a.stopPropagation()})}}}),j.directive("newsTimeout",["$timeout","$rootScope",function(a,b){return{restrict:"A",scope:{newsTimeout:"&"},link:function(c,d){var e=!1,f=7,g=a(c.newsTimeout,1e3*f);c.$on("$destroy",function(){e=!0,a.cancel(g)}),b.$on("$locationChangeStart",function(){a.cancel(g),e||(e=!0,d.remove(),c.newsTimeout())})}}}]),j.directive("newsTitleUnreadCount",["$window",function(a){var b=a.document.title,c=b.split("-"),d=c[0]||"News",e=c[1]||"ownCloud";return{restrict:"E",scope:{unreadCount:"@"},link:function(b,c,f){f.$observe("unreadCount",function(b){"0"!==b?a.document.title=d+"("+b+") - "+e:a.document.title=d+" - "+e})}}}]),j.directive("newsTriggerClick",function(){return function(a,b,c){b.click(function(){e(c.newsTriggerClick).trigger("click")})}})}(navigator,window,document,angular,jQuery,OC,oc_requesttoken,url);
+!function(a,b,c,d,e,f,g,h,i){"use strict";var j=d.module("News",["ngRoute","ngSanitize","ngAnimate"]);j.config(["$routeProvider","$provide","$httpProvider",function(a,b,c){var d={FEED:0,FOLDER:1,STARRED:2,SUBSCRIPTIONS:3,SHARED:4,EXPLORE:5};b.constant("REFRESH_RATE",60),b.constant("ITEM_BATCH_SIZE",40),b.constant("ITEM_AUTO_PAGE_SIZE",20),b.constant("BASE_URL",f.generateUrl("/apps/news")),b.constant("FEED_TYPE",d),b.constant("MARK_READ_TIMEOUT",.5),b.constant("SCROLL_TIMEOUT",.1),b.factory("CSRFInterceptor",["$q","BASE_URL","$window",function(a,b,c){return{request:function(d){var e=c.location.href.split(c.location.pathname)[0];return(0===d.url.indexOf(b)||0===d.url.indexOf(e))&&(d.headers.requesttoken=g),d||a.when(d)}}}]);var e={0:t("news","Request failed, network connection unavailable!"),401:t("news","Request unauthorized. Are you logged in?"),403:t("news","Request forbidden. Are you an admin?"),412:t("news","Token expired or app not enabled! Reload the page!"),500:t("news","Internal server error! Please check your data/owncloud.log file for additional information!"),503:t("news","Request failed, ownCloud is in currently in maintenance mode!")};b.factory("ConnectionErrorInterceptor",["$q","$timeout",function(a,b){var c;return{responseError:function(d){return d.status in e&&(c&&b.cancel(c),f.Notification.hide(),f.Notification.showHtml(e[d.status]),c=b(function(){f.Notification.hide()},5e3)),a.reject(d)}}}]),c.interceptors.push("CSRFInterceptor"),c.interceptors.push("ConnectionErrorInterceptor");var h=function(a){return{data:["$http","$route","$q","$location","BASE_URL","ITEM_BATCH_SIZE","FEED_TYPE","SettingsResource","FeedResource",function(b,c,d,e,f,g,h,j,k){var l=j.get("showAll"),m=j.get("oldestFirst"),n=e.search().search||"",o=d.defer();if(null===l||null===m)o.resolve({});else{var p={type:a,limit:g,showAll:l,oldestFirst:m,search:n};if(c.current.params.id!==i&&(p.id=c.current.params.id),a===h.FEED){var q=k.getById(p.id);q===i||2===q.ordering?p.oldestFirst=!1:1===q.ordering&&(p.oldestFirst=!0)}b({url:f+"/items",method:"GET",params:p}).success(function(a){o.resolve(a)})}return o.promise}]}},j=function(){return{sites:["$http","$q","BASE_URL","Publisher","SettingsResource",function(a,b,c,d,e){var f=b.defer();return a.get(c+"/settings").then(function(b){d.publishAll(b);var c=e.get("exploreUrl"),f=e.get("language");return a({url:c,method:"GET",params:{lang:f}})}).then(function(a){f.resolve(a.data)})["catch"](function(){f.reject()}),f.promise}]}};a.when("/items",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.SUBSCRIPTIONS),type:d.SUBSCRIPTIONS}).when("/items/starred",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.STARRED),type:d.STARRED}).when("/items/feeds/:id",{