Sha256: e5647fb9ea466add1638d803efd1f5df4e4e724e204bdb4ae05443971f6490e3

Contents?: true

Size: 633 Bytes

Versions: 21

Compression:

Stored size: 633 Bytes

Contents

$(document).ready(function() {
  $('.modal-open').click(function(e) {
    e.preventDefault();
    let model = $(this).data('modal');
    let needTallModal = window.innerHeight < $('.modal-content').height();
    let thisModal = $('.modal.' + model)

    thisModal.addClass('active');
    $('html, body').css('overflow', 'hidden');
    needTallModal ? thisModal.addClass('modal-tall') : thisModal.removeClass('modal-tall');
  })

  $('.modal .modal-content').click(e => e.stopPropagation());

  $('.modal, .modal-close').click(function() {
    $('.modal').removeClass('active');
    $('html, body').css('overflow', 'scroll');
  })
})

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
timequake-2.0.11 app/assets/javascripts/timequake/modals.js
timequake-2.0.10 app/assets/javascripts/timequake/modals.js
timequake-2.0.9 app/assets/javascripts/timequake/modals.js
timequake-2.0.8 app/assets/javascripts/timequake/modals.js
timequake-2.0.7 app/assets/javascripts/timequake/modals.js
timequake-2.0.6 app/assets/javascripts/timequake/modals.js
timequake-2.0.5 app/assets/javascripts/timequake/modals.js
timequake-2.0.4 app/assets/javascripts/timequake/modals.js
timequake-2.0.3 app/assets/javascripts/timequake/modals.js
timequake-2.0.2 app/assets/javascripts/timequake/modals.js
timequake-2.0.1 app/assets/javascripts/timequake/modals.js
timequake-2.0.0 app/assets/javascripts/timequake/modals.js
timequake-1.0.9 app/assets/javascripts/timequake/modals.js
timequake-1.0.8 app/assets/javascripts/timequake/modals.js
timequake-1.0.7 app/assets/javascripts/timequake/modals.js
timequake-1.0.6 app/assets/javascripts/timequake/modals.js
timequake-1.0.5 app/assets/javascripts/timequake/modals.js
timequake-1.0.4 app/assets/javascripts/timequake/modals.js
timequake-1.0.3 app/assets/javascripts/timequake/modals.js
timequake-1.0.2 app/assets/javascripts/timequake/modals.js