From 8117834010f89cd6a73f2433498433a77865ddd8 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sat, 26 Mar 2011 16:00:04 +0000 Subject: [PATCH] Embed JS --- static/js/pad_editbar.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/static/js/pad_editbar.js b/static/js/pad_editbar.js index f63b5b5f1..562148ec2 100644 --- a/static/js/pad_editbar.js +++ b/static/js/pad_editbar.js @@ -93,6 +93,25 @@ var padeditbar = (function(){ $('#editorcontainerbox').animate({top:'36px'}); } } + if (cmd == 'embed') { + // get current height + var editbarheight = $('#editbar').css('height'); + if (editbarheight == "36px"){ + // increase the size of the editbar + $('#editbar').animate({height:'72px'}); + $('#editorcontainerbox').animate({top:'72px'}); + padurl = document.location; + $('#embed').html('Embed code:'); + $('#embed').show(); + } + else + { + // increase the size of the editbar + $('#editbar').animate({height:'36px'}); + $('#editorcontainerbox').animate({top:'36px'}); + $('#embed').hide(); + } + } if (cmd == 'save') { padsavedrevs.saveNow(); } else {