mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Change table switches to checkboxes; vertically align table rows
This commit is contained in:
parent
0c18df6278
commit
a4be536a82
2 changed files with 6 additions and 3 deletions
|
@ -20,6 +20,10 @@ body {
|
||||||
top: 40px;
|
top: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table .value-row td, .table .inputs td {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
.glyphicon-remove {
|
.glyphicon-remove {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -233,7 +233,7 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
// Bootstrap switch in table
|
// 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.
|
// Bootstrap switches in table: set the changed data attribute for all rows in table.
|
||||||
var row = $(this).closest('tr');
|
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.
|
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
|
// setup any bootstrap switches
|
||||||
$('.toggle-checkbox').bootstrapSwitch();
|
$('.toggle-checkbox').bootstrapSwitch();
|
||||||
$('.table-checkbox').bootstrapSwitch();
|
|
||||||
|
|
||||||
// add tooltip to locked settings
|
// add tooltip to locked settings
|
||||||
$('label.locked').tooltip({
|
$('label.locked').tooltip({
|
||||||
|
@ -1176,7 +1175,7 @@ function addTableRow(add_glyphicon) {
|
||||||
var input = $(element).find("input")
|
var input = $(element).find("input")
|
||||||
var isCheckbox = false;
|
var isCheckbox = false;
|
||||||
if (input.hasClass("table-checkbox")) {
|
if (input.hasClass("table-checkbox")) {
|
||||||
input = $(input).parent().parent();
|
input = $(input).parent();
|
||||||
isCheckbox = true;
|
isCheckbox = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue