Skip to content

Commit

Permalink
Don't disable "agree" button on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
neoformit committed Oct 18, 2024
1 parent d102625 commit 0355d34
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ <h5 class="modal-title"></h5>
.css('padding', '1rem'));
{% endif %}

const isMac = () => navigator.platform.toUpperCase().indexOf('MAC') >= 0;

function agreeTermsAction(el) {
enableTermsInput();
$('#agreeTermsInput').attr('checked', true);
Expand All @@ -92,16 +94,20 @@ <h5 class="modal-title"></h5>
tooltip.disable();
}


function setEventHandler() {
const termsContainer = $('#termsModal iframe').contents().find('body');
if (!termsContainer.length) {
return setTimeout(setEventHandler, 100);
}
if (isMac()) {
return enableAgreeTermsButton();
}
$('#termsModal iframe').contents().on('scroll', (event) => {
const scrollFromEnd = $(termsContainer)[0].scrollHeight
- $('#termsModal iframe').contents().scrollTop()
- $('#termsModal iframe').height();
if (scrollFromEnd < 50) enableAgreeTermsButton();
scrollFromEnd < 50 && enableAgreeTermsButton();
});
termsContainer.css('margin', 'auto');
}
Expand Down
3 changes: 2 additions & 1 deletion webapp/home/templates/home/requests/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ <h1 class="ga-blue"><span class="material-icons">save</span></h1>
<h1 class="ga-blue"><span class="material-icons">key</span></h1>
<div class="card-body">
<p>
Request access to specialised tools AlphaFold 2, FGENESH++ and Cell Ranger
Request access to specialised tools AlphaFold 2, FGENESH++,
Cell Ranger and more...
</p>
</div>

Expand Down

0 comments on commit 0355d34

Please sign in to comment.