forked from Archives/Athou_commafeed
implements refresh button
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
<div class="toolbar">
|
<div class="toolbar">
|
||||||
|
|
||||||
<span>Reading Mode </span>
|
<span>Reading Mode </span>
|
||||||
<div class="btn-group" data-toggle="buttons-radio">
|
<div class="btn-group read-mode" data-toggle="buttons-radio">
|
||||||
<button type="button" class="btn" ng-model="settings.readingMode" btn-radio="'unread'">Unread</button>
|
<button type="button" class="btn" ng-model="settings.readingMode" btn-radio="'unread'">Unread</button>
|
||||||
<button type="button" class="btn" ng-model="settings.readingMode" btn-radio="'all'">All</button>
|
<button type="button" class="btn" ng-model="settings.readingMode" btn-radio="'all'">All</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="button" class="btn"><i class="icon icon-refresh"></i> Refresh</button>
|
<button type="button" class="btn" ng-click="refresh()"><i class="icon icon-refresh"></i> Refresh</button>
|
||||||
<button type="button" class="btn"><i class="icon icon-ok"></i> Mark all as read</button>
|
<button type="button" class="btn"><i class="icon icon-ok"></i> Mark all as read</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -81,11 +81,14 @@ module.directive('toolbar', function(SettingsService) {
|
|||||||
restrict : 'E',
|
restrict : 'E',
|
||||||
replace : true,
|
replace : true,
|
||||||
templateUrl : 'directives/toolbar.html',
|
templateUrl : 'directives/toolbar.html',
|
||||||
controller : function($scope, SettingsService) {
|
controller : function($scope, $route, SettingsService) {
|
||||||
$scope.settings = SettingsService.settings;
|
$scope.settings = SettingsService.settings;
|
||||||
|
$scope.refresh = function() {
|
||||||
|
$route.reload();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
link : function($scope, element) {
|
link : function($scope, element) {
|
||||||
element.find('button').bind('click', function() {
|
element.find('.read-mode button').bind('click', function() {
|
||||||
SettingsService.save();
|
SettingsService.save();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user