Foros de discusión
Alloy UI 1.5 on Liferay 6.0x due to TreeNodeRadio
Bernardo Puglia Lima, modificado hace 11 años.
Alloy UI 1.5 on Liferay 6.0x due to TreeNodeRadio
Junior Member Mensajes: 41 Fecha de incorporación: 25/01/12 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!
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, modificado hace 11 años.
RE: Alloy UI 1.5 on Liferay 6.0x due to TreeNodeRadio
Junior Member Mensajes: 25 Fecha de incorporación: 18/06/08 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.
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:
Bernardo Puglia Lima, modificado hace 11 años.
RE: Alloy UI 1.5 on Liferay 6.0x due to TreeNodeRadio
Junior Member Mensajes: 41 Fecha de incorporación: 25/01/12 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:
And the following classes to the main.css:
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!
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:
<header-portlet-javascript>/js/tree-node-radio.js</header-portlet-javascript>
And the following classes to the main.css:
.aui-tree-node-radio .aui-tree-node-checkbox-container {
background: transparent url(radios.png) no-repeat 0 50%;
}
.aui-tree-node-radio-checked .aui-tree-node-checkbox-container {
background-position: -16px 50%;
}
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, modificado hace 11 años.
RE: Alloy UI 1.5 on Liferay 6.0x due to TreeNodeRadio
Junior Member Mensajes: 41 Fecha de incorporación: 25/01/12 Mensajes recientes
Well, due to this bug I had to stick with a jQuery tree solution on this particular case.
Regards!
Regards!