<?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.8.1</title>
	<atom:link href="http://vakata.com/en/archives/20/feed" rel="self" type="application/rss+xml" />
	<link>http://vakata.com/en/archives/20</link>
	<description>Sometimes I sit and wonder... and sometimes I just sit</description>
	<lastBuildDate>Wed, 17 Dec 2008 08:19:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Arman</title>
		<link>http://vakata.com/en/archives/20/comment-page-1#comment-239</link>
		<dc:creator>Arman</dc:creator>
		<pubDate>Mon, 17 Nov 2008 15:24:43 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=20#comment-239</guid>
		<description>Thank you Vakata for your time, and the tree!

The code corks but always returns #. It looks like it&#039;s being replaced?

I would like to be able to set and get a link for some of the nodes. What is the best way to accomplish this?

thank you.</description>
		<content:encoded><![CDATA[<p>Thank you Vakata for your time, and the tree!</p>
<p>The code corks but always returns #. It looks like it&#8217;s being replaced?</p>
<p>I would like to be able to set and get a link for some of the nodes. What is the best way to accomplish this?</p>
<p>thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vakata</title>
		<link>http://vakata.com/en/archives/20/comment-page-1#comment-238</link>
		<dc:creator>vakata</dc:creator>
		<pubDate>Mon, 17 Nov 2008 10:04:56 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=20#comment-238</guid>
		<description>@Arman
You should do:
&lt;code&gt;
$(NODE)&lt;strong&gt;.children(&quot;a&quot;)&lt;/strong&gt;.attr(&quot;href&quot;);
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>@Arman<br />
You should do:<br />
<code><br />
$(NODE)<strong>.children("a")</strong>.attr("href");<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arman</title>
		<link>http://vakata.com/en/archives/20/comment-page-1#comment-237</link>
		<dc:creator>Arman</dc:creator>
		<pubDate>Mon, 17 Nov 2008 02:52:32 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=20#comment-237</guid>
		<description>I&#039;m tring to get the callback to return the href. I&#039;m using an xml_flat type and the menu works but it always returns undefined..
&lt;code&gt;
callback : { 
&#160;&#160;onchange : function(NODE) { 
&#160;&#160;&#160;&#160;alert(&quot;click:&quot; + $(NODE).attr(&quot;href&quot;)); 
&#160;&#160;}
}
&lt;/code&gt;
thank you</description>
		<content:encoded><![CDATA[<p>I&#8217;m tring to get the callback to return the href. I&#8217;m using an xml_flat type and the menu works but it always returns undefined..<br />
<code><br />
callback : {<br />
&nbsp;&nbsp;onchange : function(NODE) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;alert("click:" + $(NODE).attr("href"));<br />
&nbsp;&nbsp;}<br />
}<br />
</code><br />
thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nomen</title>
		<link>http://vakata.com/en/archives/20/comment-page-1#comment-216</link>
		<dc:creator>nomen</dc:creator>
		<pubDate>Mon, 03 Nov 2008 12:32:07 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=20#comment-216</guid>
		<description>Hi all:

  In onrename function I´m using the values of NODE.firstChild.textContent to get the new name of the node and send it by ajax to my server.
  It works great for Chrome and Firefox. But, in IE it gives me &quot;undefined&quot; value.
   What i´m doing bad? Is there a better way to get the new name of the node?
  I´m using 0.8.1. version.
  Thank you very much in advance.</description>
		<content:encoded><![CDATA[<p>Hi all:</p>
<p>  In onrename function I´m using the values of NODE.firstChild.textContent to get the new name of the node and send it by ajax to my server.<br />
  It works great for Chrome and Firefox. But, in IE it gives me &#8220;undefined&#8221; value.<br />
   What i´m doing bad? Is there a better way to get the new name of the node?<br />
  I´m using 0.8.1. version.<br />
  Thank you very much in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogdan</title>
		<link>http://vakata.com/en/archives/20/comment-page-1#comment-212</link>
		<dc:creator>bogdan</dc:creator>
		<pubDate>Wed, 29 Oct 2008 15:14:29 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=20#comment-212</guid>
		<description>forgot the main think to get all root nodes
if(!nod &#124;&#124; $(nod).size() == 0)	nod = this.container.find(&quot;ul:eq(0) &gt; li&quot;);</description>
		<content:encoded><![CDATA[<p>forgot the main think to get all root nodes<br />
if(!nod || $(nod).size() == 0)	nod = this.container.find(&#8220;ul:eq(0) &gt; li&#8221;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogdan</title>
		<link>http://vakata.com/en/archives/20/comment-page-1#comment-211</link>
		<dc:creator>bogdan</dc:creator>
		<pubDate>Wed, 29 Oct 2008 14:58:09 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=20#comment-211</guid>
		<description>I see another problem with getJSON. If I have multiple root items it doesn&#039;t export all of them, just the first one.
To fix that, I&#039;ve enclosed all the code into a
var arr;
nod.each(function() {
 ....
  arr.push(obj);
}
return arr;</description>
		<content:encoded><![CDATA[<p>I see another problem with getJSON. If I have multiple root items it doesn&#8217;t export all of them, just the first one.<br />
To fix that, I&#8217;ve enclosed all the code into a<br />
var arr;<br />
nod.each(function() {<br />
 &#8230;.<br />
  arr.push(obj);<br />
}<br />
return arr;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogdan</title>
		<link>http://vakata.com/en/archives/20/comment-page-1#comment-209</link>
		<dc:creator>bogdan</dc:creator>
		<pubDate>Sun, 26 Oct 2008 16:56:22 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=20#comment-209</guid>
		<description>I had to use elementFromPoint because on IE document.click gets called after container.mouseup on drag operations. When document.click got called, it turned focus of all instances off. On Firefox document.click doesn&#039;t get call and focus remained on the drop target. 
Since it&#039;s only needed on IE you could say ($.browser.msie &amp;&amp; elementFromPoint).</description>
		<content:encoded><![CDATA[<p>I had to use elementFromPoint because on IE document.click gets called after container.mouseup on drag operations. When document.click got called, it turned focus of all instances off. On Firefox document.click doesn&#8217;t get call and focus remained on the drop target.<br />
Since it&#8217;s only needed on IE you could say ($.browser.msie &amp;&amp; elementFromPoint).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vakata</title>
		<link>http://vakata.com/en/archives/20/comment-page-1#comment-206</link>
		<dc:creator>vakata</dc:creator>
		<pubDate>Fri, 24 Oct 2008 07:50:45 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=20#comment-206</guid>
		<description>@bogdan
Thank you for all the submissions, please continue - this really helps developement!

I commited just now - to summon the changes:
* rename function ESC key is fixed (I decided not to populate the scope and just set &quot;input.value = last_value&quot; if ESC is pressed, and then only call the callback if &quot;input.value != last_value&quot;)
* CSS marker - I set z-index to 1000 in tree_component.js (I feel kind of odd traversing the DOM - I guess it would be better to set it to a really high value - as far as I know this does not affect performance)
* copy - native copy impemented
* get_json - I modified the function - the attributes you suggested were OK, but I decided to add an additional attrib parameter. So I set your values as defaults, but still the function accepts a list of attributes to include.
* get_left, get_right - Thanks :) I really had not noticed the default behaviour - it is now fixed.

What is left:
* instance manager &amp; focused instance - a really needed improvement, I will use what you gave me and try to improve. I am just worried about elementFromPoint not working in Firefox &lt; 3. So let&#039;s see what else we can use!
* states (hover, active, focus) - I&#039;ll do a research of what is best :)</description>
		<content:encoded><![CDATA[<p>@bogdan<br />
Thank you for all the submissions, please continue &#8211; this really helps developement!</p>
<p>I commited just now &#8211; to summon the changes:<br />
* rename function ESC key is fixed (I decided not to populate the scope and just set &#8220;input.value = last_value&#8221; if ESC is pressed, and then only call the callback if &#8220;input.value != last_value&#8221;)<br />
* CSS marker &#8211; I set z-index to 1000 in tree_component.js (I feel kind of odd traversing the DOM &#8211; I guess it would be better to set it to a really high value &#8211; as far as I know this does not affect performance)<br />
* copy &#8211; native copy impemented<br />
* get_json &#8211; I modified the function &#8211; the attributes you suggested were OK, but I decided to add an additional attrib parameter. So I set your values as defaults, but still the function accepts a list of attributes to include.<br />
* get_left, get_right &#8211; Thanks :) I really had not noticed the default behaviour &#8211; it is now fixed.</p>
<p>What is left:<br />
* instance manager &amp; focused instance &#8211; a really needed improvement, I will use what you gave me and try to improve. I am just worried about elementFromPoint not working in Firefox &lt; 3. So let&#8217;s see what else we can use!<br />
* states (hover, active, focus) &#8211; I&#8217;ll do a research of what is best :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogdan</title>
		<link>http://vakata.com/en/archives/20/comment-page-1#comment-205</link>
		<dc:creator>bogdan</dc:creator>
		<pubDate>Fri, 24 Oct 2008 04:16:23 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=20#comment-205</guid>
		<description>Notes for serving the entire jsTree thorugh AJAX (in my particular case, jsTree resides in an ASP UpdatePanel):

1. call constructors and handlers only once. I&#039;ve used something like:
if (!document.myTab) {
  document.myTab = new tree_component();
  jQuery(document).bind(&#039;keydown&#039;, ............
}

2. call init methods each time the tree reloads through AJAX

This way, jsTree objects remain in memory and they manage their own viewstate. One issue though, some internal bindings could be set twice in init function. If this is the case, it would be nice if the tree checks if handlers are already set before setting new ones.</description>
		<content:encoded><![CDATA[<p>Notes for serving the entire jsTree thorugh AJAX (in my particular case, jsTree resides in an ASP UpdatePanel):</p>
<p>1. call constructors and handlers only once. I&#8217;ve used something like:<br />
if (!document.myTab) {<br />
  document.myTab = new tree_component();<br />
  jQuery(document).bind(&#8216;keydown&#8217;, &#8230;&#8230;&#8230;&#8230;<br />
}</p>
<p>2. call init methods each time the tree reloads through AJAX</p>
<p>This way, jsTree objects remain in memory and they manage their own viewstate. One issue though, some internal bindings could be set twice in init function. If this is the case, it would be nice if the tree checks if handlers are already set before setting new ones.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogdan</title>
		<link>http://vakata.com/en/archives/20/comment-page-1#comment-204</link>
		<dc:creator>bogdan</dc:creator>
		<pubDate>Fri, 24 Oct 2008 03:44:01 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=20#comment-204</guid>
		<description>Also, I see is a conflict between the mouse hovering and the keyboard navigation. When I move the mouse over the tree my keyboard navigation gets reset to the clicked node. 

I think it&#039;s a good idea to differentiate between active items (that are clicked), selected items (that change whenever keyboard navigation occurs) and hovered items (that only react to the mouse).</description>
		<content:encoded><![CDATA[<p>Also, I see is a conflict between the mouse hovering and the keyboard navigation. When I move the mouse over the tree my keyboard navigation gets reset to the clicked node. </p>
<p>I think it&#8217;s a good idea to differentiate between active items (that are clicked), selected items (that change whenever keyboard navigation occurs) and hovered items (that only react to the mouse).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
