initial expanded view support (#62)

This commit is contained in:
Athou
2013-05-04 21:12:51 +02:00
parent d2da4d2b7d
commit dcd8ab951f
7 changed files with 54 additions and 8 deletions

View File

@@ -352,13 +352,13 @@ function($scope, $http, $state, $stateParams, $route, $location,
$scope.session = ProfileService.get();
$scope.ServerService = ServerService.get();
$scope.settingsService = SettingsService;
$scope.loading = true;
$scope.$watch(totalActiveAjaxRequests, function() {
$scope.loading = (totalActiveAjaxRequests() !== 0);
});
$scope.settingsService = SettingsService;
$scope.$watch('settingsService.settings.readingMode', function(
newValue, oldValue) {
if (newValue && oldValue && newValue != oldValue) {
@@ -371,6 +371,12 @@ function($scope, $http, $state, $stateParams, $route, $location,
SettingsService.save();
}
});
$scope.$watch('settingsService.settings.viewMode', function(
newValue, oldValue) {
if (newValue && oldValue && newValue != oldValue) {
SettingsService.save();
}
});
$scope.refresh = function() {
if($stateParams._type == 'feed'){
FeedService.refresh({
@@ -404,10 +410,9 @@ function($scope, $http, $state, $stateParams, $route, $location,
$scope.toggleOrder = function() {
var settings = $scope.settingsService.settings;
settings.readingOrder = settings.readingOrder == 'asc' ? 'desc'
: 'asc';
settings.readingOrder = settings.readingOrder == 'asc' ? 'desc' : 'asc';
};
$scope.toAdmin = function() {
$location.path('admin');
};