Skip to content
mattr- edited this page Oct 16, 2012 · 5 revisions

Upgrading jQuery

This page explains how to update jQuery and jQuery UI for use with Tracks

For Tracks >= 2.2

Upgrading jQueryUI

This is a manual process involving the following steps:

  • Download the UI zip from jqueryui.com using the custom download
    • Check all modules
    • Select Sunny as the theme
    • Select the latest version
    • Click download
  • Remove old ui files
    • git rm -r public/stylesheets/images
    • git rm vendor/assets/stylesheets/jquery-ui-XX.custom.js
    • git rm vendor/assets/javascripts/jquery-ui-XX.custom.min.js
  • Add new ui files
    • From /css/sunny in the zip, copy all (css and images) to vendor/assets/stylesheets. Yes, the images need to be in the stylesheets directory for jQuery to find them.
    • From /js in the zip copy only jquery-ui-XX.min.js to vendor/assets/javascripts
  • change ref to jquery-ui javascripts AND stylesheets in app/assets/javascripts/application.js

For Tracks <= 2.1

Upgrading jQuery is done by hand and involves the following steps:

  • Download latest min version of jQuery from http://jquery.com
  • Save it to public/javascripts
  • Remove old js: git rm public/javascripts/jquery-XX.min.js
  • Change ref to jquery javascripts in
    • app/views/layouts/login.html.erb
    • app/views/layouts/standard.html.erb

Upgrading jQueryUI by hand involves the following steps:

  • Download the ui zip from jqueryui.com using the custom download
    • Check all modules
    • Select Sunny as the theme
    • Select the latest version
    • Click download
  • Remove old UI files
    • git rm -r public/stylesheets/images
    • git rm public/stylesheets/jquery-ui-XX.custom.js
    • git rm public/javascripts/jquery-ui-XX.custom.min.js
  • Add new UI files
    • from /css/sunny in the zip copy all css and images to public/stylesheets. Yes, the images need to be in this stylesheets directory for jQuery to find them.
    • from /js in the zip copy only jquery-ui-XX.min.js to public/javascripts
  • change ref to jquery-ui javascripts AND stylesheets in app/views/layouts/standard.html.erb

Test Tracks (rake cucumber:selenium) and enjoy

Remember to clear the cache on production environments!

Clone this wiki locally