Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Commit f8e749b

Browse files
author
Christopher McCulloh
authored
Merge pull request #1847 from interactivellama/repeater-checkbox-markup
Update repeater header checkbox to use correct markup
2 parents 35c3341 + 921f779 commit f8e749b

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

js/repeater-list.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@
404404

405405
$.fn.repeater.Constructor.prototype.list_frozenOptionsInitialize = function () {
406406
var $checkboxes = this.$element.find('.frozen-column-wrapper .checkbox-inline');
407+
var $headerCheckbox = this.$element.find('.header-checkbox .checkbox-custom');
407408
var $everyTable = this.$element.find('.repeater-list table');
408409
var self = this;
409410

@@ -419,6 +420,7 @@
419420
}
420421
});
421422

423+
$headerCheckbox.checkbox();
422424
$checkboxes.checkbox();
423425

424426
// Row checkboxes
@@ -687,8 +689,14 @@
687689
var chevUp = 'glyphicon-chevron-up';
688690
var $div = $('<div class="repeater-list-heading"><span class="glyphicon rlc"></span></div>');
689691
var checkAllID = (this.$element.attr('id')+'_' || '') + 'checkall';
690-
var checkBoxMarkup = '<div class="repeater-list-heading header-checkbox"><div class="checkbox checkbox-inline"><input type="checkbox" id="' + checkAllID + '">'+
691-
'<label for="' + checkAllID + '"></label></div></div>';
692+
693+
var checkBoxMarkup = '<div class="repeater-list-heading header-checkbox">' +
694+
'<label id="' + checkAllID + '" class="checkbox-custom checkbox-inline">' +
695+
'<input class="sr-only" type="checkbox" value="">' +
696+
'<span class="checkbox-label">&nbsp;</span>' +
697+
'</label>' +
698+
'</div>';
699+
692700
var $header = $('<th></th>');
693701
var self = this;
694702
var $both, className, sortable, $span, $spans;

less/repeater-list.less

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
@import "fuelux-core.less";
22
@mutli-select-enabled-width: 37px;
3+
4+
// row checkboxes for selection and actions
35
.selectable() {
46
&.selectable {
57
&:hover td, &.hovered td {
@@ -142,6 +144,11 @@
142144
border-left: none;
143145
.header-checkbox {
144146
width: @mutli-select-enabled-width;
147+
padding-left: 12px;
148+
149+
.checkbox-inline:before {
150+
top: 0;
151+
}
145152
}
146153
}
147154

0 commit comments

Comments
 (0)