{I" class:ETI"ProcessedAsset;FI"logical_path;TI"sketchily_embed.js;FI" pathname;TI"O/home/dantemss/Desktop/sketchily/app/assets/javascripts/sketchily_embed.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+ð(WRI" length;Ti°I" digest;TI"%16669fd8052ffd5e77843ced6f9b18f5;FI" source;TI"° var svgCanvas = svgCanvas || {}; function submitHandler(event) { var id = event.data; svgCanvas[id].getSvgString()(function (data, error) { handleSvgData(data, error, id); }); event.preventDefault(); event.stopImmediatePropagation(); } function attachSubmitHandler(event) { var id = event.data; $("input#" + id).closest("form").on("submit.svgedit_" + id, null, id, submitHandler); } function handleSvgData(data, error, id) { if (error) { alert('Error: ' + error); } else { var input = $("input#" + id); var form = input.closest("form"); input.attr("value", sketchily_encode64("\n" + data)); form.off("submit.svgedit_" + id); form.one("submit.svgedit_" + id, null, id, attachSubmitHandler); form.submit(); } } function initEmbed(id, value, hide_menu, hide_image_tool, show_hyperlink_tool, url) { var frame = document.getElementById("svgedit_" + id); svgCanvas[id] = new embedded_svg_edit(frame); var doc = frame.contentDocument; if (!doc) { doc = frame.contentWindow.document; } if (hide_menu) { var mainButton = doc.getElementById('main_button'); mainButton.parentNode.removeChild(mainButton); var toolsTop = doc.getElementById('tools_top'); toolsTop.style.left = '5px'; } if (hide_image_tool) { var imageTool = doc.getElementById('tool_image'); imageTool.parentNode.removeChild(imageTool); } if (!show_hyperlink_tool) { var hyperlinkTool = doc.getElementById('tool_make_link'); hyperlinkTool.parentNode.removeChild(hyperlinkTool); } if (!url) { svgCanvas[id].setSvgString(sketchily_decode64(value)); } $("input#" + id).closest("form").on("submit.svgedit_" + id, null, id, submitHandler); $("#svgedit_" + id).css('visibility', ''); } function attachLoadHandler(id, value, hide_menu, hide_image_tool, show_hyperlink_tool, url) { var frame = $("#svgedit_" + id); if (frame.attr('src')) { frame.load(function () { initEmbed(id, value, hide_menu, hide_image_tool, show_hyperlink_tool, url); }); } else { setTimeout(function () { attachLoadHandler(id, value, hide_menu, hide_image_tool, show_hyperlink_tool, url); }, 0); } } ; ;TI"dependency_digest;TI"%2d1abebdcf0bdcf4b382963a8a25dc8c;FI"required_paths;T[I"X/home/dantemss/Desktop/sketchily/vendor/assets/javascripts/svg-edit-2.6/embedapi.js;FI"P/home/dantemss/Desktop/sketchily/app/assets/javascripts/sketchily/base64.js;FI"O/home/dantemss/Desktop/sketchily/app/assets/javascripts/sketchily_embed.js;FI"dependency_paths;T[{I" path;TI"O/home/dantemss/Desktop/sketchily/app/assets/javascripts/sketchily_embed.js;FI" mtime;TI"2013-10-10T17:23:44-05:00;TI" digest;TI"%036b14d3f55425ee9c3b9e8864bba827;F{I" path;TI"X/home/dantemss/Desktop/sketchily/vendor/assets/javascripts/svg-edit-2.6/embedapi.js;FI" mtime;TI"2013-01-15T22:00:51-06:00;TI" digest;TI"%8dbef870b6b06c157bc483c50a097b94;F{I" path;TI"P/home/dantemss/Desktop/sketchily/app/assets/javascripts/sketchily/base64.js;FI" mtime;TI"2013-03-04T19:06:38-06:00;TI" digest;TI"%a6fb01009d50fb000f0f33a1d4c1e3d6;FI" _version;TI"%ac1cd7cf9811f9938e2b8937c60a24e6;F