{:uriI"¾file:///Users/tyler/Development/GitHub/guts/app/assets/javascripts/guts/media.js?type=application/javascript&pipeline=self&id=d7677e25c39ca55398a793f7d46b13d91c7fe637a6e7606a3923b489fdf8d767:ET:load_pathI"@/Users/tyler/Development/GitHub/guts/app/assets/javascripts;T: filenameI"N/Users/tyler/Development/GitHub/guts/app/assets/javascripts/guts/media.js;T: nameI"guts/media;T:logical_pathI"guts/media.self.js;T:content_typeI"application/javascript;T: sourceI"¬jQuery(document).ready(function($) { $('.media_add').on('click', function() { $(this).remove(); $('.media_add_new').show(); }); $('.media_destroy').on('click', function(e) { e.preventDefault(); var $that = $(this); swal({ title: 'Are you sure?', text: 'You will not be able to recover this attachment after deletion.', type: 'warning', showCancelButton: true, confirmButtonColor: '#DD6B55', confirmButtonText: 'Yes, delete it!', closeOnConfirm: false }, function() { swal.close(); $that.parents('.media_block').find('input[type=checkbox]').trigger('click'); $that.parents('.media_block').fadeOut('slow'); }); }); if (window.top.tinymce && window.top != window) { $('.media_insert').css('display', 'inline'); $(document).on('click', '#media_insert_size', function() { var size = $(this).parent().find('select').val(); var file = $(this).parent().find('#media_insert_file_link'); var editor = window.top.tinymce.editors[0]; editor.insertContent('Image'); editor.windowManager.close(); }); $('.media_insert').on('click', function(e) { e.preventDefault(); if ($(this).data('type').indexOf('image') != -1) { var modal = $('#media_insert_modal'); $.get($(this).attr('href'), function(resp) { modal.html(resp).foundation('open'); }); } else { var editor = window.top.tinymce.editors[0]; editor.insertContent(''+$(this).data('title')+''); editor.windowManager.close(); } }) } }); ;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"\file-digest:///Users/tyler/Development/GitHub/guts/app/assets/javascripts/guts/media.js;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%$;Þ9»†æUÒ›E“F1yAF¤sg+[¸Þ: lengthi¬:dependencies_digest"%e—5°ù0ÖvµÀÒ«„CÚ¯fÐà…ä\›;‚ªM:idI"Ed7677e25c39ca55398a793f7d46b13d91c7fe637a6e7606a3923b489fdf8d767;F: mtimel+ïñX