mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00:00
ENHANCEMENT Allow disabling of tree drag'n'drop via input box
This commit is contained in:
parent
eb030fa0f9
commit
a9cd7aa08c
@ -48,12 +48,15 @@
|
|||||||
},
|
},
|
||||||
'plugins': ['themes', 'html_data', 'ui', 'dnd', 'crrm']
|
'plugins': ['themes', 'html_data', 'ui', 'dnd', 'crrm']
|
||||||
})
|
})
|
||||||
// .bind('before.jstree', function(e, data) {
|
.bind('before.jstree', function(e, data) {
|
||||||
// if(data.func == 'drag_start') {
|
if(data.func == 'start_drag') {
|
||||||
// // Only allow drag'n'drop if it has been specifically enabled
|
// Only allow drag'n'drop if it has been specifically enabled
|
||||||
// return $('input[id=sortitems]').is(':checked');
|
if(!$('input[id=sortitems]').is(':checked')) {
|
||||||
// }
|
e.stopImmediatePropagation();
|
||||||
// })
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
// TODO Move to EditForm logic
|
// TODO Move to EditForm logic
|
||||||
.bind('select_node.jstree', function(e, data) {
|
.bind('select_node.jstree', function(e, data) {
|
||||||
var node = data.rslt.obj, loadedNodeID = $('#Form_EditForm :input[name=ID]').val()
|
var node = data.rslt.obj, loadedNodeID = $('#Form_EditForm :input[name=ID]').val()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user