forked from Archives/Athou_commafeed
store and use preferred language from user (#55)
This commit is contained in:
@@ -798,6 +798,15 @@ function($scope, $location, SettingsService, AnalyticsService) {
|
||||
|
||||
AnalyticsService.track();
|
||||
|
||||
|
||||
$scope.languages = [ {
|
||||
id : 'en',
|
||||
label : 'English'
|
||||
}, {
|
||||
id : 'fr',
|
||||
label : 'Français'
|
||||
} ];
|
||||
|
||||
$scope.settingsService = SettingsService;
|
||||
$scope.$watch('settingsService.settings', function(value) {
|
||||
$scope.settings = angular.copy(value);
|
||||
@@ -811,7 +820,7 @@ function($scope, $location, SettingsService, AnalyticsService) {
|
||||
$scope.save = function() {
|
||||
SettingsService.settings = $scope.settings;
|
||||
SettingsService.save(function() {
|
||||
$location.path('/');
|
||||
window.location.href = window.location.href.substring(0, window.location.href.lastIndexOf('#'));
|
||||
});
|
||||
};
|
||||
}]);
|
||||
|
||||
@@ -19,6 +19,14 @@
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="general">
|
||||
<div class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<label class="control-label">Language</label>
|
||||
<div class="controls">
|
||||
<select name="language" ng-model="settings.language" class="input-block-level"
|
||||
ng-options="lang.id as lang.label for lang in languages" required>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="showRead"
|
||||
|
||||
Reference in New Issue
Block a user