掲示板
YUI vs JQuery in 6
It looks, at least at first glance, like you're moving to YUI from JQuery. I just wanted to double check that.
Lisa Simpson:
It looks, at least at first glance, like you're moving to YUI from JQuery.
We are moving from jQuery to YUI.
14年前 に Mika Koivisto によって更新されました。
RE: YUI vs JQuery in 6
Liferay Legend 投稿: 1519 参加年月日: 06/08/07 最新の投稿
Actually we are moving to Alloy UI (AUI) which is built on top of YUI.
I guess, technically speaking, the jQuery stuff became YUI, and the custom Liferay javascript became the more extensible AlloyUI, which is like a set of tools for YUI. Also, you can still use jQuery in Liferay without conflict, as long as you don't mind adding the additional kilobytes taken by the jQuery library.
However, I have a slight feeling you meant to write the opposite of what we read. =)
However, I have a slight feeling you meant to write the opposite of what we read. =)
Hi Jonathan,
Thanks. Technically speaking, we can use jQuery in Liferay without conflict, as long as we don't mind adding the additional kilobytes taken by the jQuery library.
Now the question is that how to reuse (jQuery) portlets which have been developed in 5.2 (both CE and EE)?
Do you have simple example (jQuery) portlet which can be running well in both 5.2 and 6.0?
It would be nice that existing jQuery portlets could be re-used in liferay 6 without big changes.
Jonas Yuan
---------------------------
The Author of Liferay Books:
Liferay Portal 6 Enterprise Intranets
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
Thanks. Technically speaking, we can use jQuery in Liferay without conflict, as long as we don't mind adding the additional kilobytes taken by the jQuery library.
Now the question is that how to reuse (jQuery) portlets which have been developed in 5.2 (both CE and EE)?
Do you have simple example (jQuery) portlet which can be running well in both 5.2 and 6.0?
It would be nice that existing jQuery portlets could be re-used in liferay 6 without big changes.
Jonas Yuan
---------------------------
The Author of Liferay Books:
Liferay Portal 6 Enterprise Intranets
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
Hi Jonathan,
I am trying to use JQuery in my porlet as it was already written for 5.2.3. However, I could not find a way to load jquery. I packaged jquery.js in js directory (same level as WEB-INF) and used following tags to load it.
<script type="text/javascript" src="/js/jquery-1.3.2.js"></script
<script type="text/javascript" src="../js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="js/jquery-1.3.2.js"></script>
And all of them are failing with following exception.
19:55:35,037 INFO [PortalImpl:3705] Current URL /web/guest/js/jquery-1.3.2.js g
enerates exception: null
19:55:35,037 INFO [PortalImpl:3716] com.liferay.portal.NoSuchLayoutException
com.liferay.portal.NoSuchLayoutException
Can you tell me what I am doing wrong? Thank you in advance.
Brian Ko
I am trying to use JQuery in my porlet as it was already written for 5.2.3. However, I could not find a way to load jquery. I packaged jquery.js in js directory (same level as WEB-INF) and used following tags to load it.
<script type="text/javascript" src="/js/jquery-1.3.2.js"></script
<script type="text/javascript" src="../js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="js/jquery-1.3.2.js"></script>
And all of them are failing with following exception.
19:55:35,037 INFO [PortalImpl:3705] Current URL /web/guest/js/jquery-1.3.2.js g
enerates exception: null
19:55:35,037 INFO [PortalImpl:3716] com.liferay.portal.NoSuchLayoutException
com.liferay.portal.NoSuchLayoutException
Can you tell me what I am doing wrong? Thank you in advance.
Brian Ko
Jonathan,
Please disregard my previous email. Now I remember it.
<portlet:defineObjects/>
<script language="javascript" type="text/javascript"
src="${renderRequest.contextPath}/js/jquery-1.3.2.js"></script>
I forgot the contextPath.
Brian Ko
Please disregard my previous email. Now I remember it.
<portlet:defineObjects/>
<script language="javascript" type="text/javascript"
src="${renderRequest.contextPath}/js/jquery-1.3.2.js"></script>
I forgot the contextPath.
Brian Ko
13年前 に Antonieta A. Olivares によって更新されました。
RE: YUI vs JQuery in 6
Regular Member 投稿: 143 参加年月日: 09/11/04 最新の投稿Brian Ko:
Jonathan,
Please disregard my previous email. Now I remember it.
<portlet:defineObjects/>
<script language="javascript" type="text/javascript"
src="${renderRequest.contextPath}/js/jquery-1.3.2.js"></script>
I forgot the contextPath.
Brian Ko
I'm using Liferay 6.0 and I is as before jquery calls is to make the rounded edges of the portlet
help¡¡¡¡¡
13年前 に Maarten van Heiningen によって更新されました。
RE: YUI vs JQuery in 6
Regular Member 投稿: 174 参加年月日: 09/02/05 最新の投稿
You can use CSS3 for this:
-moz-border-radius: 5px; /* Firefox support */
-webkit-border-radius: 5px; /* webkit support */
border-radius: 5px; /* older browsers */
For jquery to be used you can still do this with curveycorners. Just include jquery in your /js/folder.
In your portal_normal.vm include:
<script type="text/javascript">
var curvyCornersVerbose = false; //You will not get javascript popup warnings
</script>
<script type="text/javascript" src="$javascript_folder/jquery-1.4.2.min.js" charset="utf-8"></script>
<script type="text/javascript" src="$javascript_folder/curvey-corners.js" charset="utf-8"></script>
In your main javascript.js or main.js you put the following call for the curvey corners:
var settings = {
tl : {radius : 10},
tr : {radius : 10},
bl : {radius : 10},
br : {radius : 10},
antiAlias : true}
jQuery(".banner").each( function() {
curvyCorners(settings, this);
});
In your custom.css file you set:
.banner {
-moz-border-radius: 5px; /* Firefox support */
-webkit-border-radius: 5px; /* webkit support */
border-radius: 5px; /* older browsers */
} /* you need to include this in your css otherwise curvey corner will not work */
Good luck,
Maarten
-moz-border-radius: 5px; /* Firefox support */
-webkit-border-radius: 5px; /* webkit support */
border-radius: 5px; /* older browsers */
For jquery to be used you can still do this with curveycorners. Just include jquery in your /js/folder.
In your portal_normal.vm include:
<script type="text/javascript">
var curvyCornersVerbose = false; //You will not get javascript popup warnings
</script>
<script type="text/javascript" src="$javascript_folder/jquery-1.4.2.min.js" charset="utf-8"></script>
<script type="text/javascript" src="$javascript_folder/curvey-corners.js" charset="utf-8"></script>
In your main javascript.js or main.js you put the following call for the curvey corners:
var settings = {
tl : {radius : 10},
tr : {radius : 10},
bl : {radius : 10},
br : {radius : 10},
antiAlias : true}
jQuery(".banner").each( function() {
curvyCorners(settings, this);
});
In your custom.css file you set:
.banner {
-moz-border-radius: 5px; /* Firefox support */
-webkit-border-radius: 5px; /* webkit support */
border-radius: 5px; /* older browsers */
} /* you need to include this in your css otherwise curvey corner will not work */
Good luck,
Maarten
Maarten van Heiningen:
<script type="text/javascript" src="$javascript_folder/jquery-1.4.2.min.js" charset="utf-8"></script>
<script type="text/javascript" src="$javascript_folder/curvey-corners.js" charset="utf-8"></script>
tnx "Maarten van Heiningen"
this code "" <script type="text/javascript" src="$javascript_folder/jquery-1.4.2.min.js" charset="utf-8"></script> "" that was my problem.
14年前 に Baptiste Grenier によって更新されました。
RE: YUI vs JQuery in 6
Regular Member 投稿: 100 参加年月日: 09/06/30 最新の投稿
AFAIK two years ago Liferay hired the lead developer of jQuery UI, it's surprising to see that you are moving away from jQuery.
Could you please explain us what is your concerns with jQuery? On what criteria did you find YUI more suitable for Liferay? I am a pleased user of jQuery for now and I would like to hear this.
Could you please explain us what is your concerns with jQuery? On what criteria did you find YUI more suitable for Liferay? I am a pleased user of jQuery for now and I would like to hear this.
14年前 に Mika Koivisto によって更新されました。
RE: YUI vs JQuery in 6
Liferay Legend 投稿: 1519 参加年月日: 06/08/07 最新の投稿
You should watch Rich UIs Made Simple: Liferay Alloy UI webinar. I think Nate explains the motivation behind the move best.