Hi, I''ve been playing with sortable, the demos on script.aculo.us and reading the javascript. I hope I''m not just missing the documentation somewhere but I can''t find it. I want to do something like Sortable for the admin side of an open source ecommerce project I''m working on [1]. I''m relatively new to DHTML but understand the basic ideas. If someone can give me some brief answers I''d be greatful. Sorry for packing multiple questions into one email but I only have internet connection once every three days or so. 1) Looking in the index of my O''Reilly book covering JavaScript 1.5 [2] I cannot find any of these methods .detect(), .findAll(), .reject?, Element.childrenWithClassName, $(), $A() Object.extend. Where is a good reference to these things? Are they JavaScript 1.6? 2) What is greedy refering to? 3) (this.findElements(element, options) || []).each is a JavaScript idiom to avoid problems when findElements returns null? 4) why unimplement tree? 5) what is overlap? 6) what is dropon? 7) Why the underscore in Sortable._marker 8) what are onEmptyHover and dropOnEmpty about? What is ''empty''? 9) what is the ghosting option about? Thanks! Peter [1] http://trac.vaillant.ca/store.rb [2] JavaScript The Definitive Guide, David Flanagan
Hey Peter! Many of the questions you have are mixed into two areas. One is script.aculo.us, one is prototype. Prototype is the foundation on which script.aculo.us is built. You can find prototype documenation at http://www.sergiopereira.com/articles/prototype.js.html and You can find script.aculo.us documentation at http://wiki.script.aculo.us/scriptaculous/show/HomePage To answer your questions:> > > 1) Looking in the index of my O''Reilly book covering JavaScript 1.5 > [2] I cannot find any of these methods .detect(), .findAll(), > .reject?, Element.childrenWithClassName, $(), $A() Object.extend. > Where is a good reference to these things? Are they JavaScript 1.6?Again, these are all prototype functions ( http://www.sergiopereira.com/articles/prototype.js.html) 2) What is greedy refering to? http://wiki.script.aculo.us/scriptaculous/show/Droppables.add 3) (this.findElements(element, options) || []).each is a JavaScript> idiom to avoid problems when findElements returns null?yes 4) why unimplement tree? It''s a work in progress. I believe the patch is currently being added to the wiki, I''d assume will soon be in the main trunk. 5) what is overlap? http://wiki.script.aculo.us/scriptaculous/show/Droppables.add 6) what is dropon? 7) Why the underscore in Sortable._marker The underscore generally is used to indicate a private method. 8) what are onEmptyHover and dropOnEmpty about? What is ''empty''? http://wiki.script.aculo.us/scriptaculous/show/Sortable.create 9) what is the ghosting option about? Try using it. It just adds a "ghosted" version of whats being dragged. Thanks!> Peter > > [1] http://trac.vaillant.ca/store.rb > [2] JavaScript The Definitive Guide, David Flanagan > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >Again, check out the main documentation, it''ll save you some headache if you read up on the functionality before trying to use it. In particular, the unit tests should be helpful. Regards, Jerod _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hi Jerod WoW! Thanks for the great response. I will check out all the links that you gave me and read in the scriptaculous wiki. Thanks again! Peter On 1/29/06, Jerod Venema <jvenema-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey Peter! > > Many of the questions you have are mixed into two areas. One is > script.aculo.us, one is prototype. Prototype is the foundation on which > script.aculo.us is built. > > You can find prototype documenation at > http://www.sergiopereira.com/articles/prototype.js.html > and > You can find script.aculo.us documentation at > http://wiki.script.aculo.us/scriptaculous/show/HomePage > > To answer your questions: > > > > 1) Looking in the index of my O''Reilly book covering JavaScript 1.5 > > [2] I cannot find any of these methods .detect(), .findAll(), > > .reject?, Element.childrenWithClassName, $(), $A() Object.extend. > > Where is a good reference to these things? Are they JavaScript 1.6? > > Again, these are all prototype functions ( > http://www.sergiopereira.com/articles/prototype.js.html) > > > 2) What is greedy refering to? > > http://wiki.script.aculo.us/scriptaculous/show/Droppables.add > > 3) (this.findElements(element, options) || []).each is a JavaScript > > idiom to avoid problems when findElements returns null? > > yes > > > 4) why unimplement tree? > > It''s a work in progress. I believe the patch is currently being added to the > wiki, I''d assume will soon be in the main trunk. > > > 5) what is overlap? > > http://wiki.script.aculo.us/scriptaculous/show/Droppables.add > > > 6) what is dropon? > > > > 7) Why the underscore in Sortable._marker > > The underscore generally is used to indicate a private method. > > > 8) what are onEmptyHover and dropOnEmpty about? What is ''empty''? > > http://wiki.script.aculo.us/scriptaculous/show/Sortable.create > > > 9) what is the ghosting option about? > > Try using it. It just adds a "ghosted" version of whats being dragged. > > > Thanks! > > Peter > > > > [1] http://trac.vaillant.ca/store.rb > > [2] JavaScript The Definitive Guide, David Flanagan > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > Again, check out the main documentation, it''ll save you some headache if you > read up on the functionality before trying to use it. In particular, the > unit tests should be helpful. > > Regards, > Jerod > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >