istic-openstack/client/js/controllers/login.js

37 lines
864 B
JavaScript
Raw Normal View History

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
mainApp.controller('loginCtrl', function ($scope,$interval,$sce)
{
// Define default states
$('#loginModal').modal({backdrop: 'static', keyboard: false});
$('#loadingLoginButton').hide();
2016-02-03 17:16:36 +01:00
$('#failedToLoginAlert').hide();
$('#loginButton').click(function(){
$('#loginButton').hide();
$('#loadingLoginButton').show();
2016-02-03 17:16:36 +01:00
$('#failedToLoginAlert').hide();
$interval(
function()
{
2016-02-03 17:16:36 +01:00
$('#failedToLoginAlert').show();
$('#loginButton').show();
$('#loadingLoginButton').hide();
2016-02-03 17:16:36 +01:00
}, 2000,1);
2016-02-03 17:16:36 +01:00
});
})