From c5e5f1ef2c79447b87c646f8207f1d4540f6789a Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Sat, 6 Feb 2010 01:44:41 -0600 Subject: [PATCH] Yet Another "Focus" Tweak I'm not that happy with passing the SVG as a Base64-encoded query-parameter. Will have to fix that, too... --- public/javascripts/page_helper.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/javascripts/page_helper.js b/public/javascripts/page_helper.js index d769c4f4..c4ed6e18 100644 --- a/public/javascripts/page_helper.js +++ b/public/javascripts/page_helper.js @@ -83,10 +83,13 @@ function setupSVGedit(path){ SVGeditButton.disabled = true; Event.observe(SVGeditButton, 'click', function(){ if (selected) { - var editor = window.open(path +'?source=data:image/svg+xml;base64,' + window.btoa(selected), 'Spoons!'); + var editor = window.open(path +'?source=data:image/svg+xml;base64,' + window.btoa(selected), + 'Editing Existing SVG Graphic'); } else { - var editor = window.open(path, 'Spoons!'); + var editor = window.open(path, 'Creating New SVG graphic'); } + SVGeditButton.disabled = true; + SVGeditButton.value = 'Create SVG graphic'; editor.focus(); }); }