diff --git a/pandora/0xdb.json b/pandora/0xdb.json index 9757c23..d51edcc 100644 --- a/pandora/0xdb.json +++ b/pandora/0xdb.json @@ -544,6 +544,7 @@ "videoScale": "fit", "videoMuted": false, "videoSize": "small", + "videoView": "player", "videoVolume": 1 }, "username": "" diff --git a/static/js/pandora/ui/list.js b/static/js/pandora/ui/list.js index 6479806..f086111 100644 --- a/static/js/pandora/ui/list.js +++ b/static/js/pandora/ui/list.js @@ -123,16 +123,29 @@ pandora.ui.list = function() { // fixme: remove view argument item: function(data, sort, size) { var icons = pandora.user.ui.icons, ratio = icons == 'posters' ? data.poster.width / data.poster.height : 1; - size = size || 128; + size = 128; return { - height: ratio <= 1 ? size : size / ratio, - id: data.id, - info: data[['title', 'director'].indexOf(sort[0].key) > -1 ? 'year' : sort[0].key], - title: data.title + (data.director.length ? ' (' + data.director.join(', ') + ')' : ''), - url: icons == 'posters' - ? '/' + data.id + '/poster' + size + '.jpg' - : '/' + data.id + '/icon' + size + '.jpg', - width: ratio >= 1 ? size : size * ratio + icon: { + height: ratio <= 1 ? size : size / ratio, + id: data.id, + info: data[['title', 'director'].indexOf(sort[0].key) > -1 ? 'year' : sort[0].key], + title: data.title + (data.director.length ? ' (' + data.director.join(', ') + ')' : ''), + url: icons == 'posters' + ? '/' + data.id + '/poster' + size + '.jpg' + : '/' + data.id + '/icon' + size + '.jpg', + width: ratio >= 1 ? size : size * ratio + }, + info: { + css: { + margin: '-4px 0 0 -4px' + }, + element: Ox.BlockVideoTimeline, + id: data.id, + options: { + duration: data.duration, + getImageURL: '/' + data.id + '/timeline16p.png' + } + } }; }, items: function(data, callback) { @@ -189,6 +202,9 @@ pandora.ui.list = function() { // fixme: remove view argument sort: pandora.user.ui.lists[pandora.user.ui.list].sort, unique: 'id' }).bindEvent({ + init: function(data) { + pandora.$ui.total.html(pandora.ui.status('total', data)); + }, open: function(data) { var id = data.ids[0], item = that.value(id, 'item'), diff --git a/static/js/pandora/ui/menu.js b/static/js/pandora/ui/menu.js index 1e77e45..c010151 100644 --- a/static/js/pandora/ui/menu.js +++ b/static/js/pandora/ui/menu.js @@ -79,13 +79,18 @@ pandora.ui.mainMenu = function() { }) } ] }, {}, - { id: 'openmovie', title: ['Open ' + pandora.site.itemName.singular, 'Open ' + pandora.site.itemName.plural], disabled: true, items: [ + { id: 'openmovie', title: ['Open ' + pandora.site.itemName.singular, 'Open ' + pandora.site.itemName.plural], items: [ { group: 'movieview', min: 1, max: 1, items: $.map(pandora.site.itemViews, function(view, i) { return Ox.extend({ checked: pandora.user.ui.itemView == view.id, }, view); }) }, ]}, + { id: 'openvideo', title: 'Open Video Links', items: [ + { group: 'videoview', min: 1, max: 1, items: ['player', 'editor'].map(function(view) { + return {id: view, title: Ox.toTitleCase(view), checked: pandora.user.ui.videoView == view}; + }) } + ] }, {}, { id: 'lists', title: 'Hide Lists', keyboard: 'shift l' }, { id: 'info', title: 'Hide Info', keyboard: 'shift i' }, diff --git a/static/js/pandora/ui/rightPanel.js b/static/js/pandora/ui/rightPanel.js index 914a33f..59ff50b 100644 --- a/static/js/pandora/ui/rightPanel.js +++ b/static/js/pandora/ui/rightPanel.js @@ -39,7 +39,11 @@ pandora.ui.rightPanel = function() { if (!pandora.user.ui.item) { pandora.resizeGroups(data); pandora.$ui.list.size(); - if (pandora.user.ui.lists[pandora.user.ui.list].listView == 'map') { + if (pandora.user.ui.lists[pandora.user.ui.list].listView == 'timelines') { + pandora.$ui.list.options({ + width: data + }); + } else if (pandora.user.ui.lists[pandora.user.ui.list].listView == 'map') { pandora.$ui.map.resizeMap(); } } else {