{:uriI"Æfile:///Library/WebServer/Documents/work/fine/_fae/app/assets/javascripts/fae/_modals.js?type=application/javascript&pipeline=self&id=86304c69a16c82d410bb39ce7658e4f78c93f2ae14fea674f0a3e653d6bd53cc:ET:load_pathI"G/Library/WebServer/Documents/work/fine/_fae/app/assets/javascripts;F: filenameI"V/Library/WebServer/Documents/work/fine/_fae/app/assets/javascripts/fae/_modals.js;T: nameI"fae/_modals;T:logical_pathI"fae/_modals.self.js;T:content_typeI"application/javascript;T: sourceI"â/* global Fae, modal, FCH */ /** * Fae modals * @namespace */ Fae.modals = { ready: function() { this.imageModals(); this.markdownModalListener(); }, /** * Click event to open modal with only an image */ imageModals: function() { $('.js-image-modal').click(function(e){ e.preventDefault(); var $this = $(this); // create invisi-image to get natural width/height var image = new Image(); image.src = $this.attr('src'); var image_width = image.width + 55; var image_height = image.height + 55; $this.modal({ minHeight: image_height, minWidth: image_width, overlayClose: true }); }); }, /** * Display markdown guide in a modal * @see {@link form.text.overrideMarkdownDefaults} * @see {@link modals.markdownModalListener} * @has_test {features/form_helpers/fae_input_spec.rb} */ markdownModal: function() { var markdown_hint_width = $('.markdown-hint').width() + 40; $('.markdown-hint-wrapper').modal({ minHeight: 430, minWidth: markdown_hint_width, overlayClose: true, zIndex: 1100 }); }, /** * Markdown guide shown on document click of "markdown-support" so as to support AJAX'd markdown-support fields. * @fires {@link modals.markdownModal} * @has_test {features/form_helpers/fae_input_spec.rb} */ markdownModalListener: function() { FCH.$document.on('click', '.markdown-support', this.markdownModal); } }; ;T: metadata{ :dependencieso:Set: @hash{ I"environment-version;TTI"environment-paths;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"dfile-digest:///Library/WebServer/Documents/work/fine/_fae/app/assets/javascripts/fae/_modals.js;TT: requiredo;;{: stubbedo;;{: linkso;;{: charsetI" utf-8;F: digest"%q)þjã<…3„ÕÅxwP$ëÔ‹'iOÙ|(®oBý˜o: lengthiâ:integrityI"Xni:///sha-256;cSn-auM8hTOE1cV4d1Ak69SBiydpf0_ZfCiub0L9mG8?ct=application/javascript;T:dependencies_digest"%ÅXý°Há ëQ—#|,hªM}ñ\P±\`m¢žÅŽ9ÕË:idI"E86304c69a16c82d410bb39ce7658e4f78c93f2ae14fea674f0a3e653d6bd53cc;F: mtimel+%X