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