mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-03 12:40:00 +00:00
fix(pr): indentation and simplify
This commit is contained in:
parent
752161b284
commit
4a37bec652
3 changed files with 4 additions and 11 deletions
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue