app/views/sketchily/_embed.js.erb~ in sketchily-0.2.0 vs app/views/sketchily/_embed.js.erb~ in sketchily-0.3.0

- old
+ new

@@ -2,11 +2,12 @@ # # Clients of this partial must supply the following variables: # id # value # hide_menu - # hide_image_tool %> + # hide_image_tool + # hide_hyperlink_tool %> var svgCanvas_<%= id %> = null; function attachSubmitHandler_<%= id %>() { $("input#<%= id %>").closest("form").one("submit", function(event) { @@ -36,17 +37,22 @@ doc = frame.contentWindow.document; } <% if hide_menu %> var mainButton = doc.getElementById('main_button'); - mainButton.style.display = 'none'; + mainButton.parentNode.removeChild(mainButton); var toolsTop = doc.getElementById('tools_top'); - toolsTop.style.left = '0px'; + toolsTop.style.left = '5px'; <% end %> <% if hide_image_tool %> var imageTool = doc.getElementById('tool_image'); - imageTool.style.display = 'none'; + imageTool.parentNode.removeChild(imageTool); + <% end %> + + <% if hide_hyperlink_tool %> + var hyperlinkTool = doc.getElementById('tool_make_link'); + //hyperlinkTool.parentNode.removeChild(hyperlinkTool); <% end %> attachSubmitHandler_<%= id %>(); svgCanvas_<%= id %>.setSvgString(svgedit.utilities.decode64("<%= value.try(:squish) %>"));