mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
implements refresh button
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<div class="toolbar">
|
||||
|
||||
<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="'all'">All</button>
|
||||
</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>
|
||||
</div>
|
||||
@@ -81,11 +81,14 @@ module.directive('toolbar', function(SettingsService) {
|
||||
restrict : 'E',
|
||||
replace : true,
|
||||
templateUrl : 'directives/toolbar.html',
|
||||
controller : function($scope, SettingsService) {
|
||||
controller : function($scope, $route, SettingsService) {
|
||||
$scope.settings = SettingsService.settings;
|
||||
$scope.refresh = function() {
|
||||
$route.reload();
|
||||
}
|
||||
},
|
||||
link : function($scope, element) {
|
||||
element.find('button').bind('click', function() {
|
||||
element.find('.read-mode button').bind('click', function() {
|
||||
SettingsService.save();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user