1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-31 05:37:59 +01:00

[ticket/12124] Revert to basic uploader if the html5 runtime is not supported.

PHPBB3-12124
This commit is contained in:
Cesar G 2014-01-24 04:37:29 -08:00
parent 4c102322c1
commit a8a349670a

View File

@ -11,25 +11,30 @@ phpbb.plupload.ids = [];
* @return undefined
*/
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.
uploader.init();
// Point out the drag-and-drop zone if it's supported.
if (!uploader.features.dragdrop) {
$('#drag-n-drop-message').show();
}
// Only execute if Plupload initialized successfully.
uploader.bind('Init', 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());
});
uploader.bind('PostInit', function() {
// Point out the drag-and-drop zone if it's supported.
if (!!uploader.features.dragdrop) {
$('#drag-n-drop-message').show();
}
});
};
/**