Change table switches to checkboxes; vertically align table rows

This commit is contained in:
David Rowe 2016-06-07 12:54:01 +12:00
parent 0c18df6278
commit a4be536a82
2 changed files with 6 additions and 3 deletions

View file

@ -20,6 +20,10 @@ body {
top: 40px;
}
.table .value-row td, .table .inputs td {
vertical-align: middle;
}
.glyphicon-remove {
font-size: 24px;
}

View file

@ -233,7 +233,7 @@ $(document).ready(function(){
});
// Bootstrap switch in table
$('#' + Settings.FORM_ID).on('switchChange.bootstrapSwitch', 'input.table-checkbox', function () {
$('#' + Settings.FORM_ID).on('change', 'input.table-checkbox', function () {
// Bootstrap switches in table: set the changed data attribute for all rows in table.
var row = $(this).closest('tr');
if (row.hasClass("value-row")) { // Don't set attribute on input row switches prior to it being added to table.
@ -851,7 +851,6 @@ function reloadSettings(callback) {
// setup any bootstrap switches
$('.toggle-checkbox').bootstrapSwitch();
$('.table-checkbox').bootstrapSwitch();
// add tooltip to locked settings
$('label.locked').tooltip({
@ -1176,7 +1175,7 @@ function addTableRow(add_glyphicon) {
var input = $(element).find("input")
var isCheckbox = false;
if (input.hasClass("table-checkbox")) {
input = $(input).parent().parent();
input = $(input).parent();
isCheckbox = true;
}