fix(pr): indentation and simplify

This commit is contained in:
Matteo Pagliazzi 2014-12-29 21:21:54 +01:00
parent 752161b284
commit 4a37bec652
3 changed files with 4 additions and 11 deletions

View file

@ -65,13 +65,8 @@ habitrpg.controller('SettingsCtrl',
User.set({'preferences.language': $scope.language.code});
}
$scope.availableFormats = ['MM/dd/yyyy','dd/MM/yyyy'];
$scope.changeDateFormat = function(){
var dateFormat= User.user.preferences.dateFormat;
User.set({'preferences.dateFormat': dateFormat});
}
$scope.availableFormats = ['MM/dd/yyyy','dd/MM/yyyy'];
$scope.reroll = function(){
User.user.ops.reroll({});
$rootScope.$state.go('tasks');

View file

@ -279,7 +279,7 @@ var UserSchema = new Schema({
allocationMode: {type:String, enum: ['flat','classbased','taskbased'], 'default': 'flat'},
costume: Boolean,
dateFormat: {type: String, enum:['MM/dd/yyyy', 'dd/MM/yyyy'], 'default': 'MM/dd/yyyy'},
sleep: {type: Boolean, 'default': false},
sleep: {type: Boolean, 'default': false},
stickyHeader: {type: Boolean, 'default': true},
disableClasses: {type: Boolean, 'default': false},
newTaskEdit: {type: Boolean, 'default': false},

View file

@ -39,9 +39,7 @@ script(type='text/ng-template', id='partials/options.settings.settings.html')
.form-horizontal
h5=env.t('dateFormat')
select.form-control(ng-model='user.preferences.dateFormat', ng-options='DF for DF in availableFormats', ng-change='changeDateFormat()')
select.form-control(ng-model='user.preferences.dateFormat', ng-options='DF for DF in availableFormats', ng-change='set({"preferences.dateFormat": user.preferences.dateFormat})')
.checkbox
label
input(type='checkbox', ng-click='hideHeader() ', ng-checked='user.preferences.hideHeader!==true')