fixing bugs in menu and info view
This commit is contained in:
parent
c695e76a57
commit
2f0dc60ddd
2 changed files with 17 additions and 13 deletions
|
@ -292,9 +292,9 @@ pandora.ui.infoView = function(data) {
|
||||||
.css(css)
|
.css(css)
|
||||||
.appendTo($text);
|
.appendTo($text);
|
||||||
html = [];
|
html = [];
|
||||||
['genre', 'keywords'].forEach(function(key) {
|
['genre', 'keyword'].forEach(function(key) {
|
||||||
data[key] && html.push(
|
data[key] && html.push(
|
||||||
formatKey(key)
|
formatKey(key == 'keyword' ? 'keywords' : key)
|
||||||
+ formatValue(data[key], key)
|
+ formatValue(data[key], key)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -282,6 +282,7 @@ pandora.ui.mainMenu = function() {
|
||||||
if (!!data.value != !!data.previousValue) {
|
if (!!data.value != !!data.previousValue) {
|
||||||
that[data.value ? 'disableItem' : 'enableItem']('showgroups');
|
that[data.value ? 'disableItem' : 'enableItem']('showgroups');
|
||||||
that[data.value ? 'enableItem' : 'disableItem']('showbrowser');
|
that[data.value ? 'enableItem' : 'disableItem']('showbrowser');
|
||||||
|
that.replaceMenu('sortMenu', getSortMenu());
|
||||||
}
|
}
|
||||||
if (!data.value) {
|
if (!data.value) {
|
||||||
that.disableItem('showannotations');
|
that.disableItem('showannotations');
|
||||||
|
@ -360,17 +361,20 @@ pandora.ui.mainMenu = function() {
|
||||||
var ui = pandora.user.ui,
|
var ui = pandora.user.ui,
|
||||||
isClipView = pandora.isClipView(ui.listView);
|
isClipView = pandora.isClipView(ui.listView);
|
||||||
return { id: 'sortMenu', title: 'Sort', items: [
|
return { id: 'sortMenu', title: 'Sort', items: [
|
||||||
{ id: 'sortmovies', title: 'Sort ' + (isClipView ? 'Clips' : pandora.site.itemName.plural) + ' by', items: [
|
{ id: 'sortmovies', title: 'Sort ' + (isClipView || ui.item ? 'Clips' : pandora.site.itemName.plural) + ' by', items: [
|
||||||
{ group: 'sortmovies', min: 1, max: 1, items: Ox.merge(isClipView ? Ox.merge(pandora.site.clipKeys.map(function(key) {
|
{ group: 'sortmovies', min: 1, max: 1, items: Ox.merge(
|
||||||
return Ox.extend(Ox.clone(key), {
|
isClipView ? pandora.site.clipKeys.map(function(key) {
|
||||||
checked: ui.listSort[0].key == key.id,
|
return Ox.extend(Ox.clone(key), {
|
||||||
title: 'Clip ' + key.title
|
checked: ui.listSort[0].key == key.id,
|
||||||
});
|
title: 'Clip ' + key.title
|
||||||
}), /*{}*/[]) : [], pandora.site.sortKeys.map(function(key) {
|
});
|
||||||
return Ox.extend({
|
}) : [],
|
||||||
checked: ui.listSort[0].key == key.id
|
!ui.item ? pandora.site.sortKeys.map(function(key) {
|
||||||
}, key);
|
return Ox.extend({
|
||||||
})) }
|
checked: ui.listSort[0].key == key.id
|
||||||
|
}, key);
|
||||||
|
}) : []
|
||||||
|
) }
|
||||||
] },
|
] },
|
||||||
{ id: 'ordermovies', title: 'Order ' + (isClipView ? 'Clips' : pandora.site.itemName.plural), items: [
|
{ id: 'ordermovies', title: 'Order ' + (isClipView ? 'Clips' : pandora.site.itemName.plural), items: [
|
||||||
{ group: 'ordermovies', min: 1, max: 1, items: [
|
{ group: 'ordermovies', min: 1, max: 1, items: [
|
||||||
|
|
Loading…
Reference in a new issue