mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-08-28 13:36:12 +02:00
33 lines
829 B
JavaScript
33 lines
829 B
JavaScript
(function($) {
|
|
$('.ss-assetuploadfield').entwine({
|
|
onmatch: function() {
|
|
this._super();
|
|
|
|
// Hide the "second step" part until we're actually uploading
|
|
this.find('.ss-uploadfield-editandorganize').hide();
|
|
},
|
|
onunmatch: function() {
|
|
this._super();
|
|
},
|
|
onfileuploadadd: function(e) {
|
|
this.find('.ss-uploadfield-editandorganize').show();
|
|
},
|
|
onfileuploadstart: function(e) {
|
|
this.find('.ss-uploadfield-editandorganize').show();
|
|
}
|
|
});
|
|
$('.ss-uploadfield-view-allowed-extensions').entwine({
|
|
onmatch: function() {
|
|
this.find('.description .toggle-content').hide();
|
|
this._super();
|
|
}
|
|
});
|
|
|
|
$('.ss-uploadfield-view-allowed-extensions .toggle').entwine({
|
|
onclick: function(e) {
|
|
jQuery(this).closest('.description').find('.toggle-content').toggle();
|
|
return false;
|
|
}
|
|
});
|
|
}(jQuery));
|