mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-15 14:16:28 +02:00
[ticket/11915] Replace inline onclick event for inserting attachment bbcodes.
PHPBB3-11915
This commit is contained in:
@ -218,7 +218,6 @@ phpbb.plupload.updateRow = function(index, downloadUrl) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
row.find('textarea').attr('name', 'comment_list[' + index + ']');
|
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);
|
phpbb.plupload.updateHiddenData(row, attach, index);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -488,6 +487,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.
|
* Delete a file.
|
||||||
*/
|
*/
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
<td class="attach-name">
|
<td class="attach-name">
|
||||||
<span class="file-name"><a href="{attach_row.U_VIEW_ATTACHMENT}">{attach_row.FILENAME}</a></span>
|
<span class="file-name"><a href="{attach_row.U_VIEW_ATTACHMENT}">{attach_row.FILENAME}</a></span>
|
||||||
<span class="attach-controls">
|
<span class="attach-controls">
|
||||||
<!-- IF S_INLINE_ATTACHMENT_OPTIONS --><input type="button" value="{L_PLACE_INLINE}" onclick="attach_inline({attach_row.ASSOC_INDEX}, '{attach_row.A_FILENAME}');" class="button2 file-inline-bbcode" /> <!-- ENDIF -->
|
<!-- IF S_INLINE_ATTACHMENT_OPTIONS --><input type="button" value="{L_PLACE_INLINE}" class="button2 file-inline-bbcode" /> <!-- ENDIF -->
|
||||||
<input type="submit" name="delete_file[{attach_row.ASSOC_INDEX}]" value="{L_DELETE_FILE}" class="button2 file-delete" />
|
<input type="submit" name="delete_file[{attach_row.ASSOC_INDEX}]" value="{L_DELETE_FILE}" class="button2 file-delete" />
|
||||||
</span>
|
</span>
|
||||||
<span class="clear"></span>
|
<span class="clear"></span>
|
||||||
|
Reference in New Issue
Block a user