diff --git a/static/js/pandora/editPanel.js b/static/js/pandora/editPanel.js index 70864e77..11591eae 100644 --- a/static/js/pandora/editPanel.js +++ b/static/js/pandora/editPanel.js @@ -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) { diff --git a/static/js/pandora/folders.js b/static/js/pandora/folders.js index bcccf339..6afd7ae7 100644 --- a/static/js/pandora/folders.js +++ b/static/js/pandora/folders.js @@ -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,