Reset attachment when clicking new paste
This commit is contained in:
parent
fc1be18cbe
commit
5ece4d2632
1 changed files with 34 additions and 22 deletions
|
@ -3695,9 +3695,7 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||
// in any case, remove saved attachment data
|
||||
AttachmentViewer.removeAttachmentData();
|
||||
|
||||
// hide UI for selected files
|
||||
// our up-to-date jQuery can handle it :)
|
||||
$fileWrap.find('input').val('');
|
||||
me.clearAttachmentInput();
|
||||
AttachmentViewer.clearDragAndDrop();
|
||||
|
||||
// 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
|
||||
*
|
||||
|
@ -5133,6 +5144,7 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||
Editor.show();
|
||||
Editor.focusInput();
|
||||
AttachmentViewer.removeAttachment();
|
||||
TopNav.clearAttachmentInput();
|
||||
|
||||
TopNav.showCreateButtons();
|
||||
|
||||
|
|
Loading…
Reference in a new issue