Commit 42b970f5e4cab8794c00e3389515e72865796be8
1 parent
39420401
Exists in
master
Nome do usuário aparecendo no menu.
Showing
7 changed files
with
11 additions
and
10 deletions
Show diff stats
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/css/bookmark.css
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/home.html
... | ... | @@ -21,8 +21,8 @@ |
21 | 21 | </div> |
22 | 22 | <script type="text/javascript" src="js/lib/jquery-2.1.0.min.js"></script> |
23 | 23 | <script type="text/javascript" src="js/lib/bootstrap.min.js"></script> |
24 | - <script type="text/javascript" src="js/controller/menu.js"></script> | |
25 | - <script type="text/javascript" src="js/controller/home.js"></script> | |
26 | 24 | <script type="text/javascript" src="js/proxy/auth.js"></script> |
25 | + <script type="text/javascript" src="js/controller/home.js"></script> | |
26 | + <script type="text/javascript" src="js/controller/menu.js"></script> | |
27 | 27 | </body> |
28 | 28 | </html> |
29 | 29 | \ No newline at end of file | ... | ... |
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/index.html
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/controller/login.js
... | ... | @@ -25,7 +25,7 @@ function make_base_auth(user, password) { |
25 | 25 | |
26 | 26 | function loginOk(data) { |
27 | 27 | sessionStorage.setItem('credentials', make_base_auth($("#username").val().trim(), $("#password").val().trim())); |
28 | - location.href = "bookmark-list.html"; | |
28 | + location.href = "home.html"; | |
29 | 29 | } |
30 | 30 | |
31 | 31 | function loginFail(request) { | ... | ... |
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/controller/menu.js
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/proxy/auth.js
... | ... | @@ -27,7 +27,10 @@ AuthProxy.getUser = function($success, $error) { |
27 | 27 | url : this.url, |
28 | 28 | type : "GET", |
29 | 29 | success : $success, |
30 | - error : $error | |
30 | + error : $error, | |
31 | + beforeSend : function(xhr) { | |
32 | + xhr.setRequestHeader("Authorization", AuthProxy.getCredentials()); | |
33 | + } | |
31 | 34 | }); |
32 | 35 | }; |
33 | 36 | ... | ... |
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/menu.html