add edit overview placeholder

This commit is contained in:
j 2013-07-14 17:22:26 +00:00
parent 8b9aef56b4
commit 90cde2771f
2 changed files with 47 additions and 1 deletions

View file

@ -14,7 +14,7 @@ pandora.ui.editPanel = function() {
smallTimelineContext,
that = Ox.Element();
ui.edit && render();
ui.edit ? render() : renderOverview();
function editPointsKey(key) {
return 'editPoints.' + ui.edit.replace(/\./g, '\\.') + '.' + key;
@ -255,6 +255,41 @@ pandora.ui.editPanel = function() {
updateSmallTimelineURL();
});
}
function renderOverview() {
that = Ox.IconList({
borderRadius: 16,
defaultRatio: 1,
draggable: true,
item: function(data, sort, size) {
size = size || 128;
var ui = pandora.user.ui,
url = '/edit/' + data.id + '/icon'+size+'.jpg?' + data.modified,
info = Ox.formatDuration(data.duration);
return {
height: size,
id: data.id,
title: data.name,
info: info,
url: url,
width: size,
}
},
items: function(data, callback) {
pandora.api.findEdits(data, callback);
return Ox.clone(data, true);
},
keys: ['id', 'modified', 'name', 'duration'],
size: 128,
sort: [{key: 'id', operator: '+'}],
unique: 'id'
})
.addClass('OxMedia')
.bindEvent({
open: function(data) {
pandora.UI.set('edit', data.ids[0]);
}
});
}
function orderClips(ids) {
edit.clips.forEach(function(clip) {

View file

@ -380,6 +380,17 @@ pandora.ui.folders = function() {
});
}
that.bindEvent({
pandora_edit: function() {
if (!pandora.user.ui.edit) {
Ox.forEach(pandora.$ui.folderList, function($list, id) {
$list.options('selected', []);
});
} else {
Ox.forEach(pandora.$ui.folderList, function($list, id) {
$list.options('selected', [pandora.user.ui.edit]);
});
}
},
pandora_find: function() {
var folder = pandora.getListData().folder,
list = pandora.user.ui._list,