Open nicoip opened 9 years ago
What dropdown do you have in mind? I don't recall any dropdowns in afe_collection_upload
widget.
Yes afe_collection_upload. I would use the sortable with afe_collection_upload. but nothing happens
If you've configured everything correctly, then "drag and drop" uploaded items to set their order.
Note: this works on items already saved on the server. New files (selected for upload) have to be uploaded and saved first.
Yes I know ... The configuration is correct.
@nicoip Please paste the related generator.yml
hi,
generator: admingenerator.generator.doctrine
params:
...
embed_types:
# short syntax
- "ImageAdmin-generator.yml"
pk_requirement: ~
fields:
...
images:
label: Images
dbType: collection
formType: afe_collection_upload
addFormOptions:
primary_key: id
nameable: false
sortable: true
sortable_field: position
editable: [ legende, path, position ]
type: \Test\GalleryBundle\Form\Type\ImageAdmin\EditType
maxNumberOfFiles: 99
maxFileSize: 5000000
minFileSize: 1000
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i
loadImageFileTypes: /^image\/(gif|jpe?g|png)$/i
loadImageMaxFileSize: 2500000
previewMaxWidth: 100
previewMaxHeight: 100
previewAsCanvas: true
previewFilter: thumb_gallery_images
prependFiles: false
allow_add: true
allow_delete: true
error_bubbling: false
options:
data_class: Test\GalleryBundle\Entity\Image
the checkboxes are disabled
Thank you
1) I'm sorry, but I don't understand what exacly is the problem? Please explain more verbose. At first you say you wanted to use sortable "but nothing happens" - I assumed the sorting is not working. Now you say the checkboxes are disabled - is that the problem?
2) The rendered output looks OK.
3) The checkboxes are for "batch delete" (the delete button on top bar, next to "add files"). Clicking that button should delete all "checked" files.
4) Have a look at browser console. Are there any Javascript errors? Maybe you have some Javascript error (in some other script), which often leads to breaking current Javascript runtime and may break other scripts.
Thank you for your reply.
I'm sorry, there are two problems: First: I can not order my images with a "drag and drop" Secondly: the checkbox for "batch delete" are disabled
I looked at the console, I see no error. I did not create my own scripts
@nicoip Sorry.. I don't speak french...
Sorry, I changed my message
Hello,
I use avocode upload widget for collection (afe_collection_upload).
I want to use sortable of l3pp4rd/DoctrineExtensions, I followed the tutorials, but the drop down does not appear. When I save my entity, the order of images is 0,1,2,3,4 ... But the drop down can not be displayed :(
Do you have an idea?
Thank you