{I" class:ETI"ProcessedAsset;FI"logical_path;TI"spina/modal.js;FI" pathname;TI"|/Users/bram/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spina-template-0.2.4/app/assets/javascripts/spina/modal.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;Tl+Ü¥UI" length;Ti¥I" digest;TI"%7a454d70faae94bde241eade887f475b;FI" source;TI"¥(function() { var hideModal, showModal; $.hideModal = function() { return hideModal(); }; $.fn.modal = function() { return showModal($(this)); }; $(document).on('click', 'a[data-toggle="modal"]', function() { var link, modal; link = $(this); modal = $(link.attr('href')); return showModal(modal); }); $(document).on('click', 'body.overlay', function() { return hideModal(); }); $(document).on('click', '[data-dismiss="modal"]', function() { return hideModal(); }); $(document).on('keyup', 'body.overlay', function(e) { if (e.keyCode === 27) { return hideModal(); } }); $(document).on('click', '.modal', function(e) { return e.stopPropagation(); }); hideModal = function() { $('body').removeClass('overlay'); $('#overlay .modal').addClass('flyOut'); $('#overlay').fadeOut(300, function() { return $(this).remove(); }); return false; }; showModal = function(element) { var maxheight, modal; modal = element.clone(); modal.addClass('animated flyIn'); if ($('#overlay').length < 1) { $('body').append('
'); } else { $('#overlay').html(''); } maxheight = window.innerHeight - (window.innerHeight / 8) - 150; modal.css({ "margin-top": window.innerHeight / 8 }); modal.find('section').css({ "max-height": maxheight }); modal.appendTo('#overlay'); $('#overlay').fadeIn(400); modal.show(); modal.find('input[type="file"][data-customfileinput]').customFileInput(); modal.find('.new_photo').uploadPhoto(); $('body').addClass('overlay'); return false; }; }).call(this); ;TI"dependency_digest;TI"%3bdd48dc8bb95023373fa264a268e1b4;FI"required_paths;T[I"|/Users/bram/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spina-template-0.2.4/app/assets/javascripts/spina/modal.js.coffee;FI"dependency_paths;T[{I" path;TI"|/Users/bram/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spina-template-0.2.4/app/assets/javascripts/spina/modal.js.coffee;F@I"2015-03-11T21:30:20+01:00;T@I"%104a6325378ae1b80141bb0743ca22da;FI" _version;TI"%64e62ddc273c2f5847f30d698ca14b67;F