diff --git a/pandora/0xdb.jsonc b/pandora/0xdb.jsonc index ec02b8db..41b288f4 100644 --- a/pandora/0xdb.jsonc +++ b/pandora/0xdb.jsonc @@ -13,6 +13,7 @@ for items of a rights level up to and including x */ "capabilities": { + // "canClickMap": {"friend": true, "staff": true, "admin": true}, "canDeleteItems": {"admin": true}, "canDownloadVideo": {"guest": 0, "member": 0, "friend": 4, "staff": 4, "admin": 4}, "canEditMetadata": {"staff": true, "admin": true}, diff --git a/static/js/pandora/URL.js b/static/js/pandora/URL.js index 22f8f757..3f4f49a7 100644 --- a/static/js/pandora/URL.js +++ b/static/js/pandora/URL.js @@ -226,7 +226,7 @@ pandora.URL = (function() { }); if (!pandora.$ui.appPanel && state.item && find) { - // on page load, if item is set and there is or was a query, + // on page load, if item is set and there was a query, // we have to check if the item actually matches the query, // and otherwise reset find pandora.api.find({ diff --git a/static/js/pandora/item.js b/static/js/pandora/item.js index ca570560..03b70df6 100644 --- a/static/js/pandora/item.js +++ b/static/js/pandora/item.js @@ -6,9 +6,9 @@ pandora.ui.item = function() { pandora.api.get({ id: pandora.user.ui.item, - keys: ['video', 'timeline'].indexOf(pandora.user.ui.itemView) > -1 ? - [ 'cuts', 'duration', 'layers', 'parts', 'rendered', 'rightslevel', 'size', 'title', 'videoRatio'] : [] - }, pandora.user.level == 'admin' && pandora.user.ui.itemView == 'info' ? 0 : -1, function(result) { + keys: ['video', 'timeline'].indexOf(pandora.user.ui.itemView) > -1 + ? [ 'cuts', 'director', 'duration', 'layers', 'parts', 'rendered', 'rightslevel', 'size', 'title', 'videoRatio', 'year'] : [] + }, pandora.user.ui.itemView == 'info' && pandora.site.capabilities.canEditMetadata[pandora.user.level] ? 0 : -1, function(result) { if (result.status.code == 200) { // fixme: can the history state title get updated too? @@ -27,6 +27,14 @@ pandora.ui.item = function() { ); }*/ + pandora.$ui.itemTitle + .options({ + title: '' + result.data.title + + (result.data.director ? ' (' + result.data.director.join(', ') + ')' : '') + + (result.data.year ? ' ' + result.data.year : '') + '' + }) + .show(); + if (['video', 'timeline'].indexOf(pandora.user.ui.itemView) > -1) { // fixme: layers have value, subtitles has text? var subtitles = result.data.layers.subtitles diff --git a/static/js/pandora/navigationView.js b/static/js/pandora/navigationView.js index edebf375..389cdc80 100644 --- a/static/js/pandora/navigationView.js +++ b/static/js/pandora/navigationView.js @@ -15,21 +15,25 @@ pandora.ui.navigationView = function(type, videoRatio) { $element = Ox.Element(), - $itemIcon = $('') + $itemIcon = type == 'map' ? $('') .addClass('OxFlag') .attr({ - src: type == 'map' - ? Ox.getImageByGeoname('icon', 16, '') - : '/static/png/icon16.png' + src: Ox.getImageByGeoname('icon', 16, '') }) - .css({float: 'left', margin: '4px'}), + .css({float: 'left', margin: '2px'}) : '', $itemLabel = Ox.Label({ textAlign: 'center', title: '', - width: 96 + Ox.UI.SCROLLBAR_SIZE + width: 0 // 76 + Ox.UI.SCROLLBAR_SIZE + }) + .css({ + position: 'absolute', + left: 4 + !!ui.item * 20 + (type == 'map') * 20 + 'px', + top: '4px', + right: '24px', + width: 'auto' }) - .css({float: 'left', margin: '4px 0 4px 0'}) .bindEvent({ singleclick: function() { $element[type == 'map' ? 'panToPlace' : 'panToEvent'](); @@ -43,7 +47,7 @@ pandora.ui.navigationView = function(type, videoRatio) { title: 'close', type: 'image' }) - .css({float: 'left', margin: '4px'}) + .css({float: 'right', margin: '2px'}) .bindEvent({ click: function() { $element.options({selected: null}); @@ -52,6 +56,8 @@ pandora.ui.navigationView = function(type, videoRatio) { }), $item = $('