From 3f44a865a0b6cf56054570825511fbb05aa6d2fd Mon Sep 17 00:00:00 2001 From: Shea Dawson Date: Mon, 2 Jun 2014 14:46:01 +1000 Subject: [PATCH 1/4] FIX bug with LiteralField for column content This change allowed me to have a column with a CMSThumbnail in a LiteralField --- code/GridFieldEditableColumns.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/GridFieldEditableColumns.php b/code/GridFieldEditableColumns.php index 612508b..89992a1 100644 --- a/code/GridFieldEditableColumns.php +++ b/code/GridFieldEditableColumns.php @@ -138,7 +138,11 @@ class GridFieldEditableColumns extends GridFieldDataColumns implements if(isset($info['callback'])) { $field = call_user_func($info['callback'], $record, $col, $grid); } elseif(isset($info['field'])) { - $field = new $info['field']($col); + if ($info['field'] == 'LiteralField') { + $field = new $info['field']($col, null); + }else{ + $field = new $info['field']($col); + } } if(!$field instanceof FormField) { From 067608506752dbc0ff2542f08cc9e9184a5eb475 Mon Sep 17 00:00:00 2001 From: Andrew Short Date: Fri, 28 Nov 2014 00:04:43 +1100 Subject: [PATCH 2/4] Update package details. --- composer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index cc86f9c..23e34d8 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "ajshort/silverstripe-gridfieldextensions", + "name": "silverstripe-australia/gridfieldextensions", "description": "A collection of useful grid field components", "type": "silverstripe-module", "homepage": "http://github.com/ajshort/silverstripe-gridfieldextensions", @@ -23,5 +23,8 @@ "docs/en/_images/editable-rows.png", "docs/en/_images/add-existing-search.png" ] + }, + "replace": { + "ajshort/silverstripe-gridfieldextensions": "self.version" } } From 7ca83e9cdd15be0d8b88041861e3b5fb3533d163 Mon Sep 17 00:00:00 2001 From: Marcus Nyeholt Date: Mon, 1 Dec 2014 15:36:22 +1100 Subject: [PATCH 3/4] Updated maintainers to hopefully take packagist ownership... --- composer.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 23e34d8..b4dc72b 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,11 @@ { "name": "Andrew Short", "email": "andrewjshort@gmail.com" - } + }, + { + "name": "Marcus Nyeholt", + "email": "marcus@silverstripe.com.au" + } ], "support": { "issues": "http://github.com/ajshort/silverstripe-gridfieldextensions/issues" From 077125a30a48c372e67aa58f94504750f9ce24fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thierry=20Fran=C3=A7ois?= Date: Tue, 2 Dec 2014 17:05:01 +0200 Subject: [PATCH 4/4] Drag handle icon is always visible --- css/GridFieldExtensions.css | 18 +++++++++++++++--- templates/GridFieldOrderableRowsDragHandle.ss | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/css/GridFieldExtensions.css b/css/GridFieldExtensions.css index 5c6252c..0145e37 100644 --- a/css/GridFieldExtensions.css +++ b/css/GridFieldExtensions.css @@ -117,17 +117,29 @@ } .ss-gridfield-orderable .col-reorder { + position: relative; padding: 0 !important; width: 16px !important; } .ss-gridfield-orderable .col-reorder .handle { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; cursor: move; - display: none; } -.ss-gridfield-orderable tbody tr:hover .col-reorder .handle { - display: block; +.ss-gridfield-orderable .col-reorder .handle .icon { + position: absolute; + top: 50%; + left: 50%; + width: 5px; + height: 11px; + margin: -5px 0 0 -2px; + background-image: url('../../framework/thirdparty/jquery-ui-themes/smoothness/images/ui-icons_222222_256x240.png'); + background-position: -5px -227px; } .ss-gridfield-orderhelper { diff --git a/templates/GridFieldOrderableRowsDragHandle.ss b/templates/GridFieldOrderableRowsDragHandle.ss index 4899111..9702f53 100644 --- a/templates/GridFieldOrderableRowsDragHandle.ss +++ b/templates/GridFieldOrderableRowsDragHandle.ss @@ -1 +1 @@ - +