Improved error handling of upload feature.
This commit is contained in:
parent
943d015ae9
commit
7a0e95014c
1 changed files with 19 additions and 17 deletions
|
@ -664,23 +664,25 @@ class App.ControllerForm extends App.Controller
|
||||||
|
|
||||||
# add file uploader
|
# add file uploader
|
||||||
u = =>
|
u = =>
|
||||||
@el.find('#' + fileUploaderId ).fineUploader(
|
# only add upload item if html element exists
|
||||||
request:
|
if @el.find('#' + fileUploaderId )[0]
|
||||||
endpoint: App.Config.get('api_path') + '/ticket_attachment_new'
|
@el.find('#' + fileUploaderId ).fineUploader(
|
||||||
params:
|
request:
|
||||||
form_id: @form_id
|
endpoint: App.Config.get('api_path') + '/ticket_attachment_new'
|
||||||
text:
|
params:
|
||||||
uploadButton: '<i class="glyphicon glyphicon-paperclip"></i>'
|
form_id: @form_id
|
||||||
template: '<div class="qq-uploader">' +
|
text:
|
||||||
'<pre class="btn qq-upload-icon qq-upload-drop-area"><span>{dragZoneText}</span></pre>' +
|
uploadButton: '<i class="glyphicon glyphicon-paperclip"></i>'
|
||||||
'<div class="btn btn-default qq-upload-icon2 qq-upload-button pull-right" style="">{uploadButtonText}</div>' +
|
template: '<div class="qq-uploader">' +
|
||||||
'<ul class="qq-upload-list span5" style="margin-top: 10px;"></ul>' +
|
'<pre class="btn qq-upload-icon qq-upload-drop-area"><span>{dragZoneText}</span></pre>' +
|
||||||
'</div>',
|
'<div class="btn btn-default qq-upload-icon2 qq-upload-button pull-right" style="">{uploadButtonText}</div>' +
|
||||||
classes:
|
'<ul class="qq-upload-list span5" style="margin-top: 10px;"></ul>' +
|
||||||
success: ''
|
'</div>',
|
||||||
fail: ''
|
classes:
|
||||||
debug: false
|
success: ''
|
||||||
)
|
fail: ''
|
||||||
|
debug: false
|
||||||
|
)
|
||||||
App.Delay.set( u, 100, undefined, 'form_upload' )
|
App.Delay.set( u, 100, undefined, 'form_upload' )
|
||||||
|
|
||||||
# article
|
# article
|
||||||
|
|
Loading…
Reference in a new issue