Add login controller, loading after click on login button and some stuff...
This commit is contained in:
parent
eb9f9c9a6e
commit
07fbfa6ad1
6 changed files with 39 additions and 8 deletions
|
@ -7,6 +7,5 @@
|
|||
mainApp.controller('homeCtrl', function ($scope)
|
||||
{
|
||||
|
||||
// Login before use App
|
||||
//$('#loginModal').modal({backdrop: 'static', keyboard: false});
|
||||
|
||||
});
|
32
client/js/controllers/login.js
Normal file
32
client/js/controllers/login.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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();
|
||||
|
||||
|
||||
|
||||
$('#loginButton').click(function(){
|
||||
$('#loginButton').hide();
|
||||
$('#loadingLoginButton').show();
|
||||
|
||||
|
||||
|
||||
$interval(
|
||||
function()
|
||||
{
|
||||
$('#loginButton').show();
|
||||
$('#loadingLoginButton').hide();
|
||||
}, 2000,1);
|
||||
|
||||
|
||||
|
||||
});
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue