GridField button styling

Switch to html and add basic syle consistent with component set
This commit is contained in:
colymba 2012-08-11 01:18:00 +03:00
parent 0d3541b1c4
commit a6fee088c6
2 changed files with 26 additions and 2 deletions

View File

@ -140,13 +140,23 @@ class GridFieldBulkImageUpload implements GridField_HTMLProvider, GridField_URLH
* @return array * @return array
*/ */
public function getHTMLFragments($gridField) { public function getHTMLFragments($gridField) {
Requirements::css(BULK_EDIT_TOOLS_PATH . '/css/GridFieldBulkImageUpload.css');
/*
$data = new ArrayData(array( $data = new ArrayData(array(
'NewLink' => $gridField->Link('bulkimageupload'), 'NewLink' => $gridField->Link('bulkimageupload'),
'ButtonName' => 'Bulk Upload' 'ButtonName' => 'Bulk Upload'
)); ));
*/
$html = '
<a id="bulkImageUploadGFButton" href="'.$gridField->Link('bulkimageupload').'" class="action action-detail ss-ui-action-constructive ss-ui-button ui-button ui-widget ui-state-default ui-corner-all new new-link" data-icon="add">
Bulk Upload
</a>';
return array( return array(
'bulk-edit-tools' => $data->renderWith('GridFieldAddNewbutton') //'bulk-edit-tools' => $data->renderWith('GridFieldAddNewbutton')
'bulk-edit-tools' => $html
); );
} }

View File

@ -1,3 +1,17 @@
/* ************************************************************************
* GRIDFIELD
*/
#bulkImageUploadGFButton
{
float: right;
margin: 0 0 0 20px;
}
/* ************************************************************************
* UPLOAD
*/
.ss-assetuploadfield .ss-uploadfield-files .ss-uploadfield-item-editform .ss-assetuploadfield .ss-uploadfield-files .ss-uploadfield-item-editform
{ {
position: relative; position: relative;