Skip to content

Commit

Permalink
Merge pull request #18 from bscheshirwork/jquery-3-compability
Browse files Browse the repository at this point in the history
jQuery 3 compatibility added
  • Loading branch information
githubjeka authored Jan 29, 2019
2 parents bd666dd + f64e168 commit 6896a8a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/assets/files/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ d3.xhr(routes.items).get(function (error, XMLHttpRequest) {
$.post(routes.addChild, {
"source": force.nodes()[sourceIndex],
"target": force.nodes()[targetIndex]
}).success(function (data) {
}).then(function (data) {
json.links.push({
"source": force.nodes()[sourceIndex],
"target": force.nodes()[targetIndex]
Expand All @@ -330,7 +330,7 @@ d3.xhr(routes.items).get(function (error, XMLHttpRequest) {
$.post(routes.removeChild, {
"source": json.links[index].source,
"target": json.links[index].target
}).success(function (data) {
}).then(function (data) {
console.log(data);
});

Expand Down Expand Up @@ -547,7 +547,7 @@ d3.xhr(routes.items).get(function (error, XMLHttpRequest) {
//TODO: reset form after rename item. Because second submit after first submit doesn't work
d3.select('#submitForm').on('click', function () {
$.post(routes.saveItem, $("#mainForm").serialize())
.success(function (node) {
.then(function (node) {
if (node.oldName) {
json.nodes.forEach(function (n, i) {
if (n.name === node.oldName) {
Expand Down Expand Up @@ -576,7 +576,7 @@ d3.xhr(routes.items).get(function (error, XMLHttpRequest) {

if (document.getElementById("itemform-oldname").value) {
$.post(routes.deleteItem, $("#mainForm").serialize())
.success(function (data) {
.then(function (data) {
window.location.reload();
});
} else {
Expand Down

0 comments on commit 6896a8a

Please sign in to comment.