<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Mifjs forum — Mif.Tree, Mif.Menu - Toggle Tree Features]]></title>
		<link>http://mifjs.net/forum/topic/223/</link>
		<description><![CDATA[The most recent posts in Toggle Tree Features.]]></description>
		<lastBuildDate>Sun, 25 Jul 2010 12:46:07 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Toggle Tree Features]]></title>
			<link>http://mifjs.net/forum/post/825/#p825</link>
			<description><![CDATA[[code]
tree.drag.detach();
tree.drag.attach();
[/code]]]></description>
			<author><![CDATA[creavenmoro@gmail.com (moro)]]></author>
			<pubDate>Sun, 25 Jul 2010 12:46:07 +0000</pubDate>
			<guid>http://mifjs.net/forum/post/825/#p825</guid>
		</item>
		<item>
			<title><![CDATA[Re: Toggle Tree Features]]></title>
			<link>http://mifjs.net/forum/post/824/#p824</link>
			<description><![CDATA[If anyone else needs it, I built this solution to toggle dragable:
[code]
            Mif.Tree.SCMDrag = new Class({
                Extends: Mif.Tree.Drag, 
                start: function(event){
                    if(this.tree.options.dragable)
                        this.parent(event);
                }
            });
[/code]

So on initialisation of the tree you have to use this:
[code]
            var instance = new Mif.Tree({
                initialize: function(){
                                    new Mif.Tree.SCMDrag( this, {preventDefault: true});
                    ...
                }, 
                    ...
                dragable: false
            }); 
[/code]
... and can turn dragable on and off by calling: 
[code]
instance.options.dragable = true; //On
instance.options.dragable = false; //Off
[/code]]]></description>
			<author><![CDATA[dummy@example.com (theWeird)]]></author>
			<pubDate>Sun, 25 Jul 2010 12:32:27 +0000</pubDate>
			<guid>http://mifjs.net/forum/post/824/#p824</guid>
		</item>
		<item>
			<title><![CDATA[Re: Toggle Tree Features]]></title>
			<link>http://mifjs.net/forum/post/823/#p823</link>
			<description><![CDATA[Thank you. 
This works ;)

Do you also know a solution to toggle Drag?]]></description>
			<author><![CDATA[dummy@example.com (theWeird)]]></author>
			<pubDate>Sun, 25 Jul 2010 11:13:34 +0000</pubDate>
			<guid>http://mifjs.net/forum/post/823/#p823</guid>
		</item>
		<item>
			<title><![CDATA[Re: Toggle Tree Features]]></title>
			<link>http://mifjs.net/forum/post/822/#p822</link>
			<description><![CDATA[you can change Mif.Tree.Node::sort
[code]
sort: function(sortFunction){
    if(this.tree.sortable) this.children.sort(sortFunction||this.tree.sortFunction);
    return this;
}
[/code]
and after set tree.sortable=true/false]]></description>
			<author><![CDATA[creavenmoro@gmail.com (moro)]]></author>
			<pubDate>Sat, 24 Jul 2010 17:14:54 +0000</pubDate>
			<guid>http://mifjs.net/forum/post/822/#p822</guid>
		</item>
		<item>
			<title><![CDATA[Toggle Tree Features]]></title>
			<link>http://mifjs.net/forum/post/821/#p821</link>
			<description><![CDATA[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]]></description>
			<author><![CDATA[dummy@example.com (theWeird)]]></author>
			<pubDate>Sat, 24 Jul 2010 14:25:54 +0000</pubDate>
			<guid>http://mifjs.net/forum/post/821/#p821</guid>
		</item>
	</channel>
</rss>

