forked from 0x2620/pandora
update the view menu's show entries (breaks info panel)
This commit is contained in:
parent
56ffec0212
commit
883e9d58e6
13 changed files with 110 additions and 111 deletions
|
|
@ -259,7 +259,7 @@ Ox.FilesView = function(options, self) {
|
|||
self.$checkbox = Ox.Checkbox({
|
||||
checked: false,
|
||||
id: 'go',
|
||||
title: 'Go to this movie after moving files', // fixme: wrong, can be 'Go to video' etc
|
||||
title: 'Switch to this movie after moving files', // fixme: wrong, can be 'Go to video' etc
|
||||
width: 240
|
||||
});
|
||||
|
||||
|
|
@ -305,8 +305,8 @@ Ox.FilesView = function(options, self) {
|
|||
});
|
||||
Ox.Request.clearCache(); // fixme: remove
|
||||
pandora.api.moveFiles(data, function(result) {
|
||||
if(self.$checkbox.value()) {
|
||||
pandora.URL.set(result.data.itemId);
|
||||
if (self.$checkbox.value()) {
|
||||
pandora.UI.set({item: result.data.itemId});
|
||||
} else {
|
||||
Ox.print('moved', self.selected, result.data.itemId);
|
||||
self.$filesList.reloadList();
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ pandora.ui.browser = function() {
|
|||
toggle: function(data) {
|
||||
data.collapsed && pandora.$ui.list.gainFocus();
|
||||
pandora.UI.set({showGroups: !data.collapsed});
|
||||
pandora.$ui.mainMenu.getItem('viewMenu_togglegroups').toggleTitle();
|
||||
if (pandora.user.ui.listView == 'map') {
|
||||
pandora.$ui.map.resizeMap();
|
||||
} else if (pandora.user.ui.listView == 'calendar') {
|
||||
|
|
@ -101,7 +100,7 @@ pandora.ui.browser = function() {
|
|||
});
|
||||
},
|
||||
toggle: function(data) {
|
||||
pandora.UI.set({showMovies: !data.collapsed});
|
||||
pandora.UI.set({showBrowser: !data.collapsed});
|
||||
if (data.collapsed) {
|
||||
if (pandora.user.ui.itemView == 'timeline') {
|
||||
pandora.$ui.editor.gainFocus();
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@ pandora.ui.contentPanel = function() {
|
|||
}
|
||||
] : [
|
||||
{
|
||||
collapsed: !pandora.user.ui.showMovies,
|
||||
collapsed: !pandora.user.ui.showBrowser,
|
||||
collapsible: true,
|
||||
element: pandora.$ui.browser = pandora.ui.browser(),
|
||||
size: 112 + Ox.UI.SCROLLBAR_SIZE,
|
||||
tooltip: pandora.site.itemName.plural.toLowerCase()
|
||||
tooltip: pandora.site.itemName.singular.toLowerCase() + ' browser'
|
||||
},
|
||||
{
|
||||
element: pandora.$ui.item = pandora.ui.item()
|
||||
|
|
@ -39,6 +39,12 @@ pandora.ui.contentPanel = function() {
|
|||
},
|
||||
pandora_itemview: function() {
|
||||
that.replaceElement(1, pandora.$ui.item = pandora.ui.item());
|
||||
},
|
||||
pandora_showbrowser: function(data) {
|
||||
data.value == that.options('elements')[0].collapsed && that.toggle(0);
|
||||
},
|
||||
pandora_showgroups: function(data) {
|
||||
data.value == that.options('elements')[0].collapsed && that.toggle(0);
|
||||
}
|
||||
});
|
||||
return that;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ pandora.ui.info = function() {
|
|||
.bindEvent({
|
||||
toggle: function(data) {
|
||||
pandora.UI.set({showInfo: !data.collapsed});
|
||||
pandora.$ui.mainMenu.getItem('viewMenu_toggleinfo').toggleTitle();
|
||||
pandora.resizeFolders();
|
||||
},
|
||||
pandora_find: function() {
|
||||
|
|
@ -18,7 +17,10 @@ pandora.ui.info = function() {
|
|||
}
|
||||
},
|
||||
pandora_item: updateInfo,
|
||||
pandora_listselection: updateInfo
|
||||
pandora_listselection: updateInfo,
|
||||
pandora_showinfo: function(data) {
|
||||
pandora.resizeFolders();
|
||||
}
|
||||
});
|
||||
|
||||
//pandora.$ui.leftPanel && resize();
|
||||
|
|
|
|||
|
|
@ -267,6 +267,9 @@ pandora.ui.item = function() {
|
|||
volume: function(data) {
|
||||
pandora.UI.set('volume', data.volume);
|
||||
},
|
||||
pandora_showannotations: function(data) {
|
||||
pandora.$ui.player.options({showAnnotations: data.value});
|
||||
}
|
||||
}));
|
||||
|
||||
} else if (pandora.user.ui.itemView == 'timeline') {
|
||||
|
|
@ -360,6 +363,9 @@ pandora.ui.item = function() {
|
|||
Ox.print('done updateAnnotation', result);
|
||||
|
||||
});
|
||||
},
|
||||
pandora_showannotations: function(data) {
|
||||
pandora.$ui.editor.options({showAnnotations: data.value});
|
||||
}
|
||||
}));
|
||||
that.bindEvent('resize', function(data) {
|
||||
|
|
|
|||
|
|
@ -45,12 +45,14 @@ pandora.ui.leftPanel = function() {
|
|||
},
|
||||
toggle: function(data) {
|
||||
pandora.UI.set({showSidebar: !data.collapsed});
|
||||
pandora.$ui.mainMenu.getItem('viewMenu_togglelists').toggleTitle();
|
||||
if (data.collapsed) {
|
||||
Ox.forEach(pandora.$ui.folderList, function($list) {
|
||||
$list.loseFocus();
|
||||
});
|
||||
}
|
||||
},
|
||||
pandora_showinfo: function(data) {
|
||||
data.value == that.options('elements')[1].collapsed && that.toggle(1);
|
||||
}
|
||||
});
|
||||
return that;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ pandora.ui.mainPanel = function() {
|
|||
resizable: true,
|
||||
resize: [192, 256, 320, 384],
|
||||
size: pandora.user.ui.sidebarSize,
|
||||
tooltip: 'lists'
|
||||
tooltip: 'sidebar'
|
||||
},
|
||||
{
|
||||
element: pandora.$ui.rightPanel = pandora.ui.rightPanel()
|
||||
|
|
@ -44,6 +44,9 @@ pandora.ui.mainPanel = function() {
|
|||
if (!data.value || !data.previousValue) {
|
||||
that.replaceElement(1, pandora.$ui.rightPanel = pandora.ui.rightPanel());
|
||||
}
|
||||
},
|
||||
pandora_showsidebar: function(data) {
|
||||
data.value == that.options('elements')[0].collapsed && that.toggle(0);
|
||||
}
|
||||
});
|
||||
return that;
|
||||
|
|
|
|||
|
|
@ -94,33 +94,11 @@ pandora.ui.mainMenu = function() {
|
|||
{ id: 'resetgroups', title: 'Reset Groups' }
|
||||
] },
|
||||
{},
|
||||
{
|
||||
id: 'togglelists',
|
||||
title: Ox.map([pandora.user.ui.showSidebar? 'Hide': 'Show',
|
||||
pandora.user.ui.showSidebar? 'Show': 'Hide' ],
|
||||
function(t) { return t + ' Lists'; } ),
|
||||
keyboard: 'shift l'
|
||||
},
|
||||
{
|
||||
id: 'toggleinfo',
|
||||
title: Ox.map([pandora.user.ui.showInfo? 'Hide': 'Show',
|
||||
pandora.user.ui.showInfo? 'Show': 'Hide' ],
|
||||
function(t) { return t + ' Info'; } ),
|
||||
keyboard: 'shift i'
|
||||
},
|
||||
{
|
||||
id: 'togglegroups',
|
||||
title: Ox.map([pandora.user.ui.showGroups? 'Hide': 'Show',
|
||||
pandora.user.ui.showGroups? 'Show': 'Hide' ],
|
||||
function(t) { return t + ' Groups'; } ),
|
||||
keyboard: 'shift g'
|
||||
},
|
||||
{
|
||||
id: 'movies', title:
|
||||
'Hide ' + pandora.site.itemName.plural,
|
||||
disabled: true,
|
||||
keyboard: 'shift m'
|
||||
},
|
||||
{ id: 'showsidebar', title: (ui.showSidebar ? 'Hide' : 'Show') + ' Sidebar', keyboard: 'shift s' },
|
||||
{ id: 'showinfo', title: (ui.showInfo ? 'Hide' : 'Show') + ' Info', keyboard: 'shift i' },
|
||||
{ id: 'showgroups', title: (ui.showGroups ? 'Hide' : 'Show') + ' Groups', disabled: !!ui.item, keyboard: 'shift g' },
|
||||
{ id: 'showbrowser', title: (ui.showBrowser ? 'Hide' : 'Show') + ' ' + pandora.site.itemName.singular + ' Browser', disabled: !ui.item, keyboard: 'shift b' },
|
||||
{ id: 'showannotations', title: (ui.showAnnotations ? 'Hide' : 'Show') + ' Annotations', disabled: !ui.item || ['timeline', 'video'].indexOf(ui.itemView) == -1, keyboard: 'shift a' },
|
||||
{},
|
||||
{ id: 'theme', title: 'Theme', items: [
|
||||
{ group: 'settheme', min: 1, max: 1, items: [
|
||||
|
|
@ -238,12 +216,16 @@ pandora.ui.mainMenu = function() {
|
|||
pandora.ui.listDialog().open();
|
||||
} else if (data.id == 'deletelist') {
|
||||
pandora.ui.deleteListDialog().open();
|
||||
} else if (data.id == 'stills') {
|
||||
var id = pandora.user.ui.item || pandora.user.ui.listItem;
|
||||
pandora.$ui.postersDialog = pandora.ui.framesDialog(id).open();
|
||||
} else if (data.id == 'posters') {
|
||||
var id = pandora.user.ui.item || pandora.user.ui.listItem;
|
||||
pandora.$ui.postersDialog = pandora.ui.postersDialog(id).open();
|
||||
} else if (data.id == 'showsidebar') {
|
||||
pandora.UI.set({showSidebar: !ui.showSidebar});
|
||||
} else if (data.id == 'showinfo') {
|
||||
pandora.UI.set({showInfo: !ui.showInfo});
|
||||
} else if (data.id == 'showgroups') {
|
||||
pandora.UI.set({showGroups: !ui.showGroups});
|
||||
} else if (data.id == 'showbrowser') {
|
||||
pandora.UI.set({showBrowser: !ui.showBrowser});
|
||||
} else if (data.id == 'showannotations') {
|
||||
pandora.UI.set({showAnnotations: !ui.showAnnotations});
|
||||
} else if (data.id == 'names') {
|
||||
pandora.$ui.namesDialog = pandora.ui.namesDialog().open();
|
||||
} else if (data.id == 'titles') {
|
||||
|
|
@ -267,15 +249,6 @@ pandora.ui.mainMenu = function() {
|
|||
});
|
||||
} else if (data.id == 'clearcache') {
|
||||
Ox.Request.clearCache();
|
||||
} else if (data.id == 'togglegroups') {
|
||||
that.getItem('viewMenu_togglegroups').toggleTitle();
|
||||
pandora.$ui.contentPanel.toggle(0);
|
||||
} else if (data.id == 'toggleinfo') {
|
||||
that.getItem('viewMenu_toggleinfo').toggleTitle();
|
||||
pandora.$ui.leftPanel.toggle(2);
|
||||
} else if (data.id == 'togglelists') {
|
||||
that.getItem('viewMenu_togglelists').toggleTitle();
|
||||
pandora.$ui.mainPanel.toggle(0);
|
||||
}
|
||||
},
|
||||
pandora_find: function() {
|
||||
|
|
@ -285,7 +258,20 @@ pandora.ui.mainMenu = function() {
|
|||
that[action]('editlist');
|
||||
that[action]('duplicatelist');
|
||||
that[action]('deletelist');
|
||||
that[pandora.user.ui.listSelection.length ? 'enableItem' : 'disableItem']('newlistfromselection');
|
||||
that[ui.listSelection.length ? 'enableItem' : 'disableItem']('newlistfromselection');
|
||||
},
|
||||
pandora_item: function(data) {
|
||||
if (!!data.value != !!data.previousValue) {
|
||||
that[data.value ? 'disableItem' : 'enableItem']('showgroups');
|
||||
that[data.value ? 'enableItem' : 'disableItem']('showbrowser');
|
||||
}
|
||||
},
|
||||
pandora_itemview: function(data) {
|
||||
var isVideoView = ['video', 'timeline'].indexOf(data.value) > 1,
|
||||
wasVideoView = ['video', 'timeline'].indexOf(data.previousValue) > 1;
|
||||
if (isVideoView != wasVideoView) {
|
||||
that[isVideoView ? 'enableItem' : 'disableItem']('showannotations');
|
||||
}
|
||||
},
|
||||
pandora_listselection: function(data) {
|
||||
that[data.value.length ? 'enableItem' : 'disableItem']('newlistfromselection');
|
||||
|
|
@ -295,6 +281,21 @@ pandora.ui.mainMenu = function() {
|
|||
if (pandora.isClipView() != pandora.isClipView(data.previousValue)) {
|
||||
that.replaceMenu('sortMenu', getSortMenu());
|
||||
}
|
||||
},
|
||||
pandora_showannotations: function(data) {
|
||||
that.setItemTitle('showannotations', (data.value ? 'Hide' : 'Show') + ' Annotations');
|
||||
},
|
||||
pandora_showbrowser: function(data) {
|
||||
that.setItemTitle('showbrowser', (data.value ? 'Hide' : 'Show') + ' ' + pandora.site.itemName.singular + ' Browser');
|
||||
},
|
||||
pandora_showgroups: function(data) {
|
||||
that.setItemTitle('showgroups', (data.value ? 'Hide' : 'Show') + ' Groups');
|
||||
},
|
||||
pandora_showinfo: function(data) {
|
||||
that.setItemTitle('showinfo', (data.value ? 'Hide' : 'Show') + ' Info');
|
||||
},
|
||||
pandora_showsidebar: function(data) {
|
||||
that.setItemTitle('showsidebar', (data.value ? 'Hide' : 'Show') + ' Sidebar');
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -396,10 +396,10 @@ pandora.enterFullscreen = function() {
|
|||
pandora.$ui.appPanel.size(0, 0);
|
||||
pandora.user.ui.showSidebar && pandora.$ui.mainPanel.size(0, 0);
|
||||
pandora.$ui.rightPanel.size(0, 0).size(2, 0);
|
||||
!pandora.user.ui.showMovies && pandora.$ui.contentPanel.css({
|
||||
!pandora.user.ui.showBrowser && pandora.$ui.contentPanel.css({
|
||||
top: (-112 - Ox.UI.SCROLLBAR_SIZE) + 'px' // fixme: rightPanel.size(0, 0) doesn't preserve negative top of browser
|
||||
});
|
||||
pandora.user.ui.showMovies && pandora.$ui.contentPanel.size(0, 0);
|
||||
pandora.user.ui.showBrowser && pandora.$ui.contentPanel.size(0, 0);
|
||||
pandora.$ui.player.options({
|
||||
height: pandora.$document.height() - 2,
|
||||
width: pandora.$document.width() - 2
|
||||
|
|
@ -410,10 +410,10 @@ pandora.exitFullscreen = function() {
|
|||
pandora.$ui.appPanel.size(0, 20);
|
||||
pandora.user.ui.showSidebar && pandora.$ui.mainPanel.size(0, pandora.user.ui.sidebarSize);
|
||||
pandora.$ui.rightPanel.size(0, 24).size(2, 16);
|
||||
!pandora.user.ui.showMovies && pandora.$ui.contentPanel.css({
|
||||
!pandora.user.ui.showBrowser && pandora.$ui.contentPanel.css({
|
||||
top: 24 + (-112 - Ox.UI.SCROLLBAR_SIZE) + 'px' // fixme: rightPanel.size(0, 0) doesn't preserve negative top of browser
|
||||
});
|
||||
pandora.user.ui.showMovies && pandora.$ui.contentPanel.size(0, 112 + Ox.UI.SCROLLBAR_SIZE);
|
||||
pandora.user.ui.showBrowser && pandora.$ui.contentPanel.size(0, 112 + Ox.UI.SCROLLBAR_SIZE);
|
||||
};
|
||||
|
||||
pandora.getFoldersHeight = function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue