Sorting feature
Permalink Browser Info Environment
I've always wanted to add sorting functionality to this add-on, today i checked the code and saw it has already, but it's not working.
I think the reason is file list wrapper selector that does not exist.
at the file \tony_multi_file_attribute\models\attribute\types\multiple_files\form.php line 16 i changed:
to
and it seems works fine when i try to sort files at page properties modal.
But i used this add-on at the composer and there it's not working.
any ideas?
I think the reason is file list wrapper selector that does not exist.
at the file \tony_multi_file_attribute\models\attribute\types\multiple_files\form.php line 16 i changed:
$('.multiFileAttribute_attachedFilesList').sortable({
to
$('#ak<?php echo $this->attributeKey->getAttributeKeyID() ?>_attachedFilesList').sortable({
and it seems works fine when i try to sort files at page properties modal.
But i used this add-on at the composer and there it's not working.
any ideas?
Type: | Discussion |
---|---|
Status: | In Progress |
As promised, attached is the 'multiple files' map of the multi-file module.
I've tested it a bit, but I do not garantee anything. Test it thoroughly if you are going to use it in a production environment.
I've tested it a bit, but I do not garantee anything. Test it thoroughly if you are going to use it in a production environment.
This fix worked perfect!
This is cause by jquery ui not properly being loaded or not loaded at all on a composer page. i have solved it by adding the sortable function of jquery ui to the form function in the controller.php and set a new class on the sortable function in the form.php . The output of form.php is also changed a bit to give back a unsorted list.
I will reply with all the code attached once i've fully tested it.