No more clear error btn

This commit is contained in:
Thierry François 2018-02-27 14:43:29 +02:00
parent c1c0826718
commit ce6b703240
4 changed files with 1 additions and 45 deletions

View File

@ -78,8 +78,7 @@
refresh: function(total, done, error)
{
var $info = this.find('.colymba-bulkupload-info'),
$finishBtn = this.find('.bulkUploadFinishButton'),
$clearErrorBtn = this.find('.bulkUploadClearErrorButton')
$finishBtn = this.find('.bulkUploadFinishButton')
;
if ( total > 0 )
@ -107,14 +106,6 @@
$finishBtn.removeClass('ui-state-disabled ssui-button-disabled').attr('aria-disabled', 'false').removeAttr('disabled');
}
//toggle clear error button
if ( error > 0 )
{
$clearErrorBtn.removeClass('ui-state-disabled ssui-button-disabled').attr('aria-disabled', 'false').removeAttr('disabled');
}
else{
$clearErrorBtn.addClass('ui-state-disabled ssui-button-disabled').attr('aria-disabled', 'true').attr('disabled', 'true');
}
}
else{
//if not uploading, reset + hide
@ -126,27 +117,6 @@
});
/**
* Clears all updloads with warning or error
*/
$('.bulkUploadClearErrorButton:not(.ui-state-disabled)').entwine({
onmatch: function(){
this.removeClass('action');
},
onunmatch: function(){},
onclick: function(e)
{
var $bulkUpload = this.parents('.bulkUpload'),
$errors = $bulkUpload.find('li.ss-uploadfield-item .ui-state-warning-text,li.ss-uploadfield-item .ui-state-error-text').parents('li')
;
$($errors.get().reverse()).each(function(index, Element){
$(this).remove();
});
}
});
/**
* Clear all the warning/error/finished uploads
*/

View File

@ -265,13 +265,6 @@
padding: 0;
}
}
&.bulkUploadEditButton,
&.bulkUploadClearErrorButton
{
float: right;
margin: 0 0 0 6px;
}
}// button
.colymba-bulkupload-info

View File

@ -376,17 +376,11 @@ class BulkUploader implements GridField_HTMLProvider, GridField_URLHandler
->setAttribute('data-icon', 'accept')
->setUseButtonTag(true);
$clearErrorButton = FormAction::create('ClearError', _t('GRIDFIELD_BULK_UPLOAD.CLEAR_ERROR_BTN_LABEL', 'Clear errors'))
->addExtraClass('bulkUploadClearErrorButton')
->setAttribute('data-icon', 'arrow-circle-double')
->setUseButtonTag(true);
// get uploadField
$uploadField = $this->bulkUploadField($gridField);
$data = ArrayData::create(array(
'Finish' => $finishButton,
'ClearErrors' => $clearErrorButton,
'Colspan' => (count($gridField->getColumns())),
'UploadField' => $uploadField->Field() // call ->Field() to get requirements in right order
));

View File

@ -2,6 +2,5 @@
<th class="" colspan="$Colspan">
$UploadField
$Finish
$ClearErrors
</th>
</tr>