change loading confirm prefix, fix password modal focus, again

This commit is contained in:
El RIDO 2024-02-06 20:22:47 +01:00
parent 03d2291ec7
commit 25de89c954
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92
3 changed files with 9 additions and 11 deletions

View File

@ -82,7 +82,7 @@ jQuery.PrivateBin = (function($, RawDeflate) {
* *
* @private * @private
*/ */
const loadConfirmPrefix = '#?'; const loadConfirmPrefix = '#-';
/** /**
* CryptoData class * CryptoData class
@ -2303,7 +2303,12 @@ jQuery.PrivateBin = (function($, RawDeflate) {
backdrop: 'static', backdrop: 'static',
keyboard: false keyboard: false
}); });
// focus password input
$passwordDecrypt.focus(); $passwordDecrypt.focus();
// then re-focus it, when modal causes it to loose focus again
setTimeout(function () {
$passwordDecrypt.focus();
}, 500);
return; return;
} }
@ -2363,13 +2368,7 @@ jQuery.PrivateBin = (function($, RawDeflate) {
$passwordForm = $('#passwordform'); $passwordForm = $('#passwordform');
$passwordModal = $('#passwordmodal'); $passwordModal = $('#passwordmodal');
// bind events // bind events - handle Model password submission
// focus password input when it is shown
$passwordModal.on('shown.bs.Model', function () {
$passwordDecrypt.focus();
});
// handle Model password submission
$passwordForm.submit(submitPasswordModal); $passwordForm.submit(submitPasswordModal);
}; };
@ -3603,7 +3602,6 @@ jQuery.PrivateBin = (function($, RawDeflate) {
if (fadeOut === true) { if (fadeOut === true) {
setTimeout(function () { setTimeout(function () {
$comment.removeClass('highlight'); $comment.removeClass('highlight');
}, 300); }, 300);
} }
}; };

View File

@ -73,7 +73,7 @@ endif;
?> ?>
<script type="text/javascript" data-cfasync="false" src="js/purify-3.0.6.js" integrity="sha512-N3y6/HOk3pbsw3lFh4O8CKKEVwu1B2CF8kinhjURf8Yqa5OfSUt+/arozxFW+TUPOPw3TsDCRT/0u7BGRTEVUw==" crossorigin="anonymous"></script> <script type="text/javascript" data-cfasync="false" src="js/purify-3.0.6.js" integrity="sha512-N3y6/HOk3pbsw3lFh4O8CKKEVwu1B2CF8kinhjURf8Yqa5OfSUt+/arozxFW+TUPOPw3TsDCRT/0u7BGRTEVUw==" crossorigin="anonymous"></script>
<script type="text/javascript" data-cfasync="false" src="js/legacy.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-LYos+qXHIRqFf5ZPNphvtTB0cgzHUizu2wwcOwcwz/VIpRv9lpcBgPYz4uq6jx0INwCAj6Fbnl5HoKiLufS2jg==" crossorigin="anonymous"></script> <script type="text/javascript" data-cfasync="false" src="js/legacy.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-LYos+qXHIRqFf5ZPNphvtTB0cgzHUizu2wwcOwcwz/VIpRv9lpcBgPYz4uq6jx0INwCAj6Fbnl5HoKiLufS2jg==" crossorigin="anonymous"></script>
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-TwHs7AU0ZWg8bylMgHXtPjnTeGeqSGHknoD3GENdI+xUjJYlup5vNNgL9pg3KSTgPnN49HqNt7h1NdqjHZ1Rfg==" crossorigin="anonymous"></script> <script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-6dEOyWPTHhugOFSpHhuQHbnu3y4OzuP5mExo7isG36hG1AF1U2hgMuXKX1oyDAmsztoshqS/FWKV8Pd8JthAdg==" crossorigin="anonymous"></script>
<!-- icon --> <!-- icon -->
<link rel="apple-touch-icon" href="<?php echo I18n::encode($BASEPATH); ?>img/apple-touch-icon.png" sizes="180x180" /> <link rel="apple-touch-icon" href="<?php echo I18n::encode($BASEPATH); ?>img/apple-touch-icon.png" sizes="180x180" />
<link rel="icon" type="image/png" href="img/favicon-32x32.png" sizes="32x32" /> <link rel="icon" type="image/png" href="img/favicon-32x32.png" sizes="32x32" />

View File

@ -51,7 +51,7 @@ endif;
?> ?>
<script type="text/javascript" data-cfasync="false" src="js/purify-3.0.6.js" integrity="sha512-N3y6/HOk3pbsw3lFh4O8CKKEVwu1B2CF8kinhjURf8Yqa5OfSUt+/arozxFW+TUPOPw3TsDCRT/0u7BGRTEVUw==" crossorigin="anonymous"></script> <script type="text/javascript" data-cfasync="false" src="js/purify-3.0.6.js" integrity="sha512-N3y6/HOk3pbsw3lFh4O8CKKEVwu1B2CF8kinhjURf8Yqa5OfSUt+/arozxFW+TUPOPw3TsDCRT/0u7BGRTEVUw==" crossorigin="anonymous"></script>
<script type="text/javascript" data-cfasync="false" src="js/legacy.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-LYos+qXHIRqFf5ZPNphvtTB0cgzHUizu2wwcOwcwz/VIpRv9lpcBgPYz4uq6jx0INwCAj6Fbnl5HoKiLufS2jg==" crossorigin="anonymous"></script> <script type="text/javascript" data-cfasync="false" src="js/legacy.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-LYos+qXHIRqFf5ZPNphvtTB0cgzHUizu2wwcOwcwz/VIpRv9lpcBgPYz4uq6jx0INwCAj6Fbnl5HoKiLufS2jg==" crossorigin="anonymous"></script>
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-TwHs7AU0ZWg8bylMgHXtPjnTeGeqSGHknoD3GENdI+xUjJYlup5vNNgL9pg3KSTgPnN49HqNt7h1NdqjHZ1Rfg==" crossorigin="anonymous"></script> <script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-6dEOyWPTHhugOFSpHhuQHbnu3y4OzuP5mExo7isG36hG1AF1U2hgMuXKX1oyDAmsztoshqS/FWKV8Pd8JthAdg==" crossorigin="anonymous"></script>
<!-- icon --> <!-- icon -->
<link rel="apple-touch-icon" href="img/apple-touch-icon.png?<?php echo rawurlencode($VERSION); ?>" sizes="180x180" /> <link rel="apple-touch-icon" href="img/apple-touch-icon.png?<?php echo rawurlencode($VERSION); ?>" sizes="180x180" />
<link rel="icon" type="image/png" href="img/favicon-32x32.png?<?php echo rawurlencode($VERSION); ?>" sizes="32x32" /> <link rel="icon" type="image/png" href="img/favicon-32x32.png?<?php echo rawurlencode($VERSION); ?>" sizes="32x32" />