- Posts: 118
- Thank you received: 3
Ajax File upload
12 years 8 months ago #140637
by ahcopyart
Ajax File upload was created by ahcopyart
-- 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
-- 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.
12 years 8 months ago #140647
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Ajax File upload
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,
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.
Please Log in or Create an account to join the conversation.
12 years 8 months ago #140739
by ahcopyart
Replied by ahcopyart on topic Ajax File upload
Sure, here it is.
Thanks
Alan
Thanks
Alan
Please Log in or Create an account to join the conversation.
12 years 8 months ago #140803
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Ajax File upload
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:
Regards,
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:
Code:
<span class="file_name" style="white-space:nowrap"><?php echo $this->params->file_name; ?></span><br/>
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
12 years 8 months ago #140934
by ahcopyart
Replied by ahcopyart on topic Ajax File upload
Thanks Jerome, I'll go check it out.
Alan
Alan
Please Log in or Create an account to join the conversation.
12 years 8 months ago #140940
by ahcopyart
Replied by ahcopyart on topic Ajax File upload
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
<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.
12 years 8 months ago #140947
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Ajax File upload
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,
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.
Please Log in or Create an account to join the conversation.
12 years 8 months ago #140951
by ahcopyart
Replied by ahcopyart on topic Ajax File upload
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
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.
12 years 8 months ago #141001
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Ajax File upload
Hi,
Maybe something like :
where you can change the width in order to feet to your design.
Regards,
Maybe something like :
Code:
<span class="file_name" style="white-space:nowrap;text-overflow: ellipsis;width:55px"><?php echo $this->params->file_name; ?></span><br/>
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
12 years 8 months ago #141478
by aheng5
Replied by aheng5 on topic Ajax File upload
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
And the field name has underscores in it rather than normal field type name like "ajax upload"
See attached. Thanks
Please Log in or Create an account to join the conversation.
12 years 8 months ago #141484
by aheng5
Replied by aheng5 on topic Ajax File upload
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.264 seconds