always go to availabale item view after upload
This commit is contained in:
parent
a32435b577
commit
f6b28485e1
1 changed files with 7 additions and 7 deletions
|
@ -6,6 +6,7 @@ pandora.ui.uploadVideoDialog = function(data) {
|
|||
var cancelled = false,
|
||||
file,
|
||||
hasFirefogg = !(typeof Firefogg == 'undefined'),
|
||||
itemView = pandora.site.capabilities.canSeeExtraItemViews[pandora.user.level] ? 'media' : 'info',
|
||||
selectFile,
|
||||
$actionButton,
|
||||
$closeButton,
|
||||
|
@ -177,13 +178,12 @@ pandora.ui.uploadVideoDialog = function(data) {
|
|||
done: function(data) {
|
||||
if (data.progress == 1) {
|
||||
Ox.Request.clearCache();
|
||||
if (pandora.user.ui.item == item && pandora.user.ui.itemView == 'media') {
|
||||
if (pandora.user.ui.item == item && pandora.user.ui.itemView == itemView) {
|
||||
pandora.$ui.item.reload();
|
||||
} else {
|
||||
pandora.UI.set({
|
||||
item: item,
|
||||
itemView: pandora.site.capabilities.canSeeExtraItemViews[pandora.user.level]
|
||||
? 'media' : 'info'
|
||||
itemView: itemView
|
||||
});
|
||||
}
|
||||
delete pandora.firefogg;
|
||||
|
@ -233,12 +233,12 @@ pandora.ui.uploadVideoDialog = function(data) {
|
|||
done: function(data) {
|
||||
if (data.progress == 1) {
|
||||
Ox.Request.clearCache();
|
||||
if (pandora.user.ui.item == item && pandora.user.ui.itemView == 'media') {
|
||||
if (pandora.user.ui.item == item && pandora.user.ui.itemView == itemView) {
|
||||
pandora.$ui.item.reload();
|
||||
} else {
|
||||
pandora.UI.set({
|
||||
item: item,
|
||||
itemView: 'media'
|
||||
itemView: itemView
|
||||
});
|
||||
}
|
||||
that.close();
|
||||
|
@ -259,7 +259,7 @@ pandora.ui.uploadVideoDialog = function(data) {
|
|||
} else {
|
||||
pandora.UI.set({
|
||||
item: result.data.items[0].item,
|
||||
itemView: 'media'
|
||||
itemView: itemView
|
||||
});
|
||||
that.close();
|
||||
}
|
||||
|
@ -427,7 +427,7 @@ pandora.ui.uploadVideoDialog = function(data) {
|
|||
}, function(result) {
|
||||
pandora.UI.set({
|
||||
item: result.data.items[0].id,
|
||||
itemView: 'media'
|
||||
itemView: itemView
|
||||
});
|
||||
delete pandora.firefogg;
|
||||
that.close();
|
||||
|
|
Loading…
Reference in a new issue