Ajax File upload

  • Posts: 118
  • Thank you received: 3
11 years 7 months ago #140637

-- url of the page with the problem -- : www.quickcheapprint.co.nz
-- HikaShop version -- : 2.2.3

Hi there, I are playing around with the new ajax file upload. When the user clicks on the icon and uploads the file (or drags the file into the dropzone), it shows the filename and the name runs outside the dropzone and covers up other objects on the page. Is there a way to cut off the end of the filename so it only displays what it can fit within the dropzone?

Thanks
Alan

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

  • Posts: 26266
  • Thank you received: 4044
  • MODERATOR
11 years 7 months ago #140647

Hi,

Can you provide a screenshot ?
There are some variables in the views that you can change in order to change the maximum display length.
But I want to be sure that the text is the only responsible for your trouble.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 118
  • Thank you received: 3
11 years 7 months ago #140739

Sure, here it is.

Thanks
Alan

Attachments:

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

  • Posts: 26266
  • Thank you received: 4044
  • MODERATOR
11 years 7 months ago #140803

Hi,

You have to override the view "front-end / you template / upload / file_entry" in order to cut the file name which is displayed by this line:

<span class="file_name" style="white-space:nowrap"><?php echo $this->params->file_name; ?></span><br/>
Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 118
  • Thank you received: 3
11 years 7 months ago #140934

Thanks Jerome, I'll go check it out.

Alan

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

  • Posts: 118
  • Thank you received: 3
11 years 7 months ago #140940

Might need some more help with this. I altered the line of code to add the "overflow:hidden" attribute but it doesn't seem to change it:
<span class="file_name" style="white-space:nowrap; overflow:hidden;"><?php echo $this->params->file_name; ?>

Should this have worked?
Thanks
Alan

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

  • Posts: 26266
  • Thank you received: 4044
  • MODERATOR
11 years 7 months ago #140947

Hi,

The span won't overflow because his width his the width of his content.
You should use some other CSS rules, like the max-width.
But the best should still be the modification of the content by the PHP.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 118
  • Thank you received: 3
11 years 7 months ago #140951

Hi, I've just tried various methods in that view and nothing seems to make any difference.
I also tried placing
.file_name into the main HS custom CSS file setting the max width and it made no difference.

Where else can I alter it?
Thanks
Alan

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

  • Posts: 26266
  • Thank you received: 4044
  • MODERATOR
11 years 7 months ago #141001

Hi,

Maybe something like :

<span class="file_name" style="white-space:nowrap;text-overflow: ellipsis;width:55px"><?php echo $this->params->file_name; ?></span><br/>
where you can change the width in order to feet to your design.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 73
  • Thank you received: 2
11 years 7 months ago #141478

I'm having problems having the Ajax file upload field to appear even though I have enabled and assigned to right category as an item custom field. Please advise on what I need to do to correct this.

And the field name has underscores in it rather than normal field type name like "ajax upload"

See attached. Thanks

Attachments:

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

  • Posts: 73
  • Thank you received: 2
11 years 7 months ago #141484

Never mind, found the solution on another thread. Missing CSS code.

The following user(s) said Thank You: Jerome

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

Time to create page: 0.076 seconds
Powered by Kunena Forum