BUGFIX: fixing bug with the delete button in the grid field detail view

This commit is contained in:
Julian Seidenberg 2012-11-21 17:15:23 +13:00
parent e4a44222b5
commit 6ebb212af0
2 changed files with 2 additions and 6 deletions

View File

@ -390,8 +390,8 @@ class DMSDocument extends DataObject implements DMSDocumentInterface {
if (file_exists($storageFolder)) {
if ($handle = opendir($storageFolder)) { //Open directory
//List files in the directory
while (false !== ($entry = readdir($handle))) {
if(strpos($entry,$this->ID.'~') !== false) $filesToDelete[] = $entry;
while (false !== ($entry = readdir($handle))) { //only delete if filename starts the the relevant ID
if(strpos($entry,$this->ID.'~') === 0) $filesToDelete[] = $entry;
}
closedir($handle);

View File

@ -76,10 +76,6 @@
//do an initial show of the entire panel
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
this.find('.replace').closest('div.fieldgroup-field').addClass('ss-upload').addClass('ss-uploadfield');