Foren

YUI vs JQuery in 6

thumbnail
Lisa Simpson, geändert vor 14 Jahren.

YUI vs JQuery in 6

Liferay Legend Beiträge: 2034 Beitrittsdatum: 05.03.09 Neueste Beiträge
It looks, at least at first glance, like you're moving to YUI from JQuery. I just wanted to double check that.
thumbnail
Jonathan Neal, geändert vor 14 Jahren.

RE: YUI vs JQuery in 6

Junior Member Beiträge: 66 Beitrittsdatum: 29.08.07 Neueste Beiträge
Lisa Simpson:
It looks, at least at first glance, like you're moving to YUI from JQuery.


We are moving from jQuery to YUI.
thumbnail
Mika Koivisto, geändert vor 14 Jahren.

RE: YUI vs JQuery in 6

Liferay Legend Beiträge: 1519 Beitrittsdatum: 07.08.06 Neueste Beiträge
Actually we are moving to Alloy UI (AUI) which is built on top of YUI.
thumbnail
Jonathan Neal, geändert vor 14 Jahren.

RE: YUI vs JQuery in 6

Junior Member Beiträge: 66 Beitrittsdatum: 29.08.07 Neueste Beiträge
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. =)
thumbnail
Jonas Yuan, geändert vor 13 Jahren.

RE: YUI vs JQuery in 6

Liferay Master Beiträge: 993 Beitrittsdatum: 27.04.07 Neueste Beiträge
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
thumbnail
Brian Ko, geändert vor 13 Jahren.

RE: YUI vs JQuery in 6

Junior Member Beiträge: 70 Beitrittsdatum: 11.02.10 Neueste Beiträge
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
thumbnail
Brian Ko, geändert vor 13 Jahren.

RE: YUI vs JQuery in 6

Junior Member Beiträge: 70 Beitrittsdatum: 11.02.10 Neueste Beiträge
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
thumbnail
Antonieta A. Olivares, geändert vor 13 Jahren.

RE: YUI vs JQuery in 6

Regular Member Beiträge: 143 Beitrittsdatum: 04.11.09 Neueste Beiträge
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¡¡¡¡¡
thumbnail
Maarten van Heiningen, geändert vor 13 Jahren.

RE: YUI vs JQuery in 6

Regular Member Beiträge: 174 Beitrittsdatum: 05.02.09 Neueste Beiträge
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
thumbnail
amin zamani, geändert vor 10 Jahren.

RE: YUI vs JQuery in 6

New Member Beiträge: 10 Beitrittsdatum: 07.07.13 Neueste Beiträge
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.
thumbnail
Baptiste Grenier, geändert vor 14 Jahren.

RE: YUI vs JQuery in 6

Regular Member Beiträge: 100 Beitrittsdatum: 30.06.09 Neueste Beiträge
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.
thumbnail
Mika Koivisto, geändert vor 14 Jahren.

RE: YUI vs JQuery in 6

Liferay Legend Beiträge: 1519 Beitrittsdatum: 07.08.06 Neueste Beiträge
You should watch Rich UIs Made Simple: Liferay Alloy UI webinar. I think Nate explains the motivation behind the move best.
mr ed, geändert vor 14 Jahren.

RE: YUI vs JQuery in 6

New Member Beiträge: 6 Beitrittsdatum: 06.02.09 Neueste Beiträge
I'm surprised by this too.
When Paul was hired it was touted as a great opportunity both for Liferay and the jQuery community with the aim of Paul still contributing to jQuery UI.
Does Paul still work for Liferay?