mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
BUGFIX: fixing bug with the delete button in the grid field detail view
This commit is contained in:
parent
e4a44222b5
commit
6ebb212af0
@ -390,8 +390,8 @@ class DMSDocument extends DataObject implements DMSDocumentInterface {
|
|||||||
if (file_exists($storageFolder)) {
|
if (file_exists($storageFolder)) {
|
||||||
if ($handle = opendir($storageFolder)) { //Open directory
|
if ($handle = opendir($storageFolder)) { //Open directory
|
||||||
//List files in the directory
|
//List files in the directory
|
||||||
while (false !== ($entry = readdir($handle))) {
|
while (false !== ($entry = readdir($handle))) { //only delete if filename starts the the relevant ID
|
||||||
if(strpos($entry,$this->ID.'~') !== false) $filesToDelete[] = $entry;
|
if(strpos($entry,$this->ID.'~') === 0) $filesToDelete[] = $entry;
|
||||||
}
|
}
|
||||||
closedir($handle);
|
closedir($handle);
|
||||||
|
|
||||||
|
@ -76,10 +76,6 @@
|
|||||||
//do an initial show of the entire panel
|
//do an initial show of the entire panel
|
||||||
this.show();
|
this.show();
|
||||||
|
|
||||||
//move the delete button into the panel
|
|
||||||
$('#Actions ul').append('<li class="delete-button-appended"></li>');
|
|
||||||
$('.delete-button-appended').append($('#Form_ItemEditForm_action_doDelete'));
|
|
||||||
|
|
||||||
//add some extra classes to the replace field containers to make it work with drag and drop uploading
|
//add some extra classes to the replace field containers to make it work with drag and drop uploading
|
||||||
this.find('.replace').closest('div.fieldgroup-field').addClass('ss-upload').addClass('ss-uploadfield');
|
this.find('.replace').closest('div.fieldgroup-field').addClass('ss-upload').addClass('ss-uploadfield');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user