Commit c7983aa562b01c197e73357b4f0e4d52f10ee869
1 parent
db19dd25
Exists in
master
Modal no delete da tela de edição e tirado o link no nome do usuário no
menu.
Showing
4 changed files
with
26 additions
and
4 deletions
Show diff stats
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/bookmark-edit.html
... | ... | @@ -47,6 +47,7 @@ |
47 | 47 | <script src="js/lib/jquery-2.1.0.min.js" type="text/javascript"></script> |
48 | 48 | <script src="js/lib/bootstrap.min.js" type="text/javascript"></script> |
49 | 49 | <script src="js/lib/purl.js" type="text/javascript"></script> |
50 | + <script src="js/lib/bootbox.js" type="text/javascript"></script> | |
50 | 51 | <script src="js/proxy/auth.js" type="text/javascript"></script> |
51 | 52 | <script src="js/proxy/bookmark.js" type="text/javascript"></script> |
52 | 53 | <script src="js/controller/bookmark-edit.js" type="text/javascript"></script> | ... | ... |
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/css/bookmark.css
... | ... | @@ -7,4 +7,12 @@ body { |
7 | 7 | input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button { |
8 | 8 | -webkit-appearance: none; |
9 | 9 | margin: 0; |
10 | +} | |
11 | + | |
12 | +#username { | |
13 | + color: #777; | |
14 | + display: block; | |
15 | + line-height: 20px; | |
16 | + padding: 15px 15px; | |
17 | + position: relative; | |
10 | 18 | } |
11 | 19 | \ No newline at end of file | ... | ... |
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/controller/bookmark-edit.js
... | ... | @@ -39,9 +39,11 @@ $(function() { |
39 | 39 | }); |
40 | 40 | |
41 | 41 | $("#delete").click(function() { |
42 | - if (confirm('Tem certeza que deseja apagar?')) { | |
43 | - BookmarkProxy.remove([$("#id").val()], removeOk); | |
44 | - } | |
42 | + bootbox.confirm("Tem certeza que deseja apagar?", function(result) { | |
43 | + if(result) { | |
44 | + BookmarkProxy.remove([$("#id").val()], removeOk, removeFailed); | |
45 | + } | |
46 | + }); | |
45 | 47 | }); |
46 | 48 | |
47 | 49 | $("#back").click(function() { |
... | ... | @@ -108,4 +110,15 @@ function saveFailed(request) { |
108 | 110 | |
109 | 111 | function removeOk(data) { |
110 | 112 | location.href = 'bookmark-list.html'; |
113 | +} | |
114 | + | |
115 | +function removeFailed(request) { | |
116 | + switch (request.status) { | |
117 | + case 401: | |
118 | + alert('Você não está autenticado.'); | |
119 | + break; | |
120 | + | |
121 | + default: | |
122 | + break; | |
123 | + } | |
111 | 124 | } |
112 | 125 | \ No newline at end of file | ... | ... |
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/menu.html