Ajax working as intended
This commit is contained in:
3
.idea/workspace.xml
generated
3
.idea/workspace.xml
generated
@@ -21,6 +21,7 @@
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="458cde88-df3d-44bc-9d57-a33823e2f1a6" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/resources/static/js/datatransfer.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/static/js/datatransfer.js" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -312,7 +313,7 @@
|
||||
<workItem from="1612609113694" duration="13936000" />
|
||||
<workItem from="1612777983977" duration="14203000" />
|
||||
<workItem from="1612868404302" duration="13841000" />
|
||||
<workItem from="1613384221052" duration="4201000" />
|
||||
<workItem from="1613384221052" duration="5569000" />
|
||||
</task>
|
||||
<task id="LOCAL-00077" summary="testing jenkins docker">
|
||||
<created>1601453886631</created>
|
||||
|
||||
@@ -49,37 +49,38 @@ function getCookie(cname) {
|
||||
|
||||
function updateData(){
|
||||
var updatedJson = generateJson();
|
||||
$.ajax({
|
||||
var request = $.ajax({
|
||||
url: 'http://localhost:8097/mock/json',
|
||||
type: 'PUT',
|
||||
data: JSON.stringify(updatedJson, null, 2),
|
||||
error: function(e) {
|
||||
console.log(e);
|
||||
},
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
success: getData(),
|
||||
});
|
||||
getData();
|
||||
request.done(function () {
|
||||
getData();
|
||||
});
|
||||
}
|
||||
|
||||
function addMessage(){
|
||||
$.ajax({
|
||||
|
||||
var request = $.ajax({
|
||||
url: 'http://localhost:8097/mock/json/'+clientUUID,
|
||||
type: 'POST',
|
||||
success: getData(),
|
||||
});
|
||||
getData();
|
||||
request.done(function () {
|
||||
getData();
|
||||
});
|
||||
}
|
||||
|
||||
function removeTile(id){
|
||||
var jsonObject = findJsonById(id);
|
||||
$.ajax({
|
||||
var request = $.ajax({
|
||||
url: 'http://localhost:8097/mock/json/'+clientUUID + '/' + id,
|
||||
type: 'DELETE',
|
||||
success: getData(),
|
||||
});
|
||||
getData();
|
||||
request.done(function () {
|
||||
getData();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user