Foros

Inicio » Alloy UI » English

Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Bernardo Puglia Lima
Alloy UI 1.5 on Liferay 6.0x due to TreeNodeRadio
23 de octubre de 2012 13:29
Respuesta

Bernardo Puglia Lima

Ranking: Junior Member

Mensajes: 36

Fecha de incorporación: 25 de enero de 2012

Mensajes recientes

Hello everyone!

I'm trying to use a feature that I have noticed to be found only on Alloy UI 1.5 (http://deploy.alloyui.com/api/classes/TreeNodeRadio.html) but I need it to work on a Liferay 6.0 SP2 environment.

Is there a way to upgrade the Alloy UI 1.0.1 -> 1.5 to use it on versions prior to Liferay 6.1?

Or if anyone knows a way to allow just a single selection on a TreeNodeCheck on 1.0.1 would solve my problem as well!

Thanks in advance!
Eduardo Lundgren
RE: Alloy UI 1.5 on Liferay 6.0x due to TreeNodeRadio
24 de octubre de 2012 7:28
Respuesta

Eduardo Lundgren

LIFERAY STAFF

Ranking: Junior Member

Mensajes: 25

Fecha de incorporación: 18 de junio de 2008

Mensajes recientes

Hello Bernardo,

Alloy 1.0.x doesn't have TreeNodeRadio out of the box.

One recommendation is that you create that class, copying A.TreeNodeRadio from the 1.5.x source, and place it in any javascript file from your portlet.

I have attached a zip file with an example.
archivos adjuntos: tree-node-radio.zip (5.334,4k)
Bernardo Puglia Lima
RE: Alloy UI 1.5 on Liferay 6.0x due to TreeNodeRadio
25 de octubre de 2012 13:01
Respuesta

Bernardo Puglia Lima

Ranking: Junior Member

Mensajes: 36

Fecha de incorporación: 25 de enero de 2012

Mensajes recientes

Worked perfectly!

For those who need it, copy the tree-node-radio.js to the js folder and the radios.png to the css folder. Add the following line to liferay-portlet.xml:

1<header-portlet-javascript>/js/tree-node-radio.js</header-portlet-javascript>


And the following classes to the main.css:

1
2.aui-tree-node-radio .aui-tree-node-checkbox-container {
3    background: transparent url(radios.png) no-repeat 0 50%;
4}
5
6.aui-tree-node-radio-checked .aui-tree-node-checkbox-container {
7    background-position: -16px 50%;
8}


Just one little issue: when I select a node that has children, the selected (parent) and the last child are selected, but if I select the last child of some other node, the parent isn't selected. Is this a normal behaviour?

Once again, thanks!
Bernardo Puglia Lima
RE: Alloy UI 1.5 on Liferay 6.0x due to TreeNodeRadio
8 de noviembre de 2012 4:54
Respuesta

Bernardo Puglia Lima

Ranking: Junior Member

Mensajes: 36

Fecha de incorporación: 25 de enero de 2012

Mensajes recientes

Well, due to this bug I had to stick with a jQuery tree solution on this particular case.

Regards!