From 46f1eb41396b3a6e8f45d7b6886f9f46ae3e7039 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sat, 26 Mar 2011 15:08:39 +0000 Subject: [PATCH] Add toggle functionality for users --- static/js/pad_editbar.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/static/js/pad_editbar.js b/static/js/pad_editbar.js index ef89478f7..f63b5b5f1 100644 --- a/static/js/pad_editbar.js +++ b/static/js/pad_editbar.js @@ -79,8 +79,19 @@ var padeditbar = (function(){ toolbarClick: function(cmd) { if (self.isEnabled()) { if (cmd == 'showusers') { - $('#editbar').animate({height:'72px'}); - $('#editorcontainerbox').animate({top:'72px'}); + // 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'}); + } + else + { + // increase the size of the editbar + $('#editbar').animate({height:'36px'}); + $('#editorcontainerbox').animate({top:'36px'}); + } } if (cmd == 'save') { padsavedrevs.saveNow();