only check for status changes if item has files

This commit is contained in:
j 2015-02-04 08:29:08 +00:00
parent e3a686601b
commit 1be9bb04a8
3 changed files with 6 additions and 4 deletions

View file

@ -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') {

View file

@ -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());
}
}
});

View file

@ -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')
);
}
};