]> iEval git - gruntmaster-page.git/commitdiff
Hide modal backdrop by default
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 18 Apr 2015 09:35:02 +0000 (12:35 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 18 Apr 2015 09:35:02 +0000 (12:35 +0300)
js/10-modal.js
tmpl/pb_entry.en

index 1c290ef1252ce3d236f7c4208efd3fd45c4f3704..62cbb271c56b32f0f779d0ca4529814aeadeb9b8 100644 (file)
@@ -1,7 +1,8 @@
-let modal, hiding;
+let modal, backdrop, hiding;
 
 function show_modal () {
        modal.classList.remove('hidden');
+       backdrop.classList.remove('hidden');
        setTimeout(function (){
                document.body.classList.add('modal-open');
        }, 20);
@@ -13,6 +14,7 @@ function hide_modal () {
 
 $(function() {
        modal = $('.modal')[0];
+       backdrop = $('.backdrop')[0];
        $(modal).on('transitionend', el => {
                if(!document.body.classList.contains('modal-open'))
                        modal.classList.add('hidden');
index 9f0cecb8051a3ac4a106aa19b381c609406006f3..7b376699f52aac4fd29e38ecb8d63e98dbc0bb8f 100644 (file)
@@ -51,5 +51,5 @@ To submit solutions to this problem, please visit the problem <a href="/pb/id">o
 </div>
 </div>
 
-<div class="backdrop"></div>
+<div class="hidden backdrop"></div>
 <div id="solution_modal" class="hidden modal"></div>
This page took 0.022204 seconds and 4 git commands to generate.