Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove Alloy UI from Liferay

Liferay CMS comes with Alloy UI to do several javascript functions (draggable, sortable etc.) The thing is we also use several jQuery plugins that use jQuery UI. Alloy UI also loads slow and has big overhead causing the webpage to lag massively, so we'd like to remove it and do thing with jQuery UI.

Liferay loads Alloy UI files by default in the DOM, is there anything we need to remove (declarations etc.) in the server/portlet files?

like image 478
user780756 Avatar asked Dec 05 '12 12:12

user780756


People also ask

What is Liferay alloy UI?

Aim of this article: Understand the basics of Liferay Alloy UI. AlloyUI is a UI framework built on the top of YUI3 (Yahoo UI) that provides a simple API for building high scalable applications.It incorporates three design languages: HTML, CSS, and JavaScript. Some of you might know jQuery, Ext JS, Dojo etc.

What is the Liferay faces alloy component tag?

The Liferay Faces Alloy sub-project includes a suite of JSF UI components that utilize Alloy UI. The Facelet component tags are prefixed with the alloy: namespace and are compatible with webapp and portlet environments.

What is Liferay AUI TagLib?

Posted on September 28, 2014 by Hamidul Islam in Liferay . Liferay AUI Taglib provides various tag for faster UI development. This article explains the different liferay alloy ui tags and its uses.

What is alloyui in Lifeline?

AlloyUI is a UI framework built on the top of YUI3 (Yahoo UI) that provides a simple API for building high scalable applications.It incorporates three design languages: HTML, CSS, and JavaScript. Some of you might know jQuery, Ext JS, Dojo etc. These javascript framework can easily be used in Liferay.


1 Answers

The short answer is I wouldn't bother trying! This is because Alloy UI is so integral to the Liferay UI, without it you'd have a lot of work to do to replace with jQuery replacements.

Alloy UI does a lot more than just draggable portlets, and sorting. It also controls popups, AJAX calls, and loads of other stuff that I haven't come across yet.

HOWEVER if you really want to put yourself through it then I'd suggest you first of all create a Custom Theme and remove any references to Alloy UI from the theme, and load jQuery instead.

Then you'll also need to create a hook or hooks (and possibly use EXT plugins) to replace all of the JSP files that reference Alloy UI, with copies that use jQuery to do the same functionality.

OR another way would be to for the Liferay source code on GitHub and create your own version from the source removing Alloy UI.

BUT I still strongly suggest you don't bother wasting your time. Love it or hate it, Alloy UI is bake dried into Liferay. If you follow either of my suggestions you're effectively stopping yourself from upgrading Liferay in the future.

A better suggestion would be to suggest ways of improving Alloy UI to Liferay, or contribute to the Alloy UI repository on GitHub and help the community.

~~ EDIT ~~

To disable Alloy UI for just non-authenticated users, then perhaps a HOOK that modifed the files in portal-web\docroot\html\common\themes\ would do the trick. In particular look at top_js.jspf. If you put checks in there to say only load Alloy UI if you're signed in then it might be the answer your after.

like image 133
Jonny Avatar answered Sep 17 '22 19:09

Jonny