#9019 closed enhancement (fixed)
Upgrade to jQuery 1.4.x
Reported by: | Christian Boos | Owned by: | Christian Boos |
---|---|---|---|
Priority: | normal | Milestone: | 0.12 |
Component: | general | Version: | 0.12dev |
Severity: | normal | Keywords: | jquery javascript |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
jQuery 1.4 has been released recently (Thursday, January 14, 2010): see the Full Release Notes.
I've tested 1.4a2 some time ago and only found one issue, so I suppose upgrading won't be a big deal.
Besides the usual performance improvements that should come "for free", I've noted a good deal of new features that we could benefit from to have a better code in some places:
jQuery.parseJSON
on the other side of our newtrac.util.presentation.to_json
, for passing data from Python to Javascript instead of writing data structures in the templates- as the selector style “#id p” is faster we can probably benefit from this
- creation of HTML elements can now be done with jQuery(html, props), props being a dictionary of attributes and events
I've updated that patch with the minified copy of 1.4.1, but for developing better use the uncompressed version of course. So far it only contains the fix for the use of the now removed className
internal (Backwards-Incompatible Changes).
Testing welcomed.
Attachments (0)
Change History (7)
comment:1 by , 15 years ago
comment:3 by , 15 years ago
Well, first upgrade, then document …
And before doing the upgrade, I'd prefer to receive some positive testing feedback first (though all the tests I did myself show that it didn't introduce any issues, so I'll upgrade anyway in a few days).
comment:4 by , 15 years ago
Not many people have guts to switch their Trac to something that had't earned a stable state yet, because these are usually installed in production environment. =)
comment:5 by , 15 years ago
Well, in general, if the db is SQLite, testing a new version is pretty trivial:
- cp -a productionenv testenv
- PYTHONPATH=/path/to/trunk python /path/to/trunk/trac/web/standalone.py -p 8080 testenv
(or use a virtual env…)
If the db is something else, then doing a backup + reload in a different db should do the job as well (hm, maybe doing a backup at the occasion of a trac-admin ... hotcopy
could make things easier here).
Now for the specific case of testing a new jQuery version, that's even more trivial: simply copy that new version over your existing <deploydir>/htdocs/js/jquery.js. If something breaks, it will be just some dynamic parts of the web UI, nothing critical.
Well, actually the patch was so small it didn't make much sense to bundle it with jquery 1.4.1 ;-)
So download your flavor of 1.4.1 from Day Twelve and test with r9117 (as the change is also compatible with jQuery 1.3.2).