mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #4908 from kinglozzer/cms-1307-filelink-field
FIX: Update field IDs for file link (fixes silverstripe/silverstripe-cms#1307)
This commit is contained in:
commit
aac59a85ff
@ -667,12 +667,13 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
|
|||||||
|
|
||||||
resetFileField: function() {
|
resetFileField: function() {
|
||||||
// If there's an attached item, remove it
|
// If there's an attached item, remove it
|
||||||
var fileField = this.find('#file'),
|
var fileField = this.find('.ss-uploadfield[id$="file_Holder"]'),
|
||||||
fileUpload = fileField.data('fileupload'),
|
fileUpload = fileField.data('fileupload'),
|
||||||
currentItem = fileField.find('.ss-uploadfield-item[data-fileid]');
|
currentItem = fileField.find('.ss-uploadfield-item[data-fileid]');
|
||||||
|
|
||||||
if(currentItem.length) {
|
if(currentItem.length) {
|
||||||
fileUpload._trigger('destroy', null, {content: currentItem});
|
fileUpload._trigger('destroy', null, {context: currentItem});
|
||||||
|
fileField.find('.ss-uploadfield-addfile').removeClass('borderTop');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user