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

- old
+ new

@@ -1,19 +1,19 @@ <% # This partial requires svgutils.js # # Clients of this partial must supply the following variables: # id # value - # show_menu + # hide_menu # hide_image_tool %> var svgCanvas_<%= id %> = null; function attachSubmitHandler_<%= id %>() { $("input#<%= id %>").closest("form").one("submit", function(event) { svgCanvas_<%= id %>.getSvgString()(handleSvgData_<%= id %>); - event.preventDefault(); + return false; }); } function handleSvgData_<%= id %>(data, error) { if (error) { @@ -34,15 +34,14 @@ doc = frame.contentDocument; if (!doc) { doc = frame.contentWindow.document; } - <% if show_menu %> + <% if hide_menu %> var mainButton = doc.getElementById('main_button'); - mainButton.style.display = 'block'; + mainButton.style.display = 'none'; var toolsTop = doc.getElementById('tools_top'); - toolsTop.style.left = '120px'; - toolsTop.style.right = '2px'; + toolsTop.style.left = '0px'; <% end %> <% if hide_image_tool %> var imageTool = doc.getElementById('tool_image'); imageTool.style.display = 'none';