mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixed UploadField JS dependencies
When adding the deps straight into the file (recommended), the onchange handler in file-upload isn't firing properly when a file is uploaded through the <input type=file> button - it falls back to default behaviour, which submits the containing form, failing because the upload is handled by a different URL.
This commit is contained in:
parent
25b511f3d5
commit
701c700d4c
@ -51,7 +51,18 @@ require('../../../../thirdparty/jquery-changetracker/lib/jquery.changetracker.js
|
||||
require('../../../../client/src/legacy/TreeDropdownField.js');
|
||||
|
||||
require('../../../../client/src/legacy/DateField.js');
|
||||
|
||||
|
||||
// TODO Move UploadField.js deps into the file once figuring out why uploads fail then
|
||||
require('../../../../thirdparty/jquery-ui/jquery-ui.js');
|
||||
require('../../../../admin/client/src/legacy/ssui.core.js');
|
||||
require('imports?define=>false&this=>window!blueimp-load-image/load-image.js');
|
||||
require('blueimp-file-upload/jquery.iframe-transport.js');
|
||||
require('blueimp-file-upload/cors/jquery.xdr-transport.js');
|
||||
require('blueimp-file-upload/jquery.fileupload.js');
|
||||
require('blueimp-file-upload/jquery.fileupload-ui.js');
|
||||
require('../../../../client/src/legacy/UploadField.js');
|
||||
|
||||
require('../../../../client/src/legacy/HtmlEditorField.js');
|
||||
require('../../../../client/src/legacy/TabSet.js');
|
||||
require('../legacy/ssui.core.js');
|
||||
|
@ -1,16 +1,9 @@
|
||||
import $ from 'jQuery';
|
||||
import i18n from 'i18n';
|
||||
|
||||
// entwine also required, but can't be included more than once without error
|
||||
require('../../../thirdparty/jquery-ui/jquery-ui.js');
|
||||
require('../../../admin/client/src/legacy/ssui.core.js');
|
||||
// TODO Move deps from lib.js into the file once figuring out why uploads fail then
|
||||
|
||||
window.tmpl = require('blueimp-tmpl/tmpl.js');
|
||||
require('imports?define=>false&this=>window!blueimp-load-image/load-image.js');
|
||||
require('blueimp-file-upload/jquery.iframe-transport.js');
|
||||
require('blueimp-file-upload/cors/jquery.xdr-transport.js');
|
||||
require('blueimp-file-upload/jquery.fileupload.js');
|
||||
require('blueimp-file-upload/jquery.fileupload-ui.js');
|
||||
|
||||
require('./UploadField_uploadtemplate.js');
|
||||
require('./UploadField_downloadtemplate.js');
|
||||
|
Loading…
Reference in New Issue
Block a user