Skip to content

Commit 6896a8a

Browse files
authored
Merge pull request #18 from bscheshirwork/jquery-3-compability
jQuery 3 compatibility added
2 parents bd666dd + f64e168 commit 6896a8a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/assets/files/js/app.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ d3.xhr(routes.items).get(function (error, XMLHttpRequest) {
309309
$.post(routes.addChild, {
310310
"source": force.nodes()[sourceIndex],
311311
"target": force.nodes()[targetIndex]
312-
}).success(function (data) {
312+
}).then(function (data) {
313313
json.links.push({
314314
"source": force.nodes()[sourceIndex],
315315
"target": force.nodes()[targetIndex]
@@ -330,7 +330,7 @@ d3.xhr(routes.items).get(function (error, XMLHttpRequest) {
330330
$.post(routes.removeChild, {
331331
"source": json.links[index].source,
332332
"target": json.links[index].target
333-
}).success(function (data) {
333+
}).then(function (data) {
334334
console.log(data);
335335
});
336336

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

577577
if (document.getElementById("itemform-oldname").value) {
578578
$.post(routes.deleteItem, $("#mainForm").serialize())
579-
.success(function (data) {
579+
.then(function (data) {
580580
window.location.reload();
581581
});
582582
} else {

0 commit comments

Comments
 (0)