{:uriI"file:///Users/tyler/Development/GitHub/guts/app/assets/javascripts/guts/media.js?type=application/javascript&pipeline=self&id=ba29ea71bfd4f05cbb48288176cd7b8089a9ae40a468eccf81e61faefa7fb430: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;TT: requiredo;;{: stubbedo;;{: linkso;;{: charsetI" utf-8;F: digest"%|4=NDG.bRuS): lengthi:dependencies_digest"% _aL&rm87kiy(:idI"Eba29ea71bfd4f05cbb48288176cd7b8089a9ae40a468eccf81e61faefa7fb430;F: mtimel+V