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

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
Change-Id: I0d70b9b94845367bbab4c4390882c5368aee18cf
  • Loading branch information
andi34 committed Sep 26, 2021
1 parent efaef7b commit 2bd1c0c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 14 deletions.
27 changes: 18 additions & 9 deletions src/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -693,15 +693,24 @@ const photoBooth = (function () {
const qrCodeModal = $('#qrCode');
photoboothTools.modal.empty(qrCodeModal);
const body = qrCodeModal.find('.modal__body');
$('<button>').on('click touchstart', function(e) {
photoboothTools.modal.close('#qrCode');
}).append($('<i>').addClass('fa fa-times')).css('float', 'right').appendTo(body);
$('<img src="api/qrcode.php?filename=' + filename + '"/>').on('load', function () {
$('<p>')
.css('max-width', this.width + 'px')
.html(photoboothTools.getTranslation('qrHelp') + '</br><b>' + config.webserver.ssid + '</b>')
.appendTo(body);
}).appendTo(body);
$('<button>')
.on('click touchstart', function (ev) {
ev.preventDefault();
ev.stopPropagation();

photoboothTools.modal.close('#qrCode');
})
.append($('<i>').addClass('fa fa-times'))
.css('float', 'right')
.appendTo(body);
$('<img src="api/qrcode.php?filename=' + filename + '"/>')
.on('load', function () {
$('<p>')
.css('max-width', this.width + 'px')
.html(photoboothTools.getTranslation('qrHelp') + '</br><b>' + config.webserver.ssid + '</b>')
.appendTo(body);
})
.appendTo(body);

// Add Print Link
$(document).off('click touchstart', '.printbtn');
Expand Down
14 changes: 9 additions & 5 deletions src/js/photoinit.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,15 @@ function initPhotoSwipeFromDOM(gallerySelector) {
let img = gallery.currItem.src;
img = img.split('\\').pop().split('/').pop();

$('<button>').on('click touchstart', function(e) {
e.preventDefault();
e.stopPropagation();
$('.pswp__qr').empty().removeClass('qr-active').fadeOut('fast');
}).append($('<i>').addClass('fa fa-times')).css('float', 'right').appendTo(pswpQR);
$('<button>')
.on('click touchstart', function (ev) {
ev.preventDefault();
ev.stopPropagation();
$('.pswp__qr').empty().removeClass('qr-active').fadeOut('fast');
})
.append($('<i>').addClass('fa fa-times'))
.css('float', 'right')
.appendTo(pswpQR);
$('<img>')
.attr('src', 'api/qrcode.php?filename=' + img)
.appendTo(pswpQR);
Expand Down

0 comments on commit 2bd1c0c

Please sign in to comment.