Sugar 6.5 begins another component change for the platform, which is to include jQuery 1.6.4 as a core component going forward. Over time, we will be using jQuery to replace the usage of YUI thoughout the product; the goal is to initially replace YUI 3, and then longer term to replace the use of YUI 2. Many of the developers across our partner and open source developer community are big fans of jQuery, as are we, and we hope the move to jQuery will make working with JS much easier in the product going forward. This will also enable us to make great strides in the UX and UI of the app as a whole over the next year.
With jQuery, comes a bunch of new functionality in the ease of dealing with HTTP requests and script loading. One such example is getting around problems loading scripts with the AJAX UI, as referenced in this blog post:
this worked fine in 5.5 and works in 6.4 if the ajaxui is disabled
any ideas how I can get round this without disable the ajaxui?
jQuery has a nice function called $.getScript(), which will load a script and then execute a piece of code once it’s loaded. This enables adding simple widgets in HTML fields for the various views, such as the DetailView. A great example one is the widget provided by the joind.in project, which is a site for managing conference and speaker feedback for events. They have a simple widget for showing the ratings for a talk which is a simple JS piece of code, which with a small bit of refactoring will drop right into a Sugar HTML with the following code segment ( assume the widget field name is joindin_widget and the talk id is in the joindin_id field )
Hopefully the use of jQuery will make developing Sugar customizations and add-ons much easier for our developer community going forward.