diff --git a/code/GridFieldBulkImageUpload_Request.php b/code/GridFieldBulkImageUpload_Request.php index 2302e17..fc84b6e 100644 --- a/code/GridFieldBulkImageUpload_Request.php +++ b/code/GridFieldBulkImageUpload_Request.php @@ -194,7 +194,7 @@ class GridFieldBulkImageUpload_Request extends RequestHandler { ->setAttribute('data-icon', 'accept') ->setAttribute('data-url', $this->Link('update')) ->setUseButtonTag(true) - ->setDisabled(true) + //->setDisabled(true) ); /* if($crumbs && $crumbs->count()>=2) @@ -217,7 +217,7 @@ class GridFieldBulkImageUpload_Request extends RequestHandler { ->setAttribute('data-icon', 'decline') ->setAttribute('data-url', $this->Link('cancel')) ->setUseButtonTag(true) - ->setDisabled(true) + //->setDisabled(true) ); diff --git a/javascript/GridFieldBulkImageUpload.js b/javascript/GridFieldBulkImageUpload.js index 3f0fc53..9fdc112 100644 --- a/javascript/GridFieldBulkImageUpload.js +++ b/javascript/GridFieldBulkImageUpload.js @@ -40,6 +40,15 @@ } } }); + + $('#bulkImageUploadUpdateBtn,#bulkImageUploadUpdateCancelBtn').entwine({ + onmatch: function(){ + $(this).addClass('ui-state-disabled ssui-button-disabled'); + $(this).attr('aria-disabled', 'true'); + $(this).attr('disabled', 'true'); + }, + onunmatch: function(){} + }); // end SS overhides // start add-on behaviours @@ -66,7 +75,10 @@ if ( !$(itemInfo).hasClass('dirty') ) $(itemInfo).addClass('dirty'); $('#bulkImageUploadUpdateFinishBtn').addClass('dirty'); - $('#bulkImageUploadUpdateBtn').removeClass('ui-state-disabled'); + + $('#bulkImageUploadUpdateBtn').removeClass('ui-state-disabled ssui-button-disabled'); + $('#bulkImageUploadUpdateBtn').attr('aria-disabled', 'false'); + $('#bulkImageUploadUpdateBtn').removeAttr('disabled'); } }); @@ -157,9 +169,10 @@ }); $('.ss-uploadfield-item-editform').entwine({ - onmatch: function(e){ - console.log(this); - $('#bulkImageUploadUpdateCancelBtn').removeClass('ui-state-disabled'); + onmatch: function(e){ + $('#bulkImageUploadUpdateCancelBtn').removeClass('ui-state-disabled ssui-button-disabled'); + $('#bulkImageUploadUpdateCancelBtn').attr('aria-disabled', 'false'); + $('#bulkImageUploadUpdateCancelBtn').removeAttr('disabled'); }, onunmatch: function(){ }