From 1be9bb04a8ca18ecb61094b277cb2ab278dd0212 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 4 Feb 2015 08:29:08 +0000 Subject: [PATCH] only check for status changes if item has files --- static/js/item.js | 4 ++-- static/js/mediaView.js | 2 ++ static/js/utils.js | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/static/js/item.js b/static/js/item.js index 107b84bac..458acafcb 100644 --- a/static/js/item.js +++ b/static/js/item.js @@ -53,7 +53,7 @@ pandora.ui.item = function() { +'{1} view.', [result.data.title, Ox._(pandora.user.ui.itemView)]) ) ); - pandora.updateStatus(pandora.user.ui.item); + result.data.parts > 0 && pandora.updateStatus(pandora.user.ui.item); } else if (pandora.user.ui.itemView == 'info') { pandora.$ui.contentPanel.replaceElement(1, @@ -64,7 +64,7 @@ pandora.ui.item = function() { } }) ); - !result.data.rendered && pandora.updateStatus(pandora.user.ui.item); + !result.data.rendered && result.data.parts > 0 && pandora.updateStatus(pandora.user.ui.item); } else if (pandora.user.ui.itemView == 'documents') { diff --git a/static/js/mediaView.js b/static/js/mediaView.js index cd2818add..f147da230 100644 --- a/static/js/mediaView.js +++ b/static/js/mediaView.js @@ -651,6 +651,8 @@ pandora.ui.mediaView = function(options) { Ox.Request.clearCache(); pandora.updateItemContext(); pandora.$ui.info && pandora.$ui.info.updateInfo(); + pandora.$ui.mainPanel.replaceElement(1, + pandora.$ui.rightPanel = pandora.ui.rightPanel()); } } }); diff --git a/static/js/utils.js b/static/js/utils.js index de19bbfeb..ae3108a14 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -2353,8 +2353,8 @@ pandora.updateStatus = function(item) { function isActive() { return ui.item == item && [ 'info', 'player', 'editor', 'timeline' - ].indexOf(ui.itemView) > -1 && ( - !pandora.$ui.uploadVideoDialog || pandora.$ui.uploadVideoDialog.is('::visible') + ].indexOf(ui.itemView) > -1 && !( + pandora.$ui.uploadVideoDialog && pandora.$ui.uploadVideoDialog.is('::visible') ); } };