Signed-off-by: nachoparker <nacho@ownyourbits.com>
This commit is contained in:
parent
bd43d0f3b1
commit
1a54c2abec
|
@ -44,7 +44,14 @@
|
||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#mark-all-read-button {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 1;
|
||||||
|
bottom: 0.5em;
|
||||||
|
right: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
/* Override hidden before angular is loaded */
|
/* Override hidden before angular is loaded */
|
||||||
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak, .ng-hide:not(.ng-hide-animate) {
|
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak, .ng-hide:not(.ng-hide-animate) {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#mark-all-read-button {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 600px) {
|
@media only screen and (max-width: 600px) {
|
||||||
|
|
|
@ -36,6 +36,19 @@ app.controller('NavigationController', function ($route, FEED_TYPE, FeedResource
|
||||||
return FolderResource.getAll();
|
return FolderResource.getAll();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.markCurrentRead = function () {
|
||||||
|
var id = getRouteId();
|
||||||
|
var type = $route.current.$$route.type;
|
||||||
|
|
||||||
|
if(isNaN(id)) {
|
||||||
|
this.markRead();
|
||||||
|
} else if(type === FEED_TYPE.FOLDER) {
|
||||||
|
this.markFolderRead(id);
|
||||||
|
} else if(type === FEED_TYPE.FEED) {
|
||||||
|
this.markFeedRead(id);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
this.markFolderRead = function (folderId) {
|
this.markFolderRead = function (folderId) {
|
||||||
FeedResource.markFolderRead(folderId);
|
FeedResource.markFolderRead(folderId);
|
||||||
|
|
||||||
|
|
|
@ -207,7 +207,7 @@ class FeedController extends Controller
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'feeds' => [
|
'feeds' => [
|
||||||
// only pass unread count to not accidentally readd
|
// only pass unread count to not accidentally read
|
||||||
// the feed again
|
// the feed again
|
||||||
[
|
[
|
||||||
'id' => $feed->getId(),
|
'id' => $feed->getId(),
|
||||||
|
|
|
@ -12,6 +12,10 @@
|
||||||
<p ng-show="Content.isShowAll()"><?php p($l->t('No articles available')) ?></p>
|
<p ng-show="Content.isShowAll()"><?php p($l->t('No articles available')) ?></p>
|
||||||
<p ng-show="!Content.isShowAll()"><?php p($l->t('No unread articles available')) ?></p>
|
<p ng-show="!Content.isShowAll()"><?php p($l->t('No unread articles available')) ?></p>
|
||||||
</div>
|
</div>
|
||||||
|
<button ng-controller="NavigationController as Navigation" id="mark-all-read-button" ng-click="Navigation.markCurrentRead()" class="hidden">
|
||||||
|
<span title="Mark Read" class="icon-checkmark"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li class="item {{ ::Content.getFeed(item.feedId).cssClass }}"
|
<li class="item {{ ::Content.getFeed(item.feedId).cssClass }}"
|
||||||
ng-repeat="item in Content.getItems() |
|
ng-repeat="item in Content.getItems() |
|
||||||
|
|
Loading…
Reference in New Issue