Make the ajax calls POST methods, and make the 'Create Entry' in the tree configurable so calls to children() can just return child entries
This commit is contained in:
5
public/js/custom.js
vendored
5
public/js/custom.js
vendored
@@ -59,7 +59,7 @@ $(document).ready(function() {
|
||||
if (typeof basedn !== 'undefined') {
|
||||
sources = basedn;
|
||||
} else {
|
||||
sources = { url: '/ajax/bases' };
|
||||
sources = { method: 'POST', url: '/ajax/bases' };
|
||||
}
|
||||
|
||||
// Attach the fancytree widget to an existing <div id="tree"> element
|
||||
@@ -95,8 +95,9 @@ $(document).ready(function() {
|
||||
source: sources,
|
||||
lazyLoad: function(event,data) {
|
||||
data.result = {
|
||||
method: 'POST',
|
||||
url: '/ajax/children',
|
||||
data: {_key: data.node.data.item,depth: 1}
|
||||
data: {_key: data.node.data.item,create: true}
|
||||
};
|
||||
|
||||
expandChildren(data.tree.rootNode);
|
||||
|
Reference in New Issue
Block a user