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

Update repeater header checkbox to use correct markup #1847

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions js/repeater-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@

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

Expand All @@ -419,6 +420,7 @@
}
});

$headerCheckbox.checkbox();
$checkboxes.checkbox();

// Row checkboxes
Expand Down Expand Up @@ -687,8 +689,14 @@
var chevUp = 'glyphicon-chevron-up';
var $div = $('<div class="repeater-list-heading"><span class="glyphicon rlc"></span></div>');
var checkAllID = (this.$element.attr('id')+'_' || '') + 'checkall';
var checkBoxMarkup = '<div class="repeater-list-heading header-checkbox"><div class="checkbox checkbox-inline"><input type="checkbox" id="' + checkAllID + '">'+
'<label for="' + checkAllID + '"></label></div></div>';

var checkBoxMarkup = '<div class="repeater-list-heading header-checkbox">' +
'<label id="' + checkAllID + '" class="checkbox-custom checkbox-inline">' +
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CormacMcCarthy Updated.

'<input class="sr-only" type="checkbox" value="">' +
'<span class="checkbox-label">&nbsp;</span>' +
'</label>' +
'</div>';

var $header = $('<th></th>');
var self = this;
var $both, className, sortable, $span, $spans;
Expand Down
7 changes: 7 additions & 0 deletions less/repeater-list.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@import "fuelux-core.less";
@mutli-select-enabled-width: 37px;

// row checkboxes for selection and actions
.selectable() {
&.selectable {
&:hover td, &.hovered td {
Expand Down Expand Up @@ -142,6 +144,11 @@
border-left: none;
.header-checkbox {
width: @mutli-select-enabled-width;
padding-left: 12px;

.checkbox-inline:before {
top: 0;
}
}
}

Expand Down