diff --git a/client/src/js/uploader.js b/client/src/js/uploader.js index 9561c05..c92969b 100644 --- a/client/src/js/uploader.js +++ b/client/src/js/uploader.js @@ -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 @@ -125,27 +116,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 diff --git a/client/src/styles/uploader.scss b/client/src/styles/uploader.scss index 942da68..ab831fb 100644 --- a/client/src/styles/uploader.scss +++ b/client/src/styles/uploader.scss @@ -265,13 +265,6 @@ padding: 0; } } - - &.bulkUploadEditButton, - &.bulkUploadClearErrorButton - { - float: right; - margin: 0 0 0 6px; - } }// button .colymba-bulkupload-info diff --git a/src/BulkUploader/BulkUploader.php b/src/BulkUploader/BulkUploader.php index 8ecbf7e..8eb5d55 100644 --- a/src/BulkUploader/BulkUploader.php +++ b/src/BulkUploader/BulkUploader.php @@ -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 )); diff --git a/templates/Colymba/BulkUpload/BulkUploader.ss b/templates/Colymba/BulkUpload/BulkUploader.ss index 4958b9e..14cd1e1 100644 --- a/templates/Colymba/BulkUpload/BulkUploader.ss +++ b/templates/Colymba/BulkUpload/BulkUploader.ss @@ -2,6 +2,5 @@ $UploadField $Finish - $ClearErrors \ No newline at end of file