update edit panel (sort & view)

This commit is contained in:
rolux 2013-08-07 15:10:11 +00:00
parent f032d19abf
commit c3fd2a31b5

View file

@ -60,9 +60,9 @@ pandora.ui.editPanel = function() {
that = pandora.$ui.editPanel = Ox.VideoEditPanel({ that = pandora.$ui.editPanel = Ox.VideoEditPanel({
clips: Ox.clone(edit.clips), clips: Ox.clone(edit.clips),
clipSize: listSize, clipSize: listSize,
clipSort: ui.clipSort, clipSort: ui.edits[ui.edit].sort,
clipSortOptions: [/*...*/], clipSortOptions: [/*...*/],
clipView: ui.editView, clipView: ui.edits[ui.edit].view,
duration: edit.duration, duration: edit.duration,
editable: edit.editable, editable: edit.editable,
enableSubtitles: ui.videoSubtitles, enableSubtitles: ui.videoSubtitles,
@ -86,7 +86,7 @@ pandora.ui.editPanel = function() {
showClips: ui.showClips, showClips: ui.showClips,
showTimeline: ui.showTimeline, showTimeline: ui.showTimeline,
smallTimelineURL: getSmallTimelineURL(), smallTimelineURL: getSmallTimelineURL(),
sort: ui.clipSort, sort: ui.edits[ui.edit].sort,
sortOptions: [ sortOptions: [
{id: 'index', title: Ox._('Sort Manually'), operator: '+'} {id: 'index', title: Ox._('Sort Manually'), operator: '+'}
].concat( ].concat(
@ -248,7 +248,7 @@ pandora.ui.editPanel = function() {
pandora.UI.set({clipSize: data.size}); pandora.UI.set({clipSize: data.size});
}, },
sort: function(data) { sort: function(data) {
pandora.UI.set({clipSort: data}); pandora.UI.set(editsKey('sort'), data);
var key = data[0].key; var key = data[0].key;
if (key == 'position') { if (key == 'position') {
key = 'in'; key = 'in';
@ -288,7 +288,7 @@ pandora.ui.editPanel = function() {
pandora.UI.set({showTimeline: data.showTimeline}); pandora.UI.set({showTimeline: data.showTimeline});
}, },
view: function(data) { view: function(data) {
pandora.UI.set({editView: data.view}); pandora.UI.set(editsKey('view'), data.view);
data.view == 'grid' && enableDragAndDrop(); data.view == 'grid' && enableDragAndDrop();
}, },
volume: function(data) { volume: function(data) {
@ -305,7 +305,7 @@ pandora.ui.editPanel = function() {
} }
}) })
); );
ui.editView == 'grid' && enableDragAndDrop(); ui.edits[ui.edit].view == 'grid' && enableDragAndDrop();
}); });
} }