move doubleclick-to-re-guess-imdb-id from files list to instances list

This commit is contained in:
rolux 2012-09-15 12:19:50 +00:00
parent 1364737d09
commit 7fdbb911a9

View file

@ -251,47 +251,49 @@ pandora.ui.filesView = function(options, self) {
init: function(data) { init: function(data) {
self.numberOfItems = data.items; self.numberOfItems = data.items;
}, },
open: openFiles,
select: selectFiles select: selectFiles
}); });
self.$instancesList = Ox.TableList({ self.$instancesList = Ox.TableList({
columns: [ columns: [
{ {
align: 'left', align: 'left',
id: 'user', id: 'user',
operator: '+', operator: '+',
title: 'User', title: 'User',
visible: true, visible: true,
width: 120 width: 120
}, },
{ {
align: 'left', align: 'left',
id: 'volume', id: 'volume',
operator: '+', operator: '+',
title: 'Volume', title: 'Volume',
visible: true, visible: true,
width: 120 width: 120
}, },
{ {
align: 'left', align: 'left',
id: 'path', id: 'path',
operator: '+', operator: '+',
title: 'Path', title: 'Path',
visible: true, visible: true,
width: 480 width: 480
}, },
], ],
columnsMovable: true, columnsMovable: true,
columnsRemovable: true, columnsRemovable: true,
columnsResizable: true, columnsResizable: true,
columnsVisible: true, columnsVisible: true,
id: 'files', id: 'files',
items: [], items: [],
scrollbarVisible: true, scrollbarVisible: true,
sort: [{key: 'user', operator: '+'}], sort: [{key: 'user', operator: '+'}],
unique: 'path' unique: 'path'
}); })
.bindEvent({
open: openFiles
});
self.$movieLabel = Ox.Label({ self.$movieLabel = Ox.Label({
textAlign: 'center', textAlign: 'center',
@ -457,7 +459,7 @@ pandora.ui.filesView = function(options, self) {
function openFiles(data) { function openFiles(data) {
data.ids.length == 1 && pandora.api.parsePath({ data.ids.length == 1 && pandora.api.parsePath({
path: self.$filesList.value(data.ids[0], 'path') path: self.$instancesList.value(data.ids[0], 'path')
}, function(result) { }, function(result) {
['title', 'director', 'year'].forEach(function(key) { ['title', 'director', 'year'].forEach(function(key) {
if (result.data[key]) { if (result.data[key]) {