diff --git a/static/js/pandora/clipsView.js b/static/js/pandora/clipsView.js new file mode 100644 index 000000000..4bbec91a0 --- /dev/null +++ b/static/js/pandora/clipsView.js @@ -0,0 +1,23 @@ +pandora.ui.clipsView = function(videoRatio) { + + var that = Ox.SplitPanel({ + elements: [ + { + element: Ox.Bar({size: 24}) + .append( + pandora.$ui.sortSelect = pandora.ui.sortSelect() + ) + .append( + pandora.$ui.orderButton = pandora.ui.orderButton() + ) + }, + { + element: pandora.$ui.clipList = pandora.ui.clipList(videoRatio); + } + ], + orientation: 'vertical' + }); + + return that; + +}; \ No newline at end of file diff --git a/static/js/pandora/item.js b/static/js/pandora/item.js index 77cce5874..ca570560c 100644 --- a/static/js/pandora/item.js +++ b/static/js/pandora/item.js @@ -144,7 +144,7 @@ pandora.ui.item = function() { } else if (pandora.user.ui.itemView == 'clips') { pandora.$ui.contentPanel.replaceElement(1, - pandora.$ui.clips = pandora.ui.clipList(result.data.videoRatio) + pandora.ui.clipsView(result.data.videoRatio) ); } else if (pandora.user.ui.itemView == 'video') { diff --git a/static/js/pandora/rightPanel.js b/static/js/pandora/rightPanel.js index 3a8ab3362..1fbfec86c 100644 --- a/static/js/pandora/rightPanel.js +++ b/static/js/pandora/rightPanel.js @@ -43,7 +43,7 @@ pandora.ui.rightPanel = function() { } else { pandora.$ui.browser.scrollToSelection(); if (pandora.user.ui.itemView == 'clips') { - pandora.$ui.clips.size(); + pandora.$ui.clipList.size(); } else if (pandora.user.ui.itemView == 'video') { pandora.$ui.player.options({width: data.size}); } else if (pandora.user.ui.itemView == 'timeline') { diff --git a/static/js/pandora/toolbar.js b/static/js/pandora/toolbar.js index be7d9f27a..3120d96c9 100644 --- a/static/js/pandora/toolbar.js +++ b/static/js/pandora/toolbar.js @@ -13,12 +13,12 @@ pandora.ui.toolbar = function() { that.append( pandora.$ui.viewSelect = pandora.ui.viewSelect() ); - if (!ui.item || pandora.isClipView()) { + if (!ui.item && pandora.isClipView()) { that.append( pandora.$ui.sortSelect = pandora.ui.sortSelect() ); } - if (!ui.item || pandora.isClipView()) { + if (!ui.item && pandora.isClipView()) { that.append( pandora.$ui.orderButton = pandora.ui.orderButton() ); diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index a8754b279..19d81bc6e 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -817,7 +817,7 @@ pandora.resizeWindow = function() { if (pandora.user.ui.itemView == 'info') { pandora.$ui.info.resize(); } else if (pandora.user.ui.itemView == 'clips') { - pandora.$ui.clips.size(); + pandora.$ui.clipList.size(); } else if (pandora.user.ui.itemView == 'video') { pandora.$ui.player.options({ // fixme: duplicated