image field: message duplicated when clicked "Add Image"

More
11 years 4 months ago #45063 by brandonking
Hello,

In Image field,
Select file -> Click "Add new Image" button
then you will see the message "File selected for uploading" duplicated on empty image holder.

find code below
Code:
// COPYING an empty value else if (thisNewField.getElement('div.empty_image')) { jQuery(thisNewField).find('div.empty_image').attr('id','".$elementid."_'+uniqueRowNum".$field->id."+'_preview_image'); }
Add this at bottom.
Code:
jQuery(thisNewField).find('div.fileselected_msg').text('');

and find
'File selected for uploading'
change to
Code:
'<div class=\"fileselected_msg\" style=\"line-height: 12px;overflow-wrap: break-word;\">'+newfilename.replace(/^.*[\\\/]/, '')+'</div>'
this will print file name instead of message.

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #45064 by brandonking
[attachment=0:1sw1hq05]<!-- ia0 -->img7.png<!-- ia0 -->[/attachment:1sw1hq05]
Attachments:

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #45065 by ggppdk
Hello

- ok will commit fix about message:
"File selected for uploading"
not being cleared when adding new value


- about adding filename as message this was not done before, because filename will not always fit, but i guess the workaround this is to force filename to wrap
Code:
.empty_image { word-wrap:break-word !important; }


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #45083 by brandonking

Revision: r1847
(a) # Fixed author-specific category parameters not taking effect in category
view, (b) + Added required class for field label to depict/highlight required
fields (default css appends an asterisk),


Thanks for your quick fix.
But both of them still don't work.. Can you examine?

Regards,

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #45087 by brandonking
We can display "preview image" instead of showing file name.

Somehow I could figure out and it works..

Please check source code below.
jsfiddle.net/bnickel/yP7Bb/

You have to change <div> tag("empty_image") to <img> tag
and insert above code in "function qmAssignFile"
and add jQuery click event as well.
I think you will find better approach though. :)

Regards,

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #45099 by ggppdk
Hello

- added this (preview prior to uploading) using HTML5 's FileReader API
... added both
in image field DB-mode
and in image field Folder-mode

- also the (NEWLY added by enjoyman) multiple uploading via plupload was fixed (the plupload Queue did not initialize properly while container was hidden)

(multiple upload can be used with image field in folder mode)


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.322 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save