mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 06:55:46 +01:00
Composer: Remove unused variables
This commit is contained in:
@@ -188,18 +188,17 @@ define(['taskbar'], function(taskbar) {
|
|||||||
var draggingDocument = false;
|
var draggingDocument = false;
|
||||||
|
|
||||||
var postContainer = $('#cmp-uuid-' + post_uuid),
|
var postContainer = $('#cmp-uuid-' + post_uuid),
|
||||||
fileForm = postContainer.find('#fileForm'),
|
|
||||||
drop = postContainer.find('.imagedrop'),
|
drop = postContainer.find('.imagedrop'),
|
||||||
tabContent = postContainer.find('.tab-content'),
|
tabContent = postContainer.find('.tab-content'),
|
||||||
textarea = postContainer.find('textarea');
|
textarea = postContainer.find('textarea');
|
||||||
|
|
||||||
$(document).off('dragstart').on('dragstart', function(e) {
|
$(document).off('dragstart').on('dragstart', function() {
|
||||||
draggingDocument = true;
|
draggingDocument = true;
|
||||||
}).off('dragend').on('dragend', function(e) {
|
}).off('dragend').on('dragend', function() {
|
||||||
draggingDocument = false;
|
draggingDocument = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
textarea.on('dragenter', function(e) {
|
textarea.on('dragenter', function() {
|
||||||
if(draggingDocument) {
|
if(draggingDocument) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -208,7 +207,7 @@ define(['taskbar'], function(taskbar) {
|
|||||||
drop.css('line-height', textarea.height() + 'px');
|
drop.css('line-height', textarea.height() + 'px');
|
||||||
drop.show();
|
drop.show();
|
||||||
|
|
||||||
drop.on('dragleave', function(ev) {
|
drop.on('dragleave', function() {
|
||||||
drop.hide();
|
drop.hide();
|
||||||
drop.off('dragleave');
|
drop.off('dragleave');
|
||||||
});
|
});
|
||||||
@@ -235,7 +234,6 @@ define(['taskbar'], function(taskbar) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// fileForm[0].reset();
|
|
||||||
uploadContentFiles({
|
uploadContentFiles({
|
||||||
files: files,
|
files: files,
|
||||||
post_uuid: post_uuid,
|
post_uuid: post_uuid,
|
||||||
@@ -264,7 +262,6 @@ define(['taskbar'], function(taskbar) {
|
|||||||
fd.append('files[]', blob, blob.name);
|
fd.append('files[]', blob, blob.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// fileForm[0].reset();
|
|
||||||
uploadContentFiles({
|
uploadContentFiles({
|
||||||
files: [blob],
|
files: [blob],
|
||||||
post_uuid: post_uuid,
|
post_uuid: post_uuid,
|
||||||
@@ -576,7 +573,7 @@ define(['taskbar'], function(taskbar) {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
postContainer.on('paste change keypress', 'input#topic-thumb-url', function(e) {
|
postContainer.on('paste change keypress', 'input#topic-thumb-url', function() {
|
||||||
var urlEl = $(this);
|
var urlEl = $(this);
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
var url = urlEl.val();
|
var url = urlEl.val();
|
||||||
@@ -619,7 +616,6 @@ define(['taskbar'], function(taskbar) {
|
|||||||
postContainer.on('click', '.formatting-bar span', function() {
|
postContainer.on('click', '.formatting-bar span', function() {
|
||||||
var postContentEl = postContainer.find('textarea'),
|
var postContentEl = postContainer.find('textarea'),
|
||||||
iconClass = $(this).find('i').attr('class'),
|
iconClass = $(this).find('i').attr('class'),
|
||||||
cursorEnd = postContentEl.val().length,
|
|
||||||
selectionStart = postContentEl[0].selectionStart,
|
selectionStart = postContentEl[0].selectionStart,
|
||||||
selectionEnd = postContentEl[0].selectionEnd,
|
selectionEnd = postContentEl[0].selectionEnd,
|
||||||
selectionLength = selectionEnd - selectionStart,
|
selectionLength = selectionEnd - selectionStart,
|
||||||
|
|||||||
Reference in New Issue
Block a user