Reset attachment when clicking new paste
This commit is contained in:
parent
fc1be18cbe
commit
5ece4d2632
@ -3695,9 +3695,7 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||||||
// in any case, remove saved attachment data
|
// in any case, remove saved attachment data
|
||||||
AttachmentViewer.removeAttachmentData();
|
AttachmentViewer.removeAttachmentData();
|
||||||
|
|
||||||
// hide UI for selected files
|
me.clearAttachmentInput();
|
||||||
// our up-to-date jQuery can handle it :)
|
|
||||||
$fileWrap.find('input').val('');
|
|
||||||
AttachmentViewer.clearDragAndDrop();
|
AttachmentViewer.clearDragAndDrop();
|
||||||
|
|
||||||
// pevent '#' from appearing in the URL
|
// pevent '#' from appearing in the URL
|
||||||
@ -4112,6 +4110,19 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear the attachment input in the top navigation.
|
||||||
|
*
|
||||||
|
* @name TopNav.clearAttachmentInput
|
||||||
|
* @function
|
||||||
|
*/
|
||||||
|
me.clearAttachmentInput = function()
|
||||||
|
{
|
||||||
|
// hide UI for selected files
|
||||||
|
// our up-to-date jQuery can handle it :)
|
||||||
|
$fileWrap.find('input').val('');
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the currently set expiration time
|
* returns the currently set expiration time
|
||||||
*
|
*
|
||||||
@ -5133,6 +5144,7 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||||||
Editor.show();
|
Editor.show();
|
||||||
Editor.focusInput();
|
Editor.focusInput();
|
||||||
AttachmentViewer.removeAttachment();
|
AttachmentViewer.removeAttachment();
|
||||||
|
TopNav.clearAttachmentInput();
|
||||||
|
|
||||||
TopNav.showCreateButtons();
|
TopNav.showCreateButtons();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user