diff --git a/src/interface/static/js/pyshelf_ux.js b/src/interface/static/js/pyshelf_ux.js index 008cf3b..33e4116 100755 --- a/src/interface/static/js/pyshelf_ux.js +++ b/src/interface/static/js/pyshelf_ux.js @@ -88,11 +88,7 @@ $(document).ready(function(){ window.location.href="/flip_sort/"+$("#_order").val(); }); $('#search_string').html(" "+$('#_search').val().substr(0,15)+""); - $('#pop_over_0').dialog({ autoOpen: false }); - resize_search(); - $(window).resize(resize_search(win_width)); - $('#pop_over_0').on('click', 'div.collection', function(){ window.location.href = '/show_collection/'+$(this).attr('data'); }); @@ -102,7 +98,6 @@ $(document).ready(function(){ $('#pop_over_0').dialog("close"); return; } - customlog(['Login Clicked']); $.ajax({ type: "GET", url: "/live", data: {hook: 'register'}, success: function (response) { @@ -135,8 +130,42 @@ $(document).ready(function(){ }); }); $('#btn_logout').on('click', function() { - window.location.href = '/logout'; + //window.location.href = '/logout'; + var isopen = $('#pop_over_0').dialog("isOpen"); + if (isopen) { + $('#pop_over_0').dialog("close"); + return; + } + $('#pop_over_0').dialog({ + title: "User Controls", + maxHeight: (win_height - 100), + minWidth: $("#horiz_nav_main").width(), + hide: {effect: "blind", duration: 1000}, + show: {effect: "blind", duration: 1000}, + position: { + my: "top", at: "bottom", of: $("#horiz_nav_main") + } + }); + // clear and create a new container + $('#pop_over_0').html('