mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
[ticket/12124] Revert to basic uploader if the html5 runtime is not supported.
PHPBB3-12124
This commit is contained in:
parent
4c102322c1
commit
a8a349670a
1 changed files with 21 additions and 16 deletions
|
@ -11,25 +11,30 @@ phpbb.plupload.ids = [];
|
||||||
* @return undefined
|
* @return undefined
|
||||||
*/
|
*/
|
||||||
phpbb.plupload.initialize = function() {
|
phpbb.plupload.initialize = function() {
|
||||||
phpbb.plupload.form = $(phpbb.plupload.config.form_hook)[0],
|
|
||||||
phpbb.plupload.rowTpl = $('#attach-row-tpl')[0].outerHTML;
|
|
||||||
|
|
||||||
// Hide the basic upload panel and remove the attach row template.
|
|
||||||
$('#attach-row-tpl, #attach-panel-basic').remove();
|
|
||||||
// Show multi-file upload options.
|
|
||||||
$('#attach-panel-multi').show();
|
|
||||||
|
|
||||||
// Set attachment data.
|
|
||||||
phpbb.plupload.setData(phpbb.plupload.data);
|
|
||||||
phpbb.plupload.updateMultipartParams(phpbb.plupload.getSerializedData());
|
|
||||||
|
|
||||||
// Initialize the Plupload uploader.
|
// Initialize the Plupload uploader.
|
||||||
uploader.init();
|
uploader.init();
|
||||||
|
|
||||||
// Point out the drag-and-drop zone if it's supported.
|
// Only execute if Plupload initialized successfully.
|
||||||
if (!uploader.features.dragdrop) {
|
uploader.bind('Init', function() {
|
||||||
$('#drag-n-drop-message').show();
|
phpbb.plupload.form = $(phpbb.plupload.config.form_hook)[0],
|
||||||
}
|
phpbb.plupload.rowTpl = $('#attach-row-tpl')[0].outerHTML;
|
||||||
|
|
||||||
|
// Hide the basic upload panel and remove the attach row template.
|
||||||
|
$('#attach-row-tpl, #attach-panel-basic').remove();
|
||||||
|
// Show multi-file upload options.
|
||||||
|
$('#attach-panel-multi').show();
|
||||||
|
|
||||||
|
// Set attachment data.
|
||||||
|
phpbb.plupload.setData(phpbb.plupload.data);
|
||||||
|
phpbb.plupload.updateMultipartParams(phpbb.plupload.getSerializedData());
|
||||||
|
});
|
||||||
|
|
||||||
|
uploader.bind('PostInit', function() {
|
||||||
|
// Point out the drag-and-drop zone if it's supported.
|
||||||
|
if (!!uploader.features.dragdrop) {
|
||||||
|
$('#drag-n-drop-message').show();
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue