From 6d13693e584dd8c61abf7d39e30fb51b5358f319 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 9 Aug 2013 14:36:30 +0000 Subject: [PATCH] update edit panel (update methods) --- static/js/editPanel.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/static/js/editPanel.js b/static/js/editPanel.js index b3ceca64..def640af 100644 --- a/static/js/editPanel.js +++ b/static/js/editPanel.js @@ -295,12 +295,8 @@ pandora.ui.editPanel = function() { } }); that.updatePanel = function() { - getEdit(function() { - that.options({ - clips: edit.clips, - duration: edit.duration - }); - }); + Ox.Request.clearCache('getEdit'); + getEdit(updateClips); }; pandora.$ui.mainPanel.replaceElement(1, that); updateSmallTimelineURL(); @@ -364,6 +360,7 @@ pandora.ui.editPanel = function() { } function updateClips(clips) { + clips = clips || edit.clips; edit.clips = clips; edit.duration = 0; edit.clips.forEach(function(clip) { @@ -372,6 +369,7 @@ pandora.ui.editPanel = function() { }); that.options({ clips: Ox.clone(clips), + duration: edit.duration, smallTimelineURL: getSmallTimelineURL(), video: getVideos() }); @@ -405,6 +403,7 @@ pandora.ui.editPanel = function() { edit.duration += clip.duration; }); that.options({ + duration: edit.duration, smallTimelineURL: getSmallTimelineURL(), video: getVideos() });