Fórumok
Liferay Auto Fields sortable
Sergio Cabrera, módosítva 12 év-val korábban
Liferay Auto Fields sortable
Junior Member Bejegyzések: 68 Csatlakozás dátuma: 2011.12.19. Legújabb bejegyzések
Hello, I'm using "liferay-auto-fields" in my own portlet and I'd like to make them sortable. I've seen in the source code an option to get that:
As far as I can see I need to implement a sortableHandle, but I don't know how or where. Can anyone guide me a bit?
Thanks
/**
* OPTIONS
*
* Required
* container {string|object}: A selector that contains the rows you wish to duplicate.
* baseRows {string|object}: A selector that defines which fields are duplicated.
*
* Optional
* fieldIndexes {string}: The name of the POST parameter that will contain a list of the order for the fields.
* sortable{boolean}: Whether or not the rows should be sortable
* sortableHandle{string}: A selector that defines a handle for the sortables
*
*/
As far as I can see I need to implement a sortableHandle, but I don't know how or where. Can anyone guide me a bit?
Thanks
Andrey Filippov, módosítva 12 év-val korábban
RE: Liferay Auto Fields sortable
Junior Member Bejegyzések: 27 Csatlakozás dátuma: 2010.10.21. Legújabb bejegyzések
Hey Sergio,
Use it something like this:
Use it something like this:
var autoFields = new Liferay.AutoFields(
{
contentBox: '#<portlet:namespace />quests > fieldset',
fieldIndexes: '<portlet:namespace />choicesIndexes',
sortable: true,
sortableHandle: '.row-fields'
}
).render();
Sergio Cabrera, módosítva 12 év-val korábban
RE: Liferay Auto Fields sortable
Junior Member Bejegyzések: 68 Csatlakozás dátuma: 2011.12.19. Legújabb bejegyzések
That includes de <div> tag, but nothing happens. Should it be draggable or something like that?
Andrey Filippov, módosítva 12 év-val korábban
RE: Liferay Auto Fields sortable
Junior Member Bejegyzések: 27 Csatlakozás dátuma: 2010.10.21. Legújabb bejegyzések
Yes, in my case a "drag" sign appeared in each <div class="row-fields"> rectangle and I could move them up and down. Btw - I am using 6.1 CE...
Sergio Cabrera, módosítva 12 év-val korábban
RE: Liferay Auto Fields sortable
Junior Member Bejegyzések: 68 Csatlakozás dátuma: 2011.12.19. Legújabb bejegyzések
I'm using 6.0.6. I'll check it again. Thanks
Sergio Cabrera, módosítva 11 év-val korábban
RE: Liferay Auto Fields sortable (Válasz)
Junior Member Bejegyzések: 68 Csatlakozás dátuma: 2011.12.19. Legújabb bejegyzések
Yes, it seems that there are several bugs in the 6.0.x ckeditor files. I updated ckeditor.jsp to the last version in 6.0.x liferay svn branch and it worked.