forked from 0x2620/pandora
isClipView/isVideoView: if no arguments are present, take into account ui.section
This commit is contained in:
parent
5c5102baf0
commit
d4a206a41a
1 changed files with 14 additions and 10 deletions
|
@ -1860,11 +1860,13 @@ pandora.hasPlacesLayer = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
pandora.isClipView = function(view, item) {
|
pandora.isClipView = function(view, item) {
|
||||||
if (arguments.length == 0) {
|
if (pandora.user.ui.section == 'items') {
|
||||||
item = pandora.user.ui.item;
|
if (arguments.length == 0) {
|
||||||
view = !item ? pandora.user.ui.listView : pandora.user.ui.itemView;
|
item = pandora.user.ui.item;
|
||||||
} else if (arguments.length == 1) {
|
view = !item ? pandora.user.ui.listView : pandora.user.ui.itemView;
|
||||||
item = pandora.user.ui.item;
|
} else if (arguments.length == 1) {
|
||||||
|
item = pandora.user.ui.item;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
!item ? ['calendar', 'clip', 'map'] : ['calendar', 'clips', 'map']
|
!item ? ['calendar', 'clip', 'map'] : ['calendar', 'clips', 'map']
|
||||||
|
@ -1889,11 +1891,13 @@ pandora.isPrintURL = function(url) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pandora.isVideoView = function(view, item) {
|
pandora.isVideoView = function(view, item) {
|
||||||
if (arguments.length == 0) {
|
if (pandora.user.ui.section == 'items') {
|
||||||
item = pandora.user.ui.item;
|
if (arguments.length == 0) {
|
||||||
view = !item ? pandora.user.ui.listView : pandora.user.ui.itemView;
|
item = pandora.user.ui.item;
|
||||||
} else if (arguments.length == 1) {
|
view = !item ? pandora.user.ui.listView : pandora.user.ui.itemView;
|
||||||
item = pandora.user.ui.item;
|
} else if (arguments.length == 1) {
|
||||||
|
item = pandora.user.ui.item;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
!item ? ['video'] : ['player', 'editor', 'timeline']
|
!item ? ['video'] : ['player', 'editor', 'timeline']
|
||||||
|
|
Loading…
Reference in a new issue