| Page 1 of 1 | [ 3 posts ] |
|
Hi,
First time poster here. I have been playing around with Uploader version 3.5.1. The Select Files button shows a completely different font from the rest of my pages (I set the font at body level). Can I change the font that the widget uses? I've also tried to use the selectFilesButton attribute to change the button used, but the documentation is not clear what the value of the attribute should be. I've tried a view different options, but every time I end up with a button that does not pop up the dialog. Any tips appreciated. Ideally I would like to Select Files button to look exactly (also in size, margins etc) like my form submit buttons which are really just yui3-buttons: <input type="submit" class="yui3-button" value="Submit"/> Many thanks, Nes |
Allen RabinovichYUI Developer
|
Hi Nes,
The style of the "Select Files" button is determined by the static property on the Uploader, Uploader.SELECT_FILES_BUTTON -- that's the HTML string, whose default value is Code: <button type='button' class='yui3-button' tabindex='-1'>{selectButtonLabel}</button> .The {selectButtonLabel} token gets replaced by the default valueFn of the selectFilesButton attribute, which requires an instance of Node. You can either modify the static template before rendering the Uploader (e.g. Y.Uploader.SELECT_FILES_BUTTON = "some html string, possibly with the {selectButtonlabel} token";), or override the value of the selectFilesButton attribute altogether with a completely different node instance. For example, when creating a new instance of Uploader, you could do: Code: var myuploader = new Y.Uploader({multipleFiles: true, .... /*other config attrs*/, selectFilesButton: Y.Node.create("<button class='yui3-button'>Choose Files</button>")}); |
|
Many thanks, that worked like a charm!
|
| Page 1 of 1 | [ 3 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group