diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-04-21 12:32:13 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2016-08-15 19:46:54 +0200 |
| commit | 8dec86206aa110f3dabf38b6fab5439fb789eeb8 (patch) | |
| tree | bc9562d76858c0c6069e880abb9c690e64352818 /js/index.js | |
| parent | 8f626e66cf1e874a02f1272126aac6be5ddab365 (diff) | |
| download | wvs-vplan-8dec86206aa110f3dabf38b6fab5439fb789eeb8.tar.gz wvs-vplan-8dec86206aa110f3dabf38b6fab5439fb789eeb8.zip | |
fülle die Loginform sofort aus
Diffstat (limited to 'js/index.js')
| -rw-r--r-- | js/index.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/js/index.js b/js/index.js index 2e56131..fa222d8 100644 --- a/js/index.js +++ b/js/index.js @@ -20,6 +20,7 @@ // Login-Popup beim Start $(document).bind('pageinit', function(){ setTimeout(function(){ + fillform(); load(); }, 1000); @@ -37,6 +38,21 @@ $('#loginpopup').on('popupafteropen', function(){ $('#loader').hide('slow'); }); +/* füllt die Loginform mit gespeicherten Werten */ +function fillform(){ + var username = window.localStorage.getItem('username'); + + if(username !== 'undefined' && username != null && username != ''){ + $('#username').val(username); + } + + var password = window.localStorage.getItem('password'); + + if(password !== 'undefined' && password != null && password != ''){ + $('#password').val(password); + } +} + /* PDF Rendering */ function renderPage($div, pdf, pageNumber, callback){ pdf.getPage(pageNumber).then(function(page){ @@ -297,6 +313,9 @@ function getuserdata(){ console.log('Benutzerdaten geladen'); if(username !== 'undefined' && username != null && username != '' && password !== 'undefined' && password != null && password != ''){ + $('#username').val(username); + $('#password').val(password); + return [username, password]; }else{ return null; |
