navigation view: handle embed case

This commit is contained in:
rolux 2013-03-01 11:24:22 +00:00
parent 9b744ee8ce
commit bb470c37a1

View file

@ -5,9 +5,8 @@
pandora.ui.navigationView = function(type, videoRatio) { pandora.ui.navigationView = function(type, videoRatio) {
var ui = pandora.user.ui, var ui = pandora.user.ui,
isEmbed = pandora.isEmbedURL(),
itemName = type == 'map' ? 'place' : 'event', itemName = type == 'map' ? 'place' : 'event',
listSizes = [ listSizes = [
144 + Ox.UI.SCROLLBAR_SIZE, 144 + Ox.UI.SCROLLBAR_SIZE,
280 + Ox.UI.SCROLLBAR_SIZE, 280 + Ox.UI.SCROLLBAR_SIZE,
@ -83,7 +82,7 @@ pandora.ui.navigationView = function(type, videoRatio) {
} }
}), }),
that = Ox.SplitPanel({ that = !isEmbed ? Ox.SplitPanel({
elements: [ elements: [
{ {
element: $element element: $element
@ -97,6 +96,17 @@ pandora.ui.navigationView = function(type, videoRatio) {
} }
], ],
orientation: 'horizontal' orientation: 'horizontal'
}) : Ox.SplitPanel({
elements: [
{
element: $element
},
{
element: $listPanel,
size: 188 + Ox.UI.SCROLLBAR_SIZE
}
],
orientation: 'vertical'
}); });
if (type == 'map') { if (type == 'map') {
@ -106,8 +116,8 @@ pandora.ui.navigationView = function(type, videoRatio) {
// clickable: pandora.site.capabilities.canClickMap[pandora.user.level], // clickable: pandora.site.capabilities.canClickMap[pandora.user.level],
find: ui.mapFind, find: ui.mapFind,
// 20 px menu + 24 px toolbar + 1px resizbar + 16px statusbar (if !item) // 20 px menu + 24 px toolbar + 1px resizbar + 16px statusbar (if !item)
height: !ui.item height: isEmbed ? window.innerHeight - 40
? window.innerHeight - ui.showFilters * ui.filtersSize - 61 : !ui.item ? window.innerHeight - ui.showFilters * ui.filtersSize - 61
: window.innerHeight - ui.showBrowser * (112 + Ox.UI.SCROLLBAR_SIZE) - 45, : window.innerHeight - ui.showBrowser * (112 + Ox.UI.SCROLLBAR_SIZE) - 45,
places: function(data, callback) { places: function(data, callback) {
var itemsQuery; var itemsQuery;
@ -128,7 +138,8 @@ pandora.ui.navigationView = function(type, videoRatio) {
showLabels: ui.showMapLabels, showLabels: ui.showMapLabels,
showTypes: true, showTypes: true,
toolbar: true, toolbar: true,
width: window.innerWidth - ui.showSidebar * ui.sidebarSize - listSize - 2, width: isEmbed ? window.innerWidth
: window.innerWidth - ui.showSidebar * ui.sidebarSize - listSize - 2,
zoombar: true zoombar: true
}) })
.bindEvent({ .bindEvent({