change loading confirm prefix, fix password modal focus, again

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

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/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 -->
<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" />