jamiegrove
2007-Aug-08 12:34 UTC
Scal Update - Calendar Control for Prototype and Scriptaculous
Hi folks. beta5 is now available. This version includes the requested "weekday start" parameter that allows you to set which day of the week the calendar starts with. This parameter has the creative name of ''weekdaystart''. It is numeric and defaults to zero (0) for Sunday. Have fun! - Jamie Scal - A simple calendar control based on Prototype js and Scriptaculous http://www.fieldguidetoprogrammers.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
kangax
2007-Aug-09 02:24 UTC
Re: Scal Update - Calendar Control for Prototype and Scriptaculous
Jamie, It''s all very nice and we DO need prototype based date picker, but... I think your code can be easily reduced twice (at least) i.e. if (typeof this.options.prevbutton != ''undefined''){ this.prevbutton = this.options.prevbutton; }else{ this.prevbutton = ''<''; } can be written like this: this.prevButton = this.options.prevButton || ''&laquo;'' I suggest you take a look at prototype/scriptaculous source to get familiar with common techniques -- View this message in context: http://www.nabble.com/Scal-Update---Calendar-Control-for-Prototype-and-Scriptaculous-tf4236031.html#a12065369 Sent from the RubyOnRails Spinoffs mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
jamiegrove
2007-Aug-10 00:30 UTC
Re: Scal Update - Calendar Control for Prototype and Scriptaculous
Thanks, Kangax. My primary goal was to have a working model, but there''s no doubt that there is room for improvement. I''ve changed the parameter handling per your suggestion and will look for other ways to reduce the code size. Thanks again! - J On Aug 8, 10:24 pm, kangax <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Jamie, > > It''s all very nice and we DO need prototype based date picker, but... > I think your code can be easily reduced twice (at least) > > i.e. > > if (typeof this.options.prevbutton != ''undefined''){ > this.prevbutton = this.options.prevbutton;}else{ > > this.prevbutton = ''<''; > > } > > can be written like this: > > this.prevButton = this.options.prevButton || ''&laquo;'' > > I suggest you take a look at prototype/scriptaculous source to get familiar > with common techniques > > -- > View this message in context:http://www.nabble.com/Scal-Update---Calendar-Control-for-Prototype-an... > Sent from the RubyOnRails Spinoffs mailing list archive at Nabble.com.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---