forked from Archives/Athou_commafeed
option to force refresh all feeds
This commit is contained in:
@@ -18,7 +18,8 @@ module.run(['$rootScope', function($rootScope) {
|
||||
$rootScope.$broadcast('markAll', args);
|
||||
});
|
||||
$rootScope.$on('emitReload', function(event, args) {
|
||||
$rootScope.$broadcast('reload');
|
||||
// args.all
|
||||
$rootScope.$broadcast('reload', args);
|
||||
});
|
||||
$rootScope.$on('emitFeedSearch', function(event, args) {
|
||||
$rootScope.$broadcast('feedSearch');
|
||||
@@ -469,7 +470,12 @@ function($scope, $http, $state, $stateParams, $route, $location,
|
||||
|
||||
$scope.refresh = function() {
|
||||
$scope.$emit('emitReload');
|
||||
|
||||
};
|
||||
|
||||
$scope.refreshAll = function() {
|
||||
$scope.$emit('emitReload', {
|
||||
all : true
|
||||
});
|
||||
};
|
||||
|
||||
var markAll = function(olderThan) {
|
||||
@@ -1140,7 +1146,9 @@ function($scope, $stateParams, $http, $route, $state, $window, EntryService, Set
|
||||
$scope.hasMore = true;
|
||||
$scope.loadMoreEntries();
|
||||
|
||||
if ($scope.selectedType == 'feed'){
|
||||
if (args.all) {
|
||||
FeedService.refreshAll();
|
||||
} else if ($scope.selectedType == 'feed') {
|
||||
FeedService.refresh({
|
||||
id : $stateParams._id
|
||||
});
|
||||
|
||||
@@ -92,6 +92,12 @@ function($resource, $http) {
|
||||
_method : 'refresh'
|
||||
}
|
||||
},
|
||||
refreshAll : {
|
||||
method : 'GET',
|
||||
params : {
|
||||
_method : 'refreshAll'
|
||||
}
|
||||
},
|
||||
subscribe : {
|
||||
method : 'POST',
|
||||
params : {
|
||||
|
||||
@@ -9,7 +9,15 @@
|
||||
<div class="btn-group">
|
||||
<a type="button" class="btn" ng-click="previousEntry()" title="${toolbar.previous_entry}"><i class="icon-chevron-up"></i></a>
|
||||
<a type="button" class="btn" ng-click="nextEntry()" title="${toolbar.next_entry}"><i class="icon-chevron-down"></i></a>
|
||||
<a type="button" class="btn" ng-click="refresh()" title="${toolbar.refresh}"><i class="icon-refresh"></i></a>
|
||||
<div class="btn-group">
|
||||
<a type="button" class="btn" ng-click="refresh()" title="${toolbar.refresh}"><i class="icon-refresh"></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="refreshAll()">${toolbar.refresh_all}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
|
||||
Reference in New Issue
Block a user