diff --git a/static/js/ace2_inner.js b/static/js/ace2_inner.js index 69fce950b..afafcec72 100644 --- a/static/js/ace2_inner.js +++ b/static/js/ace2_inner.js @@ -3464,6 +3464,9 @@ function OUTER(gscope) function handleClick(evt) { + //hide the dropdowns + window.top.padeditbar.toogleDropDown("none"); + inCallStack("handleClick", function() { idleWorkTimer.atMost(200); diff --git a/static/js/pad_editbar.js b/static/js/pad_editbar.js index 27753eec2..3a61d1af3 100644 --- a/static/js/pad_editbar.js +++ b/static/js/pad_editbar.js @@ -94,59 +94,17 @@ var padeditbar = (function() { if (self.isEnabled()) { - if (cmd == 'showusers') + if(cmd == "showusers") { - // show users shows the current users on teh pad - // get current height - var editbarheight = $('#users').css('display'); - if (editbarheight == "none") - { - // increase the size of the editbar - //$('#editbar').animate({height:'72px'}); - //$('#editorcontainerbox').animate({top:'72px'}); - $('#embed').slideUp("fast"); - $('#users').slideDown("fast"); - } - else - { - // increase the size of the editbar - //$('#editbar').animate({height:'36px'}); - //$('#editorcontainerbox').animate({top:'36px'}); - $('#users').slideUp("fast"); - } + self.toogleDropDown("users"); } - if (cmd == 'embed') + else if (cmd == 'embed') { - // embed shows the embed link - // get current height - var editbarheight = $('#embed').css('display'); - if (editbarheight == "none") - { - // increase the size of the editbar - //$('#editbar').animate({height:'72px'}); - $('#editorcontainerbox').animate( - { - top: '72px' - }); - // get the pad url - padurl = document.location; - // change the div contents to include the pad url in an input box - $('#embed').html('