mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
Merge remote-tracking branch 'prototech/ticket/12124' into develop
This commit is contained in:
commit
fecca29328
1 changed files with 20 additions and 15 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],
|
// Initialize the Plupload uploader.
|
||||||
phpbb.plupload.rowTpl = $('#attach-row-tpl')[0].outerHTML;
|
uploader.init();
|
||||||
|
|
||||||
// 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.
|
// Set attachment data.
|
||||||
phpbb.plupload.setData(phpbb.plupload.data);
|
phpbb.plupload.setData(phpbb.plupload.data);
|
||||||
phpbb.plupload.updateMultipartParams(phpbb.plupload.getSerializedData());
|
phpbb.plupload.updateMultipartParams(phpbb.plupload.getSerializedData());
|
||||||
|
|
||||||
// Initialize the Plupload uploader.
|
// Only execute if Plupload initialized successfully.
|
||||||
uploader.init();
|
uploader.bind('Init', function() {
|
||||||
|
phpbb.plupload.form = $(phpbb.plupload.config.form_hook)[0],
|
||||||
|
phpbb.plupload.rowTpl = $('#attach-row-tpl')[0].outerHTML;
|
||||||
|
|
||||||
// Point out the drag-and-drop zone if it's supported.
|
// Hide the basic upload panel and remove the attach row template.
|
||||||
if (!uploader.features.dragdrop) {
|
$('#attach-row-tpl, #attach-panel-basic').remove();
|
||||||
$('#drag-n-drop-message').show();
|
// Show multi-file upload options.
|
||||||
}
|
$('#attach-panel-multi').show();
|
||||||
|
});
|
||||||
|
|
||||||
|
uploader.bind('PostInit', function() {
|
||||||
|
// Point out the drag-and-drop zone if it's supported.
|
||||||
|
if (uploader.features.dragdrop) {
|
||||||
|
$('#drag-n-drop-message').show();
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -92,7 +97,7 @@ phpbb.plupload.getSerializedData = function() {
|
||||||
* @return int Returns the index of the file if it exists.
|
* @return int Returns the index of the file if it exists.
|
||||||
*/
|
*/
|
||||||
phpbb.plupload.getIndex = function(attach_id) {
|
phpbb.plupload.getIndex = function(attach_id) {
|
||||||
var index = phpbb.plupload.ids.indexOf(Number(attach_id));
|
var index = $.inArray(Number(attach_id), phpbb.plupload.ids);
|
||||||
return (index !== -1) ? index : false;
|
return (index !== -1) ? index : false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -308,7 +313,7 @@ phpbb.plupload.hideEmptyList = function() {
|
||||||
* @return undefined
|
* @return undefined
|
||||||
*/
|
*/
|
||||||
phpbb.plupload.updateBbcode = function(action, index) {
|
phpbb.plupload.updateBbcode = function(action, index) {
|
||||||
var textarea = $(phpbb.plupload.form).find('textarea[name="message"]'),
|
var textarea = $('#message', phpbb.plupload.form),
|
||||||
text = textarea.val(),
|
text = textarea.val(),
|
||||||
removal = (action === 'removal');
|
removal = (action === 'removal');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue