Fixed file uploading in new ticket.
This commit is contained in:
parent
35235b7653
commit
c66c61404b
2 changed files with 10 additions and 1 deletions
|
@ -13,7 +13,7 @@ class App.UiElement.richtext
|
|||
renderAttachment = (file) =>
|
||||
item.find('.attachments').append( App.view('generic/attachment_item')(
|
||||
fileName: file.filename
|
||||
fileSize: @humanFileSize( file.size )
|
||||
fileSize: App.Utils.humanFileSize( file.size )
|
||||
store_id: file.store_id
|
||||
))
|
||||
item.on(
|
||||
|
@ -82,7 +82,12 @@ class App.UiElement.richtext
|
|||
@attachmentPlaceholder.removeClass('hide')
|
||||
@attachmentUpload.addClass('hide')
|
||||
|
||||
# reset progress bar
|
||||
@progressBar.width(parseInt(0) + '%')
|
||||
@progressText.text('')
|
||||
|
||||
renderAttachment(response.data)
|
||||
|
||||
console.log('upload complete', response.data )
|
||||
|
||||
# Called during upload progress, first parameter
|
||||
|
|
|
@ -196,6 +196,10 @@ class App.TicketZoomArticleNew extends App.Controller
|
|||
@attachmentPlaceholder.removeClass('hide')
|
||||
@attachmentUpload.addClass('hide')
|
||||
|
||||
# reset progress bar
|
||||
@progressBar.width(parseInt(0) + '%')
|
||||
@progressText.text('')
|
||||
|
||||
@renderAttachment(response.data)
|
||||
console.log('upload complete', response.data )
|
||||
|
||||
|
|
Loading…
Reference in a new issue