This is a migrated thread and some comments may be shown as answers.

Is there a way to change the default "Select..." text on the button?

4 Answers 1130 Views
Upload
This is a migrated thread and some comments may be shown as answers.
ray
Top achievements
Rank 1
ray asked on 27 Apr 2012, 12:56 AM
Is there a way to change the default "Select..." text on the button?  Thanks.

4 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 27 Apr 2012, 12:52 PM
Hi Ray,

You can execute the following statement after initialization of the widget:

$("#files").closest(".k-upload").find("span").text("my text");

#files is the ID of the initial <input> element.

Kind regards,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
ray
Top achievements
Rank 1
answered on 29 Apr 2012, 04:09 PM
Thank you Dimo, it worked!  But after I applied my text "+ Upload Image" like below 
$("#files").closest(".k-upload").find("span").text("+ Upload Image");

the button becomes big with the text "+ Upload" on one line and " Image" squeezed to a 2nd line, so is there a way to update the css of this button to make the width longer and the font smaller so all the text could fit on 1 line.  
Like this, but it didn't work,

$("#files").closest(".k-upload").find("span").css("width", "200px");

or 
$("#files").closest(".k-upload").find("span").css("font-size", "9px");


Thanks a lot!
Ray.
0
Dimo
Telerik team
answered on 01 May 2012, 08:19 AM
Hi Ray,

The width of the select button is determined by the following CSS rule:

.k-upload-button
{
      width: 86px;
}

.k-upload-button is a CSS class of the parent <div> element of the <span> that you are already familar with. You can either set an inline width with Javascript or override the CSS rule.

Regards,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Gedalias
Top achievements
Rank 1
answered on 26 Aug 2012, 03:19 AM
 $("#files").parent().css({width:160})
Tags
Upload
Asked by
ray
Top achievements
Rank 1
Answers by
Dimo
Telerik team
ray
Top achievements
Rank 1
Gedalias
Top achievements
Rank 1
Share this question
or