tree.drag.detach();
tree.drag.attach();All fields labelled (Required) must be completed before the form is submitted.
You are not logged in. Please login or register.
Mifjs forum — Mif.Tree, Mif.Menu » Help » Toggle Tree Features » Post new reply
All fields labelled (Required) must be completed before the form is submitted.
tree.drag.detach();
tree.drag.attach();If anyone else needs it, I built this solution to toggle dragable:
Mif.Tree.SCMDrag = new Class({
Extends: Mif.Tree.Drag,
start: function(event){
if(this.tree.options.dragable)
this.parent(event);
}
});So on initialisation of the tree you have to use this:
var instance = new Mif.Tree({
initialize: function(){
new Mif.Tree.SCMDrag( this, {preventDefault: true});
...
},
...
dragable: false
}); ... and can turn dragable on and off by calling:
instance.options.dragable = true; //On
instance.options.dragable = false; //OffThank you.
This works ![]()
Do you also know a solution to toggle Drag?
you can change Mif.Tree.Node::sort
sort: function(sortFunction){
if(this.tree.sortable) this.children.sort(sortFunction||this.tree.sortFunction);
return this;
}and after set tree.sortable=true/false
Hey there
I've got a problem with the initialisation of advanced features like Sortable.
Is it a Must to initialize and activate these features on Tree initialisation?
There is a request for an application I am working on at the moment to toggle the Sortable function of the tree.
Per default sorting shold be off, users can click a button to turn sorting on and off again.
Is it possible to initiate sorting after the tree has been built?
Or - if not - is it possible to disable the initiated sorting functions to enable it later?
Regards, Michael
Mifjs forum — Mif.Tree, Mif.Menu » Help » Toggle Tree Features » Post new reply
Powered by PunBB