diff options
Diffstat (limited to 'phpBB/assets/javascript/plupload.js')
-rw-r--r-- | phpBB/assets/javascript/plupload.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/phpBB/assets/javascript/plupload.js b/phpBB/assets/javascript/plupload.js index 3e450e9bab..f84a8b0a56 100644 --- a/phpBB/assets/javascript/plupload.js +++ b/phpBB/assets/javascript/plupload.js @@ -218,7 +218,6 @@ phpbb.plupload.updateRow = function(index, downloadUrl) { } row.find('textarea').attr('name', 'comment_list[' + index + ']'); - row.find('.file-inline-bbcode').attr('onclick', 'attach_inline(' + index + ',\'' + attach.real_filename + '\');'); phpbb.plupload.updateHiddenData(row, attach, index); }; @@ -489,6 +488,17 @@ phpbb.plupload.initialize(); /** + * Insert inline attachment bbcode. + */ + $('#file-list').on('click', '.file-inline-bbcode', function(e) { + var attachId = $(this).parents('.attach-row').attr('data-attach-id'), + index = phpbb.plupload.getIndex(attachId); + + attach_inline(index, phpbb.plupload.data[index].real_filename); + e.preventDefault(); +}); + +/** * Delete a file. */ $('#file-list').on('click', '.file-delete', function(e) { |