Commit a5d4d2d44d95746273db984128a166db97423d4d
1 parent
c2257473
Exists in
master
Ajustes no redirecionamento após atualização.
Showing
2 changed files
with
3 additions
and
5 deletions
Show diff stats
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/controller/bookmark-edit.js
| ... | ... | @@ -27,7 +27,7 @@ $(function() { |
| 27 | 27 | |
| 28 | 28 | $("#delete").click(function() { |
| 29 | 29 | if (confirm('Tem certeza que deseja apagar?')) { |
| 30 | - BookmarkProxy.remove([ $("#id").val() ], removeOk); | |
| 30 | + BookmarkProxy.remove($("#id").val(), removeOk); | |
| 31 | 31 | } |
| 32 | 32 | }); |
| 33 | 33 | |
| ... | ... | @@ -57,7 +57,7 @@ function loadFailed(request) { |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | function saveOk(data) { |
| 60 | - history.back(); | |
| 60 | + location.href = 'bookmark-list.html'; | |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | function saveFailed(request) { | ... | ... |
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/proxy/bookmark.js
| ... | ... | @@ -45,9 +45,7 @@ BookmarkProxy.update = function($id, $form, $success, $error) { |
| 45 | 45 | BookmarkProxy.remove = function($id, $success, $error) { |
| 46 | 46 | $.ajax({ |
| 47 | 47 | type : "DELETE", |
| 48 | - url : this.url, | |
| 49 | - data : JSON.stringify($id), | |
| 50 | - contentType : "application/json", | |
| 48 | + url : this.url + "/" + $id, | |
| 51 | 49 | success : $success, |
| 52 | 50 | error : $error |
| 53 | 51 | }); | ... | ... |