root / drupal7 / sites / all / modules / media / js / plugins / media.upload_multiple.js @ 74f6bef0
1 |
Drupal.behaviors.mediaUploadMultiple = {}; |
---|---|
2 |
|
3 |
Drupal.behaviors.mediaUploadMultiple.attach = function (context, settings) { |
4 |
// When the plupload element initializes, it expands the size of the elements
|
5 |
// it has created, so we need to resize the browser iframe after it's done.
|
6 |
var uploader = jQuery('#edit-upload').pluploadQueue(); |
7 |
if (uploader) {
|
8 |
// Handle the case in which the uploader has already finished initializing.
|
9 |
Drupal.media.browser.resizeIframe(); |
10 |
// Handle the case in which the uploader has not yet initialized.
|
11 |
uploader.bind("PostInit", Drupal.media.browser.resizeIframe);
|
12 |
|
13 |
uploader.bind('StateChanged', Drupal.behaviors.mediaUploadMultiple.submit);
|
14 |
} |
15 |
}; |
16 |
|
17 |
Drupal.behaviors.mediaUploadMultiple.submit = function (uploader, file) { |
18 |
if (uploader.state == 2) { |
19 |
jQuery('#media-add-upload-multiple .form-submit').val(Drupal.t('Loading...')); |
20 |
} |
21 |
}; |