Changed file dropper to autodetect "allowmultiple"
This commit is contained in:
parent
12b43b1bb8
commit
23f5100cf8
2 changed files with 2 additions and 2 deletions
|
@ -3,11 +3,11 @@ App.Controls = App.Controls || {};
|
|||
|
||||
App.Controls.FileDropper = function(
|
||||
$fileInput,
|
||||
allowMultiple,
|
||||
onChange,
|
||||
jQuery) {
|
||||
|
||||
var $dropDiv = jQuery('<div class="file-handler"></div>');
|
||||
var allowMultiple = $fileInput.attr('multiple');
|
||||
$dropDiv.html((allowMultiple ? 'Drop files here!' : 'Drop file here!') + '<br/>Or just click on this box.');
|
||||
$dropDiv.insertBefore($fileInput);
|
||||
$fileInput.attr('multiple', allowMultiple);
|
||||
|
|
|
@ -52,7 +52,7 @@ App.Presenters.UserAccountSettingsPresenter = function(
|
|||
$el.find('form').submit(accountSettingsFormSubmitted);
|
||||
$el.find('form [name=avatar-style]').change(avatarStyleChanged);
|
||||
avatarStyleChanged();
|
||||
new App.Controls.FileDropper($el.find('[name=avatar-content]'), false, avatarContentChanged, jQuery);
|
||||
new App.Controls.FileDropper($el.find('[name=avatar-content]'), avatarContentChanged, jQuery);
|
||||
}
|
||||
|
||||
function getPrivileges() {
|
||||
|
|
Loading…
Reference in a new issue