Blogs
jQuery 1.5 updates on both jQuery Core and UI. This release included many performance improvements and bug fixes as well as a major re-write of the Ajax module which now comes with deferred callback management. jQuery Core also introduced a new feature called jQuery.sub which allows for new copies of jQuery to be created where properties and methods can be safely modified without affecting the global jQuery object. Refer to http://jquery.com/.
In previous blogs posts, following topics have beed addressed.
- Applying Query 1.4.3 and its custom UI 1.8.5 in Liferay 6 plugins,
- Using jQuery (or any Javascript library) in Liferay 6.0 (thanks to Nate)
- Building jQuery based plugins in Liferay 6,
This post will address how to apply jQuery 1.5 and UI 1.8.9 in liferay 6.1 (at revision 72877 - this is the development version, it will become in the future the next version of Liferay portal).
Introduction
UI 1.8.9 (with jQuery 1.5) is much same as that of UI 1.8.5 in Liferay 6.0.
The following are a few screenshots.
How to achieve this?
The way to apply jQuery 1.5 and UI 1.8.9 in Liferay 6.1 is almost same as that of jQuery 1.4.* and UI 1.8.5 in Liferay 6.0. The following items show differences
- Use DTD 6.1
liferay-portlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 6.1.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_6_1_0.dtd">
liferay-display.xml.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 6.1.0//EN" "http://www.liferay.com/dtd/liferay-display_6_1_0.dtd">
- apply jquery 1.5 and UI 1.8.9 in liferay-portlet.xml
<portlet>
<portlet-name>1</portlet-name>
<icon>/images/world.png</icon>
<header-portlet-css>/css/ui-lightness/jquery-ui-1.8.9.custom.css</header-portlet-css>
<header-portlet-javascript>/js/jquery-1.5.min.js</header-portlet-javascript>
<footer-portlet-javascript>/js/jquery-ui-1.8.9.custom.min.js</footer-portlet-javascript>
<css-class-wrapper>sample-jquery-portlet</css-class-wrapper>
</portlet>
Download
You can simply download WAR of Sample jQuery 1.5 and UI 1.8.9 plugin.
Liferay 6.1: sample-jquery-portlet-6.1.0.1.war
And then deploy it in Liferay 6.1.
Of course, you can test the same at Liferay 6.0.
Liferay 6.0: sample-jquery-portlet-6.0.5.1.war
That's it.

