Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR: Added label to the "Allow Drag and Drop" text so that clicking…

… this will activate the checkbox

MINOR: Fixed line-height issues added in beta 3
  • Loading branch information...
commit 5f4a217630b0d9e1cb79f8630450e10a0d5be0e6 1 parent 4c77fff
@UndefinedOffset UndefinedOffset authored
View
2  code/forms/GridFieldSortableRows.php
@@ -77,7 +77,7 @@ public function getHTMLFragments($gridField) {
Requirements::javascript('SortableGridField/javascript/GridFieldSortableRows.js');
- $args = array('Colspan' => count($gridField->getColumns()));
+ $args = array('Colspan' => count($gridField->getColumns()), 'ID' => $gridField->ID());
return array('header' => $forTemplate->renderWith('GridFieldSortableRows', $args));
}
View
8 css/GridFieldSortableRows.css
@@ -2,6 +2,14 @@
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
+.cms table.ss-gridfield-table thead tr th.sortablerowsheading .gridfield-sortablerows input[type=checkbox] {
+ height: auto;
+}
+
+.cms table.ss-gridfield-table thead tr th.sortablerowsheading .gridfield-sortablerows {
+ line-height: 28px;
+}
+
.cms table.ss-gridfield-table thead tr th.sortablerowsheading .gridfield-sortablerows button {
display: none;
}
View
2  templates/Includes/GridFieldSortableRows.ss
@@ -1,7 +1,7 @@
<tr>
<th class="extra sortablerowsheading" colspan="$Colspan">
<div class="gridfield-sortablerows">
- <input type="checkbox" value="1"$Checked/> <%t GridFieldSortableRows.ALLOW_DRAG_DROP "_Allow drag and drop re-ordering" %>
+ <input type="checkbox" id="{$ID}_AllowDragDropCheck" value="1"$Checked/> <label for="{$ID}_AllowDragDropCheck"><%t GridFieldSortableRows.ALLOW_DRAG_DROP "_Allow drag and drop re-ordering" %></label>
$SortableToggle
$PagenatorToggle
$SortToPage
Please sign in to comment.
Something went wrong with that request. Please try again.