From 913f2cbb9cb48ecb16d39e50aa9082bdd31b1aca Mon Sep 17 00:00:00 2001 From: rcarubbi Date: Thu, 18 Jun 2015 18:46:06 -0300 Subject: [PATCH] Add custom event to notify node changes Custom event to get via ajax and save changes on database --- jquery.jOrgChart.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jquery.jOrgChart.js b/jquery.jOrgChart.js index ed2ed1f..44c5079 100644 --- a/jquery.jOrgChart.js +++ b/jquery.jOrgChart.js @@ -84,6 +84,8 @@ targetLi.children('ul').append(sourceLi); } + $this.trigger("jOrgChart.nodeChanged", { targetID: targetLi.data("id"), sourceId: sourceLi.data("id") } ); + //Removes any empty lists if (sourceUl.children().length === 0){ sourceUl.remove();