forked from Archives/Athou_commafeed
@@ -21,7 +21,7 @@ public class MarkRequest implements Serializable {
|
||||
@ApiProperty(value = "mark as read or unread")
|
||||
private boolean read;
|
||||
|
||||
@ApiProperty(value = "only entries older than this, prevent marking an entry that was not retrieved", required = false)
|
||||
@ApiProperty(value = "only entries older than this, pass the timestamp you got from the entry list to prevent marking an entry that was not retrieved", required = false)
|
||||
private Long olderThan;
|
||||
|
||||
public String getId() {
|
||||
|
||||
@@ -25,7 +25,11 @@ new_category.parent=Parent
|
||||
toolbar.unread=Unread
|
||||
toolbar.all=All
|
||||
toolbar.refresh=Refresh
|
||||
toolbar.sort_by_asc_desc=Sort by date asc/desc
|
||||
toolbar.mark_all_as_read=Mark all as read
|
||||
toolbar.mark_all_older_day=Items older than a day
|
||||
toolbar.mark_all_older_week=Items older than a week
|
||||
toolbar.mark_all_older_two_weeks=Items older than two weeks
|
||||
toolbar.settings=Settings
|
||||
toolbar.profile=Profile
|
||||
toolbar.admin=Admin
|
||||
|
||||
@@ -390,13 +390,31 @@ function($scope, $http, $state, $stateParams, $route, $location,
|
||||
$scope.$emit('emitReload');
|
||||
|
||||
};
|
||||
$scope.markAllAsRead = function() {
|
||||
|
||||
var markAll = function(olderThan) {
|
||||
$scope.$emit('emitMarkAll', {
|
||||
type : $stateParams._type,
|
||||
id : $stateParams._id,
|
||||
olderThan: olderThan,
|
||||
read : true
|
||||
});
|
||||
};
|
||||
|
||||
$scope.markAllAsRead = function() {
|
||||
markAll();
|
||||
};
|
||||
|
||||
$scope.markAllDay = function() {
|
||||
markAll(new Date().getTime() - 86400000);
|
||||
};
|
||||
|
||||
$scope.markAllWeek = function() {
|
||||
markAll(new Date().getTime() - 604800000);
|
||||
};
|
||||
|
||||
$scope.markAllTwoWeeks = function() {
|
||||
markAll(new Date().getTime() - 1209600000);
|
||||
};
|
||||
|
||||
$scope.keywords = $stateParams._keywords;
|
||||
$scope.search = function() {
|
||||
@@ -531,12 +549,12 @@ function($scope, $stateParams, $http, $route, $window, EntryService, SettingsSer
|
||||
}
|
||||
};
|
||||
|
||||
$scope.markAll = function() {
|
||||
$scope.markAll = function(olderThan) {
|
||||
var service = $scope.selectedType == 'feed' ? FeedService
|
||||
: CategoryService;
|
||||
service.mark({
|
||||
id : $scope.selectedId,
|
||||
olderThan : $scope.timestamp,
|
||||
olderThan : olderThan || $scope.timestamp,
|
||||
read : true
|
||||
}, function() {
|
||||
CategoryService.init(function() {
|
||||
@@ -714,7 +732,7 @@ function($scope, $stateParams, $http, $route, $window, EntryService, SettingsSer
|
||||
});
|
||||
|
||||
$scope.$on('markAll', function(event, args) {
|
||||
$scope.markAll();
|
||||
$scope.markAll(args.olderThan);
|
||||
});
|
||||
|
||||
$scope.$on('reload', function(event, args) {
|
||||
|
||||
@@ -6,20 +6,31 @@
|
||||
<button type="button" class="btn" ng-model="settingsService.settings.readingMode" btn-radio="'all'">${toolbar.all}</button>
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn" ng-click="toggleOrder()">
|
||||
<a type="button" class="btn" ng-click="toggleOrder()" title="${toolbar.sort_by_asc_desc}">
|
||||
<i ng-class="{'icon-arrow-up' : settingsService.settings.readingOrder == 'asc', 'icon-arrow-down': settingsService.settings.readingOrder == 'desc'}"></i>
|
||||
</button>
|
||||
</a>
|
||||
|
||||
<div class="btn-group" data-toggle="buttons-radio">
|
||||
<button type="button" class="btn" ng-model="settingsService.settings.viewMode" btn-radio="'title'"><i class="icon-list"></i></button>
|
||||
<button type="button" class="btn" ng-model="settingsService.settings.viewMode" btn-radio="'expanded'"><i class="icon-th-list"></i></button>
|
||||
<a type="button" class="btn" ng-model="settingsService.settings.viewMode" btn-radio="'title'" title="Titles only"><i class="icon-list"></i></a>
|
||||
<a type="button" class="btn" ng-model="settingsService.settings.viewMode" btn-radio="'expanded'" title="Expanded view"><i class="icon-th-list"></i></a>
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn" ng-click="refresh()"><i class="icon-refresh"></i> ${toolbar.refresh}</button>
|
||||
<button type="button" class="btn" ng-click="markAllAsRead()"><i class="icon-ok"></i> ${toolbar.mark_all_as_read}</button>
|
||||
|
||||
<a type="button" class="btn" ng-click="refresh()" title="${toolbar.refresh}"><i class="icon-refresh"></i></a>
|
||||
|
||||
<div class="btn-group">
|
||||
<a class="btn" ng-click="toSettings()"><i class="icon-cog"></i> ${toolbar.settings}</a>
|
||||
<a type="button" class="btn" ng-click="markAllAsRead()" title="${toolbar.mark_all_as_read}"><i class="icon-check"></i></a>
|
||||
<button class="btn dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><a ng-click="markAllDay()">${toolbar.mark_all_older_day}</a></li>
|
||||
<li><a ng-click="markAllWeek()">${toolbar.mark_all_older_week}</a></li>
|
||||
<li><a ng-click="markAllTwoWeeks()">${toolbar.mark_all_older_two_weeks}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<a class="btn" ng-click="toSettings()" title="${toolbar.settings}"><i class="icon-cog"></i></a>
|
||||
<button class="btn dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user