add timelines view (draft)
This commit is contained in:
parent
4466524e23
commit
f189b32dc9
4 changed files with 37 additions and 11 deletions
|
@ -544,6 +544,7 @@
|
|||
"videoScale": "fit",
|
||||
"videoMuted": false,
|
||||
"videoSize": "small",
|
||||
"videoView": "player",
|
||||
"videoVolume": 1
|
||||
},
|
||||
"username": ""
|
||||
|
|
|
@ -123,8 +123,9 @@ 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 {
|
||||
icon: {
|
||||
height: ratio <= 1 ? size : size / ratio,
|
||||
id: data.id,
|
||||
info: data[['title', 'director'].indexOf(sort[0].key) > -1 ? 'year' : sort[0].key],
|
||||
|
@ -133,6 +134,18 @@ pandora.ui.list = function() { // fixme: remove view argument
|
|||
? '/' + 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'),
|
||||
|
|
|
@ -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' },
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue