Skip to content

Commit

Permalink
fix indentations, no more linter errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
lebrinkma committed Sep 5, 2024
1 parent 47615fc commit 4a45837
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
22 changes: 11 additions & 11 deletions admin/adapter-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,23 +96,23 @@ function loadSettings(callback) {
if (typeof load === 'undefined') {
alert('Please implement save function in your admin/index.html');
} else {
const _query = query.split('&');
for (var q = 0; q < _query.length; q++) {
if (_query[q].indexOf('react=') !== -1) {
$('.adapter-container').addClass('react-' + _query[q].substring(6));
theme = 'react-' + _query[q].substring(6);
const _query = query.split('&');
for (var q = 0; q < _query.length; q++) {
if (_query[q].indexOf('react=') !== -1) {
$('.adapter-container').addClass('react-' + _query[q].substring(6));
theme = 'react-' + _query[q].substring(6);
}
}
}
load(res.native, onChange);
load(res.native, onChange);
}
if (typeof callback === 'function') {
callback();
}
} else {
if (typeof callback === 'function') {
callback();
}
alert('error loading settings for ' + _adapterInstance + '\n\n' + err);
if (typeof callback === 'function') {
callback();
}
alert('error loading settings for ' + _adapterInstance + '\n\n' + err);
}
});
}
Expand Down
28 changes: 14 additions & 14 deletions admin/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ function editName(id, name) {
for (let i = 0; i < groupables.length; i++) {
const ng = $('#d_groups_ep' + i).val();
if (ng.toString() != groupables[i].memberOf.toString())
groupsbyid[groupables[i].ep.ID] = GenerateGroupChange(groupables[i].memberOf, ng);
groupsbyid[groupables[i].ep.ID] = GenerateGroupChange(groupables[i].memberOf, ng);
}
}
console.log('grpid ' + JSON.stringify(groupsbyid));
Expand Down Expand Up @@ -529,7 +529,7 @@ function showDevices() {
} else {
//if (d.groups && d.info && d.info.device._type == "Router") {
if (d.groups) {
// devGroups[d._id] = d.groups;
//devGroups[d._id] = d.groups;
if (typeof d.groups.map == 'function') {
d.groupNames = d.groups.map(item => {
return groups[item] || '';
Expand Down Expand Up @@ -557,10 +557,10 @@ function showDevices() {
roomSelector.empty();
roomSelector.append(`<li class="device-order-item" data-type="All" tabindex="0"><a class="translate" data-lang="All">All</a></li>`);
Array.from(allRooms)
.sort()
.forEach((item) => {
roomSelector.append(`<li class="device-order-item" data-type="${item}" tabindex="0"><a class="translate" data-lang="${item}">${item}</a></li>`);
});
.sort()
.forEach((item) => {
roomSelector.append(`<li class="device-order-item" data-type="${item}" tabindex="0"><a class="translate" data-lang="${item}">${item}</a></li>`);
});
$('#room-filter a').click(function () {
$('#room-filter-btn').text($(this).text());
doFilter();
Expand Down Expand Up @@ -692,7 +692,7 @@ function letsPairingWithCode(code) {
showMessage(msg.error, _('Error'));
}
else {
showPairingProcess();
showPairingProcess();
}
});
}
Expand Down Expand Up @@ -887,13 +887,13 @@ function load(settings, onChange) {
});

$('#code_pairing').click(function () {
if (!$('#pairing').hasClass('pulse')) {
$('#codeentry a.btn[name=\'pair\']').click(() => {
const code = $('#codeentry').find('input[id=\'qr_code\']').val();
letsPairingWithCode(code)
});
$('#codeentry').modal('open');
}
if (!$('#pairing').hasClass('pulse')) {
$('#codeentry a.btn[name=\'pair\']').click(() => {
const code = $('#codeentry').find('input[id=\'qr_code\']').val();
letsPairingWithCode(code)
});
$('#codeentry').modal('open');
}
});

$(document).ready(function () {
Expand Down

0 comments on commit 4a45837

Please sign in to comment.