Does wdCalendar work with Rails 3.0?
Do开发者_如何学Goes wdCalendar work with Rails 3.0?
Yes, it can. Essentially the 'jqcalendars_controller.rb' (or whatever you called it) needs to duplicate the functionality of the 'php/datafeed.php' which is included in 'wdCalendar.zip'. 'datafeed.php' is only sortof RESTful. I recommend taking the time to clean it up and make it conform to that standard. Rails 3.1 will require you to remove 'images/', 'stylesheets/' and 'javascripts/ from all of the respective urls to agree with the new asset pipeline standard.
While you are at it, make sure these are in the tag (and not the ugly html style) of your layout.
<%= stylesheet_link_tag 'dailog' %>
<%= stylesheet_link_tag 'calendar' %>
<%= stylesheet_link_tag 'dp' %>
<%= stylesheet_link_tag 'alert' %>
<%= stylesheet_link_tag 'main' %>
<%= javascript_include_tag 'application' %>
<%= javascript_include_tag 'Plugin/Common' %>
<%= javascript_include_tag 'Plugin/datepicker_lang_US' %>
<%= javascript_include_tag 'Plugin/jquery.datepicker' %>
<%= javascript_include_tag 'Plugin/jquery.alert' %>
<%= javascript_include_tag 'Plugin/jquery.ifrmdailog' %>
<%= javascript_include_tag 'Plugin/wdCalendar_lang_US' %>
<%= javascript_include_tag 'Plugin/jquery.calendar' %>
Good luck!
Also, much of the javascript is not unobtrusive. It would be great to get that out of the view.
精彩评论