diff --git a/src/interface/static/js/pyshelf_ux.js b/src/interface/static/js/pyshelf_ux.js index d01ee66..84f989a 100755 --- a/src/interface/static/js/pyshelf_ux.js +++ b/src/interface/static/js/pyshelf_ux.js @@ -33,9 +33,6 @@ $(document).ready(function(){ $(this).removeAttr("disabled"); } }); -// $('#app').css("height", max_height); -// $('.nav_l').css("max-height", max_height); -// $('div.shelf').css("max-height", max_height); $('.nav_link').on('mouseover', function (e){ var popover_str = $(this).attr('alt'); x = $(this).offset().left @@ -91,8 +88,51 @@ $(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'); + }); + + $('#coll_button').on('click', function(){ + var isopen = $('#pop_over_0').dialog("isOpen") + if (isopen){ + $('#pop_over_0').dialog("close"); + return + } + customlog(['Collections Clicked']); + $.ajax({ + type: "GET", url: "/live", data: {hook: 'collection_listing'}, + success: function(response){ + // Set the dialog title + $('#pop_over_0').dialog({ + title: "Collections", + maxHeight: win_height, + 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('