fix(warnings): Show modal only once

Also removes a random extra newline.
This commit is contained in:
Sabe Jones
2015-09-03 11:12:54 -04:00
parent d29c7ff1bb
commit b5124e6cd8
3 changed files with 5 additions and 2 deletions

View File

@@ -0,0 +1,4 @@
{
"wiki": "Wiki"
}

View File

@@ -44,7 +44,7 @@ habitrpg.controller("UserCtrl", ['$rootScope', '$scope', '$location', 'User', '$
}
$scope.acknowledgeHealthWarning = function(){
User.user.ops.update && User.set({'flags.warnedLowHealth':false});
User.user.ops.update && User.set({'flags.warnedLowHealth':true});
}
/**

View File

@@ -26,4 +26,3 @@ script(type='text/ng-template', id='modals/lowHealth.html')
h4=env.t('goodLuck')
.modal-footer(style='margin-top: 0em')
a.btn.btn-primary(ng-click='acknowledgeHealthWarning(); $close()')=env.t('ok')