<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>artweb design - Blog Comments</title>
  <id>tag:www.artweb-design.de,2009:mephisto//comments</id>
  <generator version="0.7.3" uri="http://mephistoblog.com">Mephisto Noh-Varr</generator>
  <link href="http://www.artweb-design.de/feed/comments.xml" rel="self" type="application/atom+xml"/>
  <link href="http://www.artweb-design.de/" rel="alternate" type="text/html"/>
  <updated>2009-11-21T00:56:37Z</updated>
  <entry xml:base="http://www.artweb-design.de/">
    <author>
      <name>Kieran Simkin</name>
    </author>
    <id>tag:www.artweb-design.de,2008-05-30:1424:1774</id>
    <published>2009-11-21T00:56:37Z</published>
    <updated>2009-11-21T00:56:37Z</updated>
    <category term="Programming"/>
    <link href="http://www.artweb-design.de/2008/5/30/scriptaculous-sortabletree" rel="alternate" type="text/html"/>
    <title>Comment on 'Scriptaculous SortableTree ' by Kieran Simkin</title>
<content type="html">&lt;p&gt;Guillaume, I&#8217;ve being dynamically adding elements using the following code, assuming $(&#8216;category&lt;em&gt;tree&#8217;) references the &amp;lt;ul&amp;gt; of your tree and category&lt;/em&gt;manager_tree is the SortableTree object itself.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var row = document.createElement('li');
row.innerHTML='&amp;lt;input type=&quot;text&quot; value=&quot;'+category_html['name']+'&quot;&amp;gt; &amp;lt;a class=&quot;handle&quot; href=&quot;#&quot; onclick=&quot;return false;&quot;&amp;gt;Handle&amp;lt;/a&amp;gt;';
row.setAttribute('id','node_'+id);
row.setAttribute('data-id',id);
row.setAttribute('data-order',num);
row.setStyle(&quot;display: none&quot;);
category_manager_tree.setUnsortable();
$('category_tree').insertBefore(row,$('category_tree').getElementsByTagName(&quot;li&quot;)[0]);
new Effect.BlindDown(row,{duration:0.7, afterFinish: function() { 
    category_manager_tree.root.initChildren();
    category_manager_tree.setSortable();
    new Effect.Opacity('ajax-loader',{from: 1.0, to: 0.0, duration: 0.1});
    }});
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;However, I am now having some troubles with my onDrag handler and I wish to ask if anything about SortableTree makes any assumptions about the ID values of each &amp;lt;li&amp;gt; element eg (node&lt;em&gt;1, node&lt;/em&gt;11, node_2 etc)? I notice they all follow a pattern in the examples, but I&#8217;m just using database IDs for the numerical ID of each of my &amp;lt;li&amp;gt; elements, could this be causing weird behaviour?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.artweb-design.de/">
    <author>
      <name>Kieran Simkin</name>
    </author>
    <id>tag:www.artweb-design.de,2008-05-30:1424:1773</id>
    <published>2009-11-21T00:52:09Z</published>
    <updated>2009-11-21T00:52:09Z</updated>
    <category term="Programming"/>
    <link href="http://www.artweb-design.de/2008/5/30/scriptaculous-sortabletree" rel="alternate" type="text/html"/>
    <title>Comment on 'Scriptaculous SortableTree ' by Kieran Simkin</title>
<content type="html">&lt;p&gt;Guillaume, I&#8217;ve being dynamically adding elements using the following code, assuming $(&#8216;category&lt;em&gt;tree&#8217;) references the &lt;ul&gt; of your tree and category&lt;/em&gt;manager_tree is the SortableTree object itself.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var row = document.createElement('li');
row.innerHTML='&amp;lt;input type=&quot;text&quot; value=&quot;'+category_html['name']+'&quot;&amp;gt; &amp;lt;a class=&quot;handle&quot; href=&quot;#&quot; onclick=&quot;return false;&quot;&amp;gt;Handle&amp;lt;/a&amp;gt;';
row.setAttribute('id','node_'+id);
row.setAttribute('data-id',id);
row.setAttribute('data-order',num);
row.setStyle(&quot;display: none&quot;);
category_manager_tree.setUnsortable();
$('category_tree').insertBefore(row,$('category_tree').getElementsByTagName(&quot;li&quot;)[0]);
new Effect.BlindDown(row,{duration:0.7, afterFinish: function() { 
    category_manager_tree.root.initChildren();
    category_manager_tree.setSortable();
    new Effect.Opacity('ajax-loader',{from: 1.0, to: 0.0, duration: 0.1});
    }});
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;However, I am now having some troubles with my onDrag handler and I wish to ask if anything about SortableTree makes any assumptions about the ID values of each &lt;li&gt; element eg (node&lt;em&gt;1, node&lt;/em&gt;11, node_2 etc)? I notice they all follow a pattern in the examples, but I&#8217;m just using database IDs for the numerical ID of each of my &lt;li&gt; elements, could this be causing weird behaviour?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.artweb-design.de/">
    <author>
      <name>Frank</name>
    </author>
    <id>tag:www.artweb-design.de,2007-05-13:1087:1772</id>
    <published>2009-11-20T21:39:58Z</published>
    <updated>2009-11-20T21:39:58Z</updated>
    <category term="Globalization"/>
    <category term="Programming"/>
    <link href="http://www.artweb-design.de/2007/5/13/concise-localized-rails-url-helpers-solved-twice" rel="alternate" type="text/html"/>
    <title>Comment on 'Concise, localized Rails URL helpers? Solved (twice).' by Frank</title>
<content type="html">&lt;p&gt;Hey guys,&lt;/p&gt;

&lt;p&gt;A great solution I found to this problem is this one : http://stackoverflow.com/questions/212425/creating-routes-with-an-optional-path-prefix&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.artweb-design.de/">
    <author>
      <name>goodwill</name>
    </author>
    <id>tag:www.artweb-design.de,2008-04-22:1380:1769</id>
    <published>2009-11-11T16:58:43Z</published>
    <updated>2009-11-11T16:58:43Z</updated>
    <category term="Programming"/>
    <link href="http://www.artweb-design.de/2008/4/22/an-erb-safemode-handler-for-actionview" rel="alternate" type="text/html"/>
    <title>Comment on 'An ERB Safemode handler for ActionView' by goodwill</title>
<content type="html">&lt;p&gt;This thing is kinda interesting- are you still working on this? I am using liquid&#8230; you know&#8230; that sucks&#8230;&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.artweb-design.de/">
    <author>
      <name>Okoth</name>
    </author>
    <id>tag:www.artweb-design.de,2006-05-11:68:1768</id>
    <published>2009-11-11T00:29:38Z</published>
    <updated>2009-11-11T00:29:38Z</updated>
    <category term="Misc stuff"/>
    <link href="http://www.artweb-design.de/2006/5/11/fix-firefox-s-google-search-language-setting" rel="alternate" type="text/html"/>
    <title>Comment on 'Fix Firefox's Google Search language setting' by Okoth</title>
<content type="html">&lt;p&gt;&amp;lt;searchplugin&gt;
&amp;lt;shortname&gt;GoogleNL&amp;lt;/shortname&gt;
&amp;lt;description&gt;Google Search&amp;lt;/description&gt;
&amp;lt;inputencoding&gt;UTF-8&amp;lt;/inputencoding&gt;
&amp;lt;image height=&quot;16&quot; width=&quot;16&quot;&gt;data:image/png;base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADs9Pt8xetPtu9FsfFNtu%2BTzvb2%2B%2Fne4dFJeBw0egA%2FfAJAfAA8ewBBegAAAAD%2B%2FPtft98Mp%2BwWsfAVsvEbs%2FQeqvF8xO7%2F%2F%2F63yqkxdgM7gwE%2FggM%2BfQA%2BegBDeQDe7PIbotgQufcMufEPtfIPsvAbs%2FQvq%2Bfz%2Bf%2F%2B%2B%2FZKhR05hgBBhQI8hgBAgAI9ewD0%2B%2Fg3pswAtO8Cxf4Kw%2FsJvvYAqupKsNv%2B%2Fv7%2F%2FP5VkSU0iQA7jQA9hgBDgQU%2BfQH%2F%2Ff%2FQ6fM4sM4KsN8AteMCruIqqdbZ7PH8%2Fv%2Fg6Nc%2Fhg05kAA8jAM9iQI%2BhQA%2BgQDQu6b97uv%2F%2F%2F7V8Pqw3eiWz97q8%2Ff%2F%2F%2F%2F7%2FPptpkkqjQE4kwA7kAA5iwI8iAA8hQCOSSKdXjiyflbAkG7u2s%2F%2B%2F%2F39%2F%2F7r8utrqEYtjQE8lgA7kwA7kwA9jwA9igA9hACiWSekVRyeSgiYSBHx6N%2F%2B%2Fv7k7OFRmiYtlAA5lwI7lwI4lAA7kgI9jwE9iwI4iQCoVhWcTxCmb0K%2BooT8%2Fv%2F7%2F%2F%2FJ2r8fdwI1mwA3mQA3mgA8lAE8lAE4jwA9iwE%2BhwGfXifWvqz%2B%2Ff%2F58u%2Fev6Dt4tr%2B%2F%2F2ZuIUsggA7mgM6mAM3lgA5lgA6kQE%2FkwBChwHt4dv%2F%2F%2F728ei1bCi7VAC5XQ7kz7n%2F%2F%2F6bsZkgcB03lQA9lgM7kwA2iQktZToPK4r9%2F%2F%2F9%2F%2F%2FSqYK5UwDKZAS9WALIkFn%2B%2F%2F3%2F%2BP8oKccGGcIRJrERILYFEMwAAuEAAdX%2F%2Ff7%2F%2FP%2B%2BfDvGXQLIZgLEWgLOjlf7%2F%2F%2F%2F%2F%2F9QU90EAPQAAf8DAP0AAfMAAOUDAtr%2F%2F%2F%2F7%2B%2Fu2bCTIYwDPZgDBWQDSr4P%2F%2Fv%2F%2F%2FP5GRuABAPkAA%2FwBAfkDAPAAAesAAN%2F%2F%2B%2Fz%2F%2F%2F64g1C5VwDMYwK8Yg7y5tz8%2Fv%2FV1PYKDOcAAP0DAf4AAf0AAfYEAOwAAuAAAAD%2F%2FPvi28ymXyChTATRrIb8%2F%2F3v8fk6P8MAAdUCAvoAAP0CAP0AAfYAAO4AAACAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQAA&amp;lt;/image&gt;
&amp;lt;url /&gt;
&amp;lt;url&gt;
  &amp;lt;param /&gt;
  &amp;lt;param /&gt;
  &amp;lt;param /&gt;
  &amp;lt;param /&gt;
  &amp;lt;param /&gt;
  &amp;lt;param /&gt;
  &amp;lt;!-- Dynamic parameters --&gt;
  &amp;lt;param /&gt;
  &amp;lt;mozparam /&gt;
&amp;lt;/url&gt;
&amp;lt;searchform&gt;http://www.google.nl/firefox&amp;lt;/searchform&gt;
&amp;lt;/searchplugin&gt;&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.artweb-design.de/">
    <author>
      <name>val</name>
    </author>
    <id>tag:www.artweb-design.de,2007-05-13:1087:1758</id>
    <published>2009-08-17T13:56:03Z</published>
    <updated>2009-08-17T13:56:03Z</updated>
    <category term="Globalization"/>
    <category term="Programming"/>
    <link href="http://www.artweb-design.de/2007/5/13/concise-localized-rails-url-helpers-solved-twice" rel="alternate" type="text/html"/>
    <title>Comment on 'Concise, localized Rails URL helpers? Solved (twice).' by val</title>
<content type="html">&lt;p&gt;Anyway I did like in the example you gave (in base_controller.rb)&lt;/p&gt;

&lt;p&gt;def set_locale
      params[:locale] =~ /^[\w]{2}$/ or raise &#8216;invalid locale&#8217; if params[:locale]
      I18n.locale = params[:locale] || I18n.default_locale
      # TODO raise something more meaningful
      I18n.locale.untaint
    end&lt;/p&gt;

&lt;p&gt;Just instead-
 I18n.locale = params[:locale] || I18n.default_locale
I converted it to symbol
 I18n.locale = params[:locale].to&lt;em&gt;sym || I18n.default&lt;/em&gt;locale
since it didn&#8217;t work the original way, and now my app is happy :)&lt;/p&gt;

&lt;p&gt;Thanks again!&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.artweb-design.de/">
    <author>
      <name>val</name>
    </author>
    <id>tag:www.artweb-design.de,2007-05-13:1087:1757</id>
    <published>2009-08-17T13:46:03Z</published>
    <updated>2009-08-17T13:46:03Z</updated>
    <category term="Globalization"/>
    <category term="Programming"/>
    <link href="http://www.artweb-design.de/2007/5/13/concise-localized-rails-url-helpers-solved-twice" rel="alternate" type="text/html"/>
    <title>Comment on 'Concise, localized Rails URL helpers? Solved (twice).' by val</title>
<content type="html">&lt;p&gt;Thanks Sven,&lt;/p&gt;

&lt;p&gt;I&#8217;m trying to auto-switch between locales by setting I18n.locale based on the url, that is http://example.com/en/post would switch to English. So I added to app&#8217;s controller a before_filter. Is there something like that in routing-filter? &lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.artweb-design.de/">
    <author>
      <name>Sven</name>
    </author>
    <id>tag:www.artweb-design.de,2007-05-13:1087:1756</id>
    <published>2009-08-17T07:31:06Z</published>
    <updated>2009-08-17T07:31:06Z</updated>
    <category term="Globalization"/>
    <category term="Programming"/>
    <link href="http://www.artweb-design.de/2007/5/13/concise-localized-rails-url-helpers-solved-twice" rel="alternate" type="text/html"/>
    <title>Comment on 'Concise, localized Rails URL helpers? Solved (twice).' by Sven</title>
<content type="html">&lt;p&gt;Hi Val,&lt;/p&gt;

&lt;p&gt;basically, you just tell your routes to use certain filters using &#8220;map.filter :whatever&#8221;.&lt;/p&gt;

&lt;p&gt;You could have a look at adva-cms http://github.com/svenfuchs/adva&lt;em&gt;cms/blob/50a9aae6e4d72d30cdf3d16f7ac1606c55e96fa1/engines/adva&lt;/em&gt;cms/config/routes.rb&lt;/p&gt;

&lt;p&gt;Of course you might need different implementations of filters or entirely different filters. &lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.artweb-design.de/">
    <author>
      <name>val web</name>
    </author>
    <id>tag:www.artweb-design.de,2007-05-13:1087:1755</id>
    <published>2009-08-15T23:06:34Z</published>
    <updated>2009-08-15T23:06:34Z</updated>
    <category term="Globalization"/>
    <category term="Programming"/>
    <link href="http://www.artweb-design.de/2007/5/13/concise-localized-rails-url-helpers-solved-twice" rel="alternate" type="text/html"/>
    <title>Comment on 'Concise, localized Rails URL helpers? Solved (twice).' by val web</title>
<content type="html">&lt;p&gt;Hi Sven,&lt;/p&gt;

&lt;p&gt;Thank you for the routing-filter&#8217;s code.&lt;/p&gt;

&lt;p&gt;Could you please show how to use it in a project?&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.artweb-design.de/">
    <author>
      <name>roney</name>
    </author>
    <id>tag:www.artweb-design.de,2008-05-30:1424:1754</id>
    <published>2009-08-08T06:48:11Z</published>
    <updated>2009-08-08T06:48:11Z</updated>
    <category term="Programming"/>
    <link href="http://www.artweb-design.de/2008/5/30/scriptaculous-sortabletree" rel="alternate" type="text/html"/>
    <title>Comment on 'Scriptaculous SortableTree ' by roney</title>
<content type="html">&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I just want to know , How can i stop this sortable package to create sub points upto two levels. &lt;/p&gt;

&lt;p&gt;Thanks
Roney&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.artweb-design.de/">
    <author>
      <name>Pawel Barcik</name>
    </author>
    <id>tag:www.artweb-design.de,2007-05-13:1087:1753</id>
    <published>2009-08-07T11:07:49Z</published>
    <updated>2009-08-07T11:07:49Z</updated>
    <category term="Globalization"/>
    <category term="Programming"/>
    <link href="http://www.artweb-design.de/2007/5/13/concise-localized-rails-url-helpers-solved-twice" rel="alternate" type="text/html"/>
    <title>Comment on 'Concise, localized Rails URL helpers? Solved (twice).' by Pawel Barcik</title>
<content type="html">&lt;p&gt;this looks like a better solution (simple flexible wrapper)&lt;/p&gt;

&lt;p&gt;http://github.com/svenfuchs/routing-filter/tree/master&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.artweb-design.de/">
    <author>
      <name>erwann</name>
    </author>
    <id>tag:www.artweb-design.de,2009-07-19:1746:1751</id>
    <published>2009-07-29T12:49:58Z</published>
    <updated>2009-07-29T12:49:58Z</updated>
    <category term="Globalization"/>
    <category term="Programming"/>
    <link href="http://www.artweb-design.de/2009/7/19/experimental-extensions-in-i18n-pluralization-fallbacks-gettext-cache-and-chain" rel="alternate" type="text/html"/>
    <title>Comment on 'Experimental Ruby I18n extensions: Pluralization, Fallbacks, Gettext, Cache and Chained backend' by erwann</title>
<content type="html">&lt;p&gt;Thanks for the tip Sven!&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.artweb-design.de/">
    <author>
      <name>Sven</name>
    </author>
    <id>tag:www.artweb-design.de,2009-07-19:1746:1750</id>
    <published>2009-07-27T16:33:25Z</published>
    <updated>2009-07-27T16:33:25Z</updated>
    <category term="Globalization"/>
    <category term="Programming"/>
    <link href="http://www.artweb-design.de/2009/7/19/experimental-extensions-in-i18n-pluralization-fallbacks-gettext-cache-and-chain" rel="alternate" type="text/html"/>
    <title>Comment on 'Experimental Ruby I18n extensions: Pluralization, Fallbacks, Gettext, Cache and Chained backend' by Sven</title>
<content type="html">&lt;p&gt;Hey erwann,&lt;/p&gt;

&lt;p&gt;this is what we&#8217;re referring to as translated routes - it&#8217;s part of Rails&#8217; scope, not I18n&#8217;s (which is supposed to work fine for any framework or app). &lt;/p&gt;

&lt;p&gt;People are asking a lot about this. Check out this repo: &lt;a href=&quot;http://github.com/raul/translate_routes/tree/master&quot;&gt;translated_routes&lt;/a&gt; I&#8217;ve never used it but I&#8217;ve been told it works.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.artweb-design.de/">
    <author>
      <name>erwann</name>
    </author>
    <id>tag:www.artweb-design.de,2009-07-19:1746:1749</id>
    <published>2009-07-27T10:29:23Z</published>
    <updated>2009-07-27T10:29:23Z</updated>
    <category term="Globalization"/>
    <category term="Programming"/>
    <link href="http://www.artweb-design.de/2009/7/19/experimental-extensions-in-i18n-pluralization-fallbacks-gettext-cache-and-chain" rel="alternate" type="text/html"/>
    <title>Comment on 'Experimental Ruby I18n extensions: Pluralization, Fallbacks, Gettext, Cache and Chained backend' by erwann</title>
<content type="html">&lt;p&gt;Hi Sven,&lt;/p&gt;

&lt;p&gt;Good job! A thing I&#8217;d like to be able to do is a URL translation ie
myapp.com/en/products/ would become
myapp.com/es/productos/&lt;/p&gt;

&lt;p&gt;it would be nice for users and probably better for SEO&lt;/p&gt;

&lt;p&gt;Cheers!
erwann &lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.artweb-design.de/">
    <author>
      <name>Guillaume</name>
    </author>
    <id>tag:www.artweb-design.de,2008-05-30:1424:1748</id>
    <published>2009-07-24T14:27:30Z</published>
    <updated>2009-07-24T14:27:30Z</updated>
    <category term="Programming"/>
    <link href="http://www.artweb-design.de/2008/5/30/scriptaculous-sortabletree" rel="alternate" type="text/html"/>
    <title>Comment on 'Scriptaculous SortableTree ' by Guillaume</title>
<content type="html">&lt;p&gt;Thanks, 
This works great.
However, I&#8217;m trying to add list items thru a button let&#8217;s say, (appendChild, etc.), but the newly created item seems not to be draggable at all.
Is there any function to call back once the list has been appended ?
Or better, is there any function in the class that would let me create new list elements ?
I&#8217;m pretty new to js and i can look at the code for quite long without finding any solution&#8230;&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</content>  </entry>
</feed>
