Commit 52215750b3df80171f8bdebf5c2d35b57295c4d4

Authored by Cleverson Sacramento
2 parents f524cb57 a5d4d2d4
Exists in master

Merge branch '2.5' of git@github.com:demoiselle/framework.git into 2.5

archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/controller/bookmark-edit.js
@@ -27,7 +27,7 @@ $(function() { @@ -27,7 +27,7 @@ $(function() {
27 27
28 $("#delete").click(function() { 28 $("#delete").click(function() {
29 if (confirm('Tem certeza que deseja apagar?')) { 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,7 +57,7 @@ function loadFailed(request) {
57 } 57 }
58 58
59 function saveOk(data) { 59 function saveOk(data) {
60 - history.back(); 60 + location.href = 'bookmark-list.html';
61 } 61 }
62 62
63 function saveFailed(request) { 63 function saveFailed(request) {
@@ -89,5 +89,5 @@ function saveFailed(request) { @@ -89,5 +89,5 @@ function saveFailed(request) {
89 } 89 }
90 90
91 function removeOk(data) { 91 function removeOk(data) {
92 - history.back(); 92 + location.href = 'bookmark-list.html';
93 } 93 }
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,9 +45,7 @@ BookmarkProxy.update = function($id, $form, $success, $error) {
45 BookmarkProxy.remove = function($id, $success, $error) { 45 BookmarkProxy.remove = function($id, $success, $error) {
46 $.ajax({ 46 $.ajax({
47 type : "DELETE", 47 type : "DELETE",
48 - url : this.url,  
49 - data : JSON.stringify($id),  
50 - contentType : "application/json", 48 + url : this.url + "/" + $id,
51 success : $success, 49 success : $success,
52 error : $error 50 error : $error
53 }); 51 });