Rank: Member
Groups: Member
Joined: 7/25/2007(UTC) Posts: 17
Thanks: 3 times
|
Hello, I recently updated to version 8.1.15 of the ImageUploader and it seems like there has been a change to how the uploadFileCountChange event works. Previously, I was using this event to add a select list to the panelItem which was working just fine. Now, it seems like the uploadFileCountChange event is triggered before the panelItem is added to the the uploadPane. I don't want to have to go back to a previous version as 8.1.15 has added a new addFiles() function to the uploadPane that is very useful. Is there another event I could use that is triggered after the HTML is inserted into the uploadPane? The reason I need this is because the user must select the type of document they are uploading for each file. Any suggestions? My code for the event handler is below. Code:
function _addDocumentTypeToForm(type) {
if (type == 'add') {
$('li.au-upldr-list-item').not(':has(div[id^="documentTypes"])').each$(function(index, $listItem) {
var $documentTypes = $('#documentTypes').clone();
var id = $listItem.attr('id');
$documentTypes.attr('id', 'documentTypes' + id).removeClass('hidden');
$documentTypes.find('label').attr('for', 'documentType_' + index);
$documentTypes.find('#documentType').attr('id', 'documentType_' + index);
$listItem.append($documentTypes);
});
}
}
|
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
It looks like you are trying to modify the DOM representation of the upload item. In fact I afraid it won't work reliably because the upload item is not always exists even after you add files to the upload list due to the memory/performance reasons. If you add too many items to the uploader, upload items won't be created until you scroll down. The upper items may be removed.
Previous versions did not have such optimization, so your approach worked (however there were problems with uploads containing hundreds of files).
In the next version we are going to add an ability to access the preview image of an item in the upload list. It will allow you building your own upload list panel. Something similar to Multiple Description demo in our Java/ActiveX uploader.
BTW, how many items in average your users will send?
|
|
|
|
Rank: Member
Groups: Member
Joined: 7/25/2007(UTC) Posts: 17
Thanks: 3 times
|
Andrew,
Thank you for your response. I understand that what I was doing was not supported and why the optimization that was made. Could you give me a rough ETA on the next version? I only ask because I am working on a project that will require me to submit this extra field with each document being uploaded. I will need to let management know when I can expect to be able to continue.
Other than adding another event that would be triggered once the item was added to the DOM, I can't think of another way to accomplish what I am looking to do.
I don't see our users adding more than a few items at a time. We are using your product to allow our users to upload files and photos for their insurance policy.
Thank you once again for your time! |
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
I believe it would take few more weeks to finish it, prepare code examples and update documentation.
|
|
|
|
Rank: Member
Groups: Member
Joined: 7/25/2007(UTC) Posts: 17
Thanks: 3 times
|
I understand. Thank you for the update. |
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.