set the correct map & calendar heights when viewing an item

This commit is contained in:
rolux 2012-04-23 06:31:44 +00:00
parent cad5b68925
commit cc3f2934bd

View file

@ -108,8 +108,10 @@ pandora.ui.navigationView = function(type, videoRatio) {
$element = Ox.Map({ $element = Ox.Map({
// clickable: pandora.site.capabilities.canClickMap[pandora.user.level], // clickable: pandora.site.capabilities.canClickMap[pandora.user.level],
find: ui.mapFind, find: ui.mapFind,
// 20 menu + 24 toolbar + 1 resizebar + 16 statusbar // 20 px menu + 24 px toolbar + 1px resizbar + 16px statusbar (if !item)
height: window.innerHeight - ui.showFilters * ui.filtersSize - 61, height: !ui.item
? window.innerHeight - ui.showFilters * ui.filtersSize - 61
: window.innerHeight - ui.showBrowser * (112 + Ox.UI.SCROLLBAR_SIZE) - 45,
places: function(data, callback) { places: function(data, callback) {
var itemsQuery; var itemsQuery;
if (!ui.item) { if (!ui.item) {
@ -165,9 +167,10 @@ pandora.ui.navigationView = function(type, videoRatio) {
$element = Ox.Calendar({ $element = Ox.Calendar({
date: new Date(0), date: new Date(0),
events: result.data.items, events: result.data.items,
// 20 px menu, 24 px toolbar, 1px resizbar, 16px statusbar // 20 px menu + 24 px toolbar + 1px resizbar + 16px statusbar (if !item)
height: window.innerHeight - ui.showFilters * ui.filtersSize height: !ui.item
- 45 - (ui.item ? 0 : 16), ? window.innerHeight - ui.showFilters * ui.filtersSize - 61
: window.innerHeight - ui.showBrowser * (112 + Ox.UI.SCROLLBAR_SIZE) - 45,
range: [-5000, 5000], range: [-5000, 5000],
showControls: ui.showCalendarControls, showControls: ui.showCalendarControls,
showToolbar: true, showToolbar: true,