mirror of
https://github.com/colymba/GridFieldBulkEditingTools.git
synced 2024-10-22 11:05:57 +02:00
No more clear error btn
This commit is contained in:
parent
c1c0826718
commit
ce6b703240
@ -78,8 +78,7 @@
|
|||||||
refresh: function(total, done, error)
|
refresh: function(total, done, error)
|
||||||
{
|
{
|
||||||
var $info = this.find('.colymba-bulkupload-info'),
|
var $info = this.find('.colymba-bulkupload-info'),
|
||||||
$finishBtn = this.find('.bulkUploadFinishButton'),
|
$finishBtn = this.find('.bulkUploadFinishButton')
|
||||||
$clearErrorBtn = this.find('.bulkUploadClearErrorButton')
|
|
||||||
;
|
;
|
||||||
|
|
||||||
if ( total > 0 )
|
if ( total > 0 )
|
||||||
@ -107,14 +106,6 @@
|
|||||||
$finishBtn.removeClass('ui-state-disabled ssui-button-disabled').attr('aria-disabled', 'false').removeAttr('disabled');
|
$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{
|
else{
|
||||||
//if not uploading, reset + hide
|
//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
|
* Clear all the warning/error/finished uploads
|
||||||
*/
|
*/
|
||||||
|
@ -265,13 +265,6 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.bulkUploadEditButton,
|
|
||||||
&.bulkUploadClearErrorButton
|
|
||||||
{
|
|
||||||
float: right;
|
|
||||||
margin: 0 0 0 6px;
|
|
||||||
}
|
|
||||||
}// button
|
}// button
|
||||||
|
|
||||||
.colymba-bulkupload-info
|
.colymba-bulkupload-info
|
||||||
|
@ -376,17 +376,11 @@ class BulkUploader implements GridField_HTMLProvider, GridField_URLHandler
|
|||||||
->setAttribute('data-icon', 'accept')
|
->setAttribute('data-icon', 'accept')
|
||||||
->setUseButtonTag(true);
|
->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
|
// get uploadField
|
||||||
$uploadField = $this->bulkUploadField($gridField);
|
$uploadField = $this->bulkUploadField($gridField);
|
||||||
|
|
||||||
$data = ArrayData::create(array(
|
$data = ArrayData::create(array(
|
||||||
'Finish' => $finishButton,
|
'Finish' => $finishButton,
|
||||||
'ClearErrors' => $clearErrorButton,
|
|
||||||
'Colspan' => (count($gridField->getColumns())),
|
'Colspan' => (count($gridField->getColumns())),
|
||||||
'UploadField' => $uploadField->Field() // call ->Field() to get requirements in right order
|
'UploadField' => $uploadField->Field() // call ->Field() to get requirements in right order
|
||||||
));
|
));
|
||||||
|
@ -2,6 +2,5 @@
|
|||||||
<th class="" colspan="$Colspan">
|
<th class="" colspan="$Colspan">
|
||||||
$UploadField
|
$UploadField
|
||||||
$Finish
|
$Finish
|
||||||
$ClearErrors
|
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
Loading…
Reference in New Issue
Block a user