{:uriI"file:///Library/WebServer/Documents/work/fine/_fae/app/assets/javascripts/fae/_modals.js?type=application/javascript&pipeline=self&id=3a232c2034ac687da6510a6a6b3c1406aae55826afe8e68865f14c94c3017f0d:ET:load_pathI"G/Library/WebServer/Documents/work/fine/_fae/app/assets/javascripts;T: 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-main-content').on('click', '.js-image-modal', 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"rails-env;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;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%tEr\TODL_,o;`F*: lengthi:dependencies_digest"%T8K{8 )blti:pa^Bw:idI"E3a232c2034ac687da6510a6a6b3c1406aae55826afe8e68865f14c94c3017f0d;F: mtimel+ɧX