From ea93fcf35e38d12f48cc850f0a05d7eeb0b5215d Mon Sep 17 00:00:00 2001 From: sam Date: Sun, 29 Apr 2012 02:28:12 +0700 Subject: [PATCH] Fix paste link overlay bug --- static/js/behavior.js | 9 ++++----- views/paste.tpl | 7 ++++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/static/js/behavior.js b/static/js/behavior.js index 2e55443..efd40e4 100644 --- a/static/js/behavior.js +++ b/static/js/behavior.js @@ -135,9 +135,6 @@ if (content && key) { if (!error) { - ZeroClipboard.setMoviePath('/static/js/ZeroClipboard.swf' ); - var clip = new ZeroClipboard.Client(); - $('#short-url').click(function(e) { e.preventDefault(); $('#short-url').text('Loading short url...'); @@ -154,6 +151,8 @@ if (content && key) { prettyPrint(); /* Setup flash clipboard button */ + ZeroClipboard.setMoviePath('/static/js/ZeroClipboard.swf' ); + var clip = new ZeroClipboard.Client(); clip.addEventListener('onMouseUp', function(){ clip.setText($('#paste-content').text()); @@ -202,8 +201,8 @@ $('.previous-pastes .items').html(zerobin.get_pastes()); $('.btn-clone').click(function(e){ e.preventDefault(); var content_clone = '' ; - $("#paste-content li").each(function(index) { - content_clone = content_clone + $(this).text() + '\n'; + $("#paste-content li").each(function(index) { + content_clone = content_clone + $(this).text() + '\n'; }); $('.submit-form').show(); $('.paste-form').remove(); diff --git a/views/paste.tpl b/views/paste.tpl index c5eb3d5..80a0ade 100644 --- a/views/paste.tpl +++ b/views/paste.tpl @@ -22,11 +22,12 @@

- Get short url | Copy To Clipboard - + | + Get short url +