mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-25 20:44:01 +01:00
[ticket/12542] Rename javascript method and add doc block
PHPBB3-12542
This commit is contained in:
parent
ae8129b699
commit
c018b3bbc7
@ -1232,7 +1232,19 @@ phpbb.applyCodeEditor = function(textarea) {
|
||||
});
|
||||
};
|
||||
|
||||
phpbb.applyDragNDrop = function(textarea) {
|
||||
/**
|
||||
* Show drag and drop animation when textarea is present
|
||||
*
|
||||
* This function will enable the drag and drop animation for a specified
|
||||
* textarea.
|
||||
*
|
||||
* @param {object} textarea Textarea DOM object to apply editor to
|
||||
*/
|
||||
phpbb.showDragNDrop = function(textarea) {
|
||||
if (textarea === 'undefined') {
|
||||
return;
|
||||
}
|
||||
|
||||
$('body').on('dragenter dragover', function () {
|
||||
$(textarea).addClass('drag-n-drop');
|
||||
}).on('dragleave dragout dragend drop', function() {
|
||||
|
@ -355,7 +355,9 @@ function getCaretPosition(txtarea) {
|
||||
textarea = doc.forms[form_name].elements[text_name];
|
||||
|
||||
phpbb.applyCodeEditor(textarea);
|
||||
phpbb.applyDragNDrop(textarea);
|
||||
if ($('#attach-panel').length) {
|
||||
phpbb.showDragNDrop(textarea);
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user