Cleanup.
This commit is contained in:
parent
3f90c33a3a
commit
c907c56c4a
@ -94,20 +94,9 @@ var loginModule = angular.module('accountant.login', [
|
||||
$storageProvider.setEnabledStorageEngines(['local', 'session']);
|
||||
})
|
||||
|
||||
.value('dialogShow', false)
|
||||
|
||||
.run(function($rootScope, LoginService, authService, $storage, $ngBootbox, $document) {
|
||||
|
||||
//var dialogShown = false;
|
||||
|
||||
var showLoginForm = function() {
|
||||
// First, if there are registered credentials, use them
|
||||
//if (dialogShown) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
//dialogShown = true;
|
||||
|
||||
$storage.session.clear();
|
||||
|
||||
$ngBootbox.customDialog({
|
||||
@ -118,8 +107,6 @@ var loginModule = angular.module('accountant.login', [
|
||||
label: 'Login',
|
||||
className: 'btn-primary',
|
||||
callback: function() {
|
||||
//dialogShown = false;
|
||||
|
||||
var email = angular.element($document[0].querySelector('#email')).val();
|
||||
var password = angular.element($document[0].querySelector('#password')).val();
|
||||
LoginService.login(
|
||||
@ -139,7 +126,6 @@ var loginModule = angular.module('accountant.login', [
|
||||
className: 'btn-default',
|
||||
callback: function() {
|
||||
authService.loginCancelled(null, 'Login cancelled by user action.');
|
||||
//dialogShown = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user