<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: jsTree v.0.9.1</title>
	<atom:link href="http://vakata.com/en/archives/36/feed" rel="self" type="application/rss+xml" />
	<link>http://vakata.com/en/archives/36</link>
	<description>Sometimes I sit and wonder... and sometimes I just sit</description>
	<lastBuildDate>Wed, 17 Dec 2008 08:19:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: vakata</title>
		<link>http://vakata.com/en/archives/36/comment-page-2#comment-546</link>
		<dc:creator>vakata</dc:creator>
		<pubDate>Wed, 17 Dec 2008 08:19:09 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=36#comment-546</guid>
		<description>@Alain
&lt;a href=&quot;http://jstree.com#changelog&quot; rel=&quot;nofollow&quot;&gt;Version 0.9.5&lt;/a&gt; (currently beta) adds theme support.

As for the endless loop - I&#039;ll investigate further ... the loop problem will be solved by setting a higher value. But I&#039;ll look into the loading message.</description>
		<content:encoded><![CDATA[<p>@Alain<br />
<a href="http://jstree.com#changelog" rel="nofollow">Version 0.9.5</a> (currently beta) adds theme support.</p>
<p>As for the endless loop &#8211; I&#8217;ll investigate further &#8230; the loop problem will be solved by setting a higher value. But I&#8217;ll look into the loading message.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alain</title>
		<link>http://vakata.com/en/archives/36/comment-page-2#comment-545</link>
		<dc:creator>Alain</dc:creator>
		<pubDate>Wed, 17 Dec 2008 07:45:04 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=36#comment-545</guid>
		<description>Hi Vakata.

I correct and test it(on PC only),
whis FF(3) : OK.
whis IE(7) : OK. but no &#039;loading&#039; message.
whis Safari(3): 5-10 sec waiting, no &#039;loading&#039; message.
whis Opéra(9): endless loop
whis chrome(beta): endless loop, no &#039;loading&#039; message.


In addition for the next version , could you add a parameter for change the &#039;default&#039; image path ?
For marker.gif, dot.git, ect...</description>
		<content:encoded><![CDATA[<p>Hi Vakata.</p>
<p>I correct and test it(on PC only),<br />
whis FF(3) : OK.<br />
whis IE(7) : OK. but no &#8216;loading&#8217; message.<br />
whis Safari(3): 5-10 sec waiting, no &#8216;loading&#8217; message.<br />
whis Opéra(9): endless loop<br />
whis chrome(beta): endless loop, no &#8216;loading&#8217; message.</p>
<p>In addition for the next version , could you add a parameter for change the &#8216;default&#8217; image path ?<br />
For marker.gif, dot.git, ect&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vakata</title>
		<link>http://vakata.com/en/archives/36/comment-page-2#comment-542</link>
		<dc:creator>vakata</dc:creator>
		<pubDate>Tue, 16 Dec 2008 22:14:56 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=36#comment-542</guid>
		<description>@andy
Could you send me your source files (only the ones related to the tree) so that I can reproduce the refresh bug.

As for the url - yes it is possible, but since 0.9.2 (the current version is 0.9.5 beta). But I am doing some final tests on it before releasing it as a featured download (big changes need a lot of testing - theme support, searching, etc).
Back to the URL - since 0.9.2 there is a callback function called async_data (&quot;settings.data.async_data&quot;), which should return a javascript object, that will be sent to the server as parameters (either get or post - this is controlled by &quot;settings.data.method&quot; - default is &quot;get&quot;).
So basically this should work:
&lt;code&gt;
...
data : {
&#160;&#160;...
&#160;&#160;url : &quot;your-url-here&quot;,
&#160;&#160;async_data : function (NODE) {
&#160;&#160;&#160;&#160;return { id : jQuery(NODE).attr(&quot;id&quot;) &#124;&#124; 0, fuseaction : &quot;c.xxxx&quot; }
&#160;&#160;}
&#160;&#160;...
}
...
&lt;/code&gt;
I guess you could either browse the source at the SVN to download the latest, or wait a few days for the new download, or just add what you need in the 0.9.1 source (hardcode the needed parameter).</description>
		<content:encoded><![CDATA[<p>@andy<br />
Could you send me your source files (only the ones related to the tree) so that I can reproduce the refresh bug.</p>
<p>As for the url &#8211; yes it is possible, but since 0.9.2 (the current version is 0.9.5 beta). But I am doing some final tests on it before releasing it as a featured download (big changes need a lot of testing &#8211; theme support, searching, etc).<br />
Back to the URL &#8211; since 0.9.2 there is a callback function called async_data (&#8220;settings.data.async_data&#8221;), which should return a javascript object, that will be sent to the server as parameters (either get or post &#8211; this is controlled by &#8220;settings.data.method&#8221; &#8211; default is &#8220;get&#8221;).<br />
So basically this should work:<br />
<code><br />
...<br />
data : {<br />
&nbsp;&nbsp;...<br />
&nbsp;&nbsp;url : "your-url-here",<br />
&nbsp;&nbsp;async_data : function (NODE) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return { id : jQuery(NODE).attr("id") || 0, fuseaction : "c.xxxx" }<br />
&nbsp;&nbsp;}<br />
&nbsp;&nbsp;...<br />
}<br />
...<br />
</code><br />
I guess you could either browse the source at the SVN to download the latest, or wait a few days for the new download, or just add what you need in the 0.9.1 source (hardcode the needed parameter).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://vakata.com/en/archives/36/comment-page-2#comment-541</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Tue, 16 Dec 2008 22:00:42 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=36#comment-541</guid>
		<description>Thanks for the quick response!

I&#039;m using v.0.9.1.

One other question (while I have your attention :)) : 

When in async mode, is it possible to have a url value with a query string already started? For example, in a Fusebox environment, all URL&#039;s have a &quot;?fuseaction=c.xxxx&quot; value appended to the url.</description>
		<content:encoded><![CDATA[<p>Thanks for the quick response!</p>
<p>I&#8217;m using v.0.9.1.</p>
<p>One other question (while I have your attention :)) : </p>
<p>When in async mode, is it possible to have a url value with a query string already started? For example, in a Fusebox environment, all URL&#8217;s have a &#8220;?fuseaction=c.xxxx&#8221; value appended to the url.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vakata</title>
		<link>http://vakata.com/en/archives/36/comment-page-2#comment-540</link>
		<dc:creator>vakata</dc:creator>
		<pubDate>Tue, 16 Dec 2008 21:31:55 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=36#comment-540</guid>
		<description>@andy
For scenario 2 - replace the &quot;.find&quot; part with this:
&lt;code&gt;
.find(&quot;#&quot; + NODE.id.replace(&quot;_copy&quot;,&quot;&quot;) + &quot;, #&quot; + NODE.id)
&lt;/code&gt;
I believe this should work!

As for the refresh bug - I cannot reproduce it - which version are you using?</description>
		<content:encoded><![CDATA[<p>@andy<br />
For scenario 2 &#8211; replace the &#8220;.find&#8221; part with this:<br />
<code><br />
.find("#" + NODE.id.replace("_copy","") + ", #" + NODE.id)<br />
</code><br />
I believe this should work!</p>
<p>As for the refresh bug &#8211; I cannot reproduce it &#8211; which version are you using?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://vakata.com/en/archives/36/comment-page-2#comment-539</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Tue, 16 Dec 2008 20:56:30 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=36#comment-539</guid>
		<description>Awesome, thanks! That&#039;s a lot cleaner than the mess I had!!!

That handles one of the two possible scenarios. It covers making sure that a node that already existed in tree2 when tree2 loaded is not duplicated.

What it doesn&#039;t cover is if I drag a node from tree1 into a node in tree2, then immediately drag that same node into the same tree2 node again. Still end up with a duplicate.

One other oddity: I am using an ajax call to post tree changes to the server. After the call is complete, I am doing tree2.refresh() to try and show the saved changes. I am getting a &quot;this.open is undefined&quot;, Firefox says around line 654 of tree_component.js. Any idea what might be causing that?</description>
		<content:encoded><![CDATA[<p>Awesome, thanks! That&#8217;s a lot cleaner than the mess I had!!!</p>
<p>That handles one of the two possible scenarios. It covers making sure that a node that already existed in tree2 when tree2 loaded is not duplicated.</p>
<p>What it doesn&#8217;t cover is if I drag a node from tree1 into a node in tree2, then immediately drag that same node into the same tree2 node again. Still end up with a duplicate.</p>
<p>One other oddity: I am using an ajax call to post tree changes to the server. After the call is complete, I am doing tree2.refresh() to try and show the saved changes. I am getting a &#8220;this.open is undefined&#8221;, Firefox says around line 654 of tree_component.js. Any idea what might be causing that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vakata</title>
		<link>http://vakata.com/en/archives/36/comment-page-2#comment-536</link>
		<dc:creator>vakata</dc:creator>
		<pubDate>Tue, 16 Dec 2008 14:48:51 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=36#comment-536</guid>
		<description>@andy
I am not very sure I understood what you need. Here is a suggestion that will prevent prevent nodes with the same ID&#039;s being in the same folder. Just attach it to the oncopy/onmove callbacks:
&lt;code&gt;
function(NODE,REF_NODE,TYPE,TREE_OBJ) { 
&#160;&#160;// REF_NODE will hold the jQuery extended copy of the folder where the node is dropped
&#160;&#160;REF_NODE = (TYPE != &quot;inside&quot;) ? $(REF_NODE).parents(&quot;li:eq(0)&quot;) : $(REF_NODE);
&#160;&#160;if(REF_NODE.find(&quot;#&quot; + NODE.id.replace(&quot;_copy&quot;,&quot;&quot;)).size()) $(NODE).remove();
}
&lt;/code&gt;

If you need no duplication in the whole tree, use this one:
&lt;code&gt;
function(NODE,REF_NODE,TYPE,TREE_OBJ) { 				&#160;&#160;if(TREE_OBJ.container.find(&quot;#&quot; + NODE.id.replace(&quot;_copy&quot;,&quot;&quot;)).size()) $(NODE).remove();
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>@andy<br />
I am not very sure I understood what you need. Here is a suggestion that will prevent prevent nodes with the same ID&#8217;s being in the same folder. Just attach it to the oncopy/onmove callbacks:<br />
<code><br />
function(NODE,REF_NODE,TYPE,TREE_OBJ) {<br />
&nbsp;&nbsp;// REF_NODE will hold the jQuery extended copy of the folder where the node is dropped<br />
&nbsp;&nbsp;REF_NODE = (TYPE != "inside") ? $(REF_NODE).parents("li:eq(0)") : $(REF_NODE);<br />
&nbsp;&nbsp;if(REF_NODE.find("#" + NODE.id.replace("_copy","")).size()) $(NODE).remove();<br />
}<br />
</code></p>
<p>If you need no duplication in the whole tree, use this one:<br />
<code><br />
function(NODE,REF_NODE,TYPE,TREE_OBJ) { 				&nbsp;&nbsp;if(TREE_OBJ.container.find("#" + NODE.id.replace("_copy","")).size()) $(NODE).remove();<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vakata</title>
		<link>http://vakata.com/en/archives/36/comment-page-2#comment-533</link>
		<dc:creator>vakata</dc:creator>
		<pubDate>Tue, 16 Dec 2008 14:09:47 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=36#comment-533</guid>
		<description>@alain
That indeed was a terrible bug!
I fixed it just now. If you cannot wait for the next official download or download from the SVN - search the source for if(str.length &lt; 10) { and change that &quot;10&quot; to &quot;15&quot;.
Thank you and sorry for the bug!

P.S - As posted in the notes in the changelog - don&#039;t forget not to pass a parent_id in the XML when using async and xml_flat.</description>
		<content:encoded><![CDATA[<p>@alain<br />
That indeed was a terrible bug!<br />
I fixed it just now. If you cannot wait for the next official download or download from the SVN &#8211; search the source for if(str.length < 10) { and change that &#8220;10&#8243; to &#8220;15&#8243;.<br />
Thank you and sorry for the bug!</p>
<p>P.S &#8211; As posted in the notes in the changelog &#8211; don&#8217;t forget not to pass a parent_id in the XML when using async and xml_flat.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alain</title>
		<link>http://vakata.com/en/archives/36/comment-page-2#comment-526</link>
		<dc:creator>Alain</dc:creator>
		<pubDate>Tue, 16 Dec 2008 05:47:29 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=36#comment-526</guid>
		<description>Hello,

I use xml_flat async data.
I have some problem when I call a empty Node whis no children.
I send an empty list 

whis IE (Chrome to, but beta): endless loop
whis Opéra &amp; Safari:  5-10 sec waiting ...
whis FF: OK.

Do you have some fix for this ?</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I use xml_flat async data.<br />
I have some problem when I call a empty Node whis no children.<br />
I send an empty list </p>
<p>whis IE (Chrome to, but beta): endless loop<br />
whis Opéra &amp; Safari:  5-10 sec waiting &#8230;<br />
whis FF: OK.</p>
<p>Do you have some fix for this ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andy</title>
		<link>http://vakata.com/en/archives/36/comment-page-2#comment-509</link>
		<dc:creator>andy</dc:creator>
		<pubDate>Sun, 14 Dec 2008 17:35:57 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=36#comment-509</guid>
		<description>Thanks for the feedback. jsTree is definitely a great resource!

Did you mean to say that there is no standard method in jsTree for validating against duplicate nodes under a node? I got all excited when I saw the word &quot;now&quot; in your post :)

My function does OK, except that when I test for the duplicate it doesn&#039;t find it, because it is testing against the tree2 JSON that exists before the drop. I can&#039;t seem to access the version of the tree2 JSON that exists after the drop. It doesn&#039;t seem to replace the old tree2 JSON in memory until both beforemove and oncopy have finished.

I noticed that if I drag/drop a 2nd item into tree2 after the dup is dropped, then output the results of tree2.parseJSON(tree2.getJSON());, the dup is then present.

If I could figure out what I&#039;m doing wrong there, I&#039;d be set. Just can&#039;t get to the updated JSON to test for the dup. May just be a result of my less than stellar javascript/jquery skillz :)</description>
		<content:encoded><![CDATA[<p>Thanks for the feedback. jsTree is definitely a great resource!</p>
<p>Did you mean to say that there is no standard method in jsTree for validating against duplicate nodes under a node? I got all excited when I saw the word &#8220;now&#8221; in your post :)</p>
<p>My function does OK, except that when I test for the duplicate it doesn&#8217;t find it, because it is testing against the tree2 JSON that exists before the drop. I can&#8217;t seem to access the version of the tree2 JSON that exists after the drop. It doesn&#8217;t seem to replace the old tree2 JSON in memory until both beforemove and oncopy have finished.</p>
<p>I noticed that if I drag/drop a 2nd item into tree2 after the dup is dropped, then output the results of tree2.parseJSON(tree2.getJSON());, the dup is then present.</p>
<p>If I could figure out what I&#8217;m doing wrong there, I&#8217;d be set. Just can&#8217;t get to the updated JSON to test for the dup. May just be a result of my less than stellar javascript/jquery skillz :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

