in TableLists, use options.unique, not options.columns[i].unique

This commit is contained in:
rolux 2012-06-28 00:24:02 +02:00
parent 4773cc5c7a
commit fcaf7c0375
9 changed files with 20 additions and 29 deletions

View file

@ -168,7 +168,6 @@ pandora.ui.filesView = function(options, self) {
id: 'id', id: 'id',
operator: '+', operator: '+',
title: 'ID', title: 'ID',
unique: true,
visible: false, visible: false,
width: 120 width: 120
}, },
@ -199,7 +198,8 @@ pandora.ui.filesView = function(options, self) {
}, },
keys: ['wanted', 'instances'], keys: ['wanted', 'instances'],
scrollbarVisible: true, scrollbarVisible: true,
sort: [{key: 'path', operator: '+'}] sort: [{key: 'path', operator: '+'}],
unique: 'id'
}) })
.bindEvent({ .bindEvent({
click: function(data) { click: function(data) {
@ -269,7 +269,8 @@ pandora.ui.filesView = function(options, self) {
id: 'files', id: 'files',
items: [], items: [],
scrollbarVisible: true, scrollbarVisible: true,
sort: [{key: 'user', operator: '+'}] sort: [{key: 'user', operator: '+'}],
unique: 'path'
}); });
self.$movieLabel = Ox.Label({ self.$movieLabel = Ox.Label({

View file

@ -45,7 +45,6 @@ pandora.ui.filter = function(id) {
}, },
operator: filter.type == 'string' ? '+' : '-', operator: filter.type == 'string' ? '+' : '-',
title: title, title: title,
unique: true,
visible: true, visible: true,
width: pandora.user.ui.filterSizes[i] - 40 - Ox.UI.SCROLLBAR_SIZE width: pandora.user.ui.filterSizes[i] - 40 - Ox.UI.SCROLLBAR_SIZE
}, },
@ -78,7 +77,8 @@ pandora.ui.filter = function(id) {
sort: [{ sort: [{
key: pandora.user.ui.filters[i].sort[0].key, key: pandora.user.ui.filters[i].sort[0].key,
operator: pandora.user.ui.filters[i].sort[0].operator operator: pandora.user.ui.filters[i].sort[0].operator
}] }],
unique: 'name'
}) })
.bindEvent({ .bindEvent({
paste: function(data) { paste: function(data) {

View file

@ -33,7 +33,6 @@ pandora.ui.folderBrowserList = function(id) {
*/ */
id: 'id', id: 'id',
titleImage: 'icon', titleImage: 'icon',
unique: true,
visible: true, visible: true,
width: 16 width: 16
}, },
@ -141,9 +140,8 @@ pandora.ui.folderBrowserList = function(id) {
keys: id == 'featured' ? ['subscribed'] : [], keys: id == 'featured' ? ['subscribed'] : [],
pageLength: 1000, pageLength: 1000,
selected: pandora.getListData().folder == id ? [pandora.user.ui._list] : [], selected: pandora.getListData().folder == id ? [pandora.user.ui._list] : [],
sort: [ sort: [{key: 'name', operator: '+'}],
{key: 'name', operator: '+'} unique: 'id'
]
}) })
.bindEvent({ .bindEvent({
click: function(data) { click: function(data) {

View file

@ -39,7 +39,6 @@ pandora.ui.folderList = function(id) {
}, },
id: 'id', id: 'id',
operator: '+', operator: '+',
unique: true,
visible: id == 'favorite', visible: id == 'favorite',
// fixme: user and name are set to the same width here, // fixme: user and name are set to the same width here,
// but resizeFolders will set them to different widths // but resizeFolders will set them to different widths
@ -167,7 +166,6 @@ pandora.ui.folderList = function(id) {
id: 'name', id: 'name',
operator: '+', operator: '+',
tooltip: 'Edit Title', tooltip: 'Edit Title',
unique: true,
visible: true, visible: true,
width: pandora.user.ui.sidebarWidth - 96 width: pandora.user.ui.sidebarWidth - 96
}, },
@ -249,7 +247,8 @@ pandora.ui.folderList = function(id) {
pageLength: 1000, pageLength: 1000,
//selected: pandora.getListData().folder == id ? [pandora.user.ui._list] : [], //selected: pandora.getListData().folder == id ? [pandora.user.ui._list] : [],
sort: [{key: 'position', operator: '+'}], sort: [{key: 'position', operator: '+'}],
sortable: id != 'featured' || canEditFeaturedLists sortable: id != 'featured' || canEditFeaturedLists,
unique: id != 'volumes' ? 'id' : 'name'
}) })
.css({ .css({
left: 0, left: 0,

View file

@ -69,7 +69,6 @@ pandora.ui.list = function() {
removable: !key.columnRequired, removable: !key.columnRequired,
title: key.title, title: key.title,
type: key.type, type: key.type,
unique: key.id == 'id',
visible: position > -1, visible: position > -1,
width: pandora.user.ui.listColumnWidth[key.id] || key.columnWidth width: pandora.user.ui.listColumnWidth[key.id] || key.columnWidth
}; };
@ -88,7 +87,8 @@ pandora.ui.list = function() {
}, },
scrollbarVisible: true, scrollbarVisible: true,
selected: pandora.user.ui.listSelection, selected: pandora.user.ui.listSelection,
sort: pandora.user.ui.listSort sort: pandora.user.ui.listSort,
unique: 'id'
}) })
.bindEvent({ .bindEvent({
columnchange: function(data) { columnchange: function(data) {

View file

@ -56,7 +56,6 @@ pandora.ui.logsDialog = function() {
{ {
id: 'id', id: 'id',
title: 'ID', title: 'ID',
unique: true,
visible: false visible: false
}, },
{ {
@ -107,9 +106,8 @@ pandora.ui.logsDialog = function() {
items: pandora.api.findLogs, items: pandora.api.findLogs,
keys: ['line'], keys: ['line'],
scrollbarVisible: true, scrollbarVisible: true,
sort: [ sort: [{key: 'created', operator: '-'}],
{key: 'created', operator: '-'} unique: 'id'
]
}) })
.bindEvent({ .bindEvent({
init: function(data) { init: function(data) {

View file

@ -35,7 +35,6 @@ pandora.ui.namesDialog = function() {
{ {
id: 'id', id: 'id',
title: 'ID', title: 'ID',
unique: true,
visible: false, visible: false,
width: 0 width: 0
}, },
@ -69,7 +68,8 @@ pandora.ui.namesDialog = function() {
items: pandora.api.findNames, items: pandora.api.findNames,
max: 1, max: 1,
scrollbarVisible: true, scrollbarVisible: true,
sort: [{key: 'sortname', operator: '+'}] sort: [{key: 'sortname', operator: '+'}],
unique: 'id'
}) })
.bindEvent({ .bindEvent({
init: function(data) { init: function(data) {

View file

@ -33,7 +33,6 @@ pandora.ui.titlesDialog = function() {
{ {
id: 'id', id: 'id',
title: 'ID', title: 'ID',
unique: true,
visible: false visible: false
}, },
{ {
@ -58,7 +57,8 @@ pandora.ui.titlesDialog = function() {
keys: [], keys: [],
max: 1, max: 1,
scrollbarVisible: true, scrollbarVisible: true,
sort: [{key: 'sorttitle', operator: '+'}] sort: [{key: 'sorttitle', operator: '+'}],
unique: 'id'
}) })
.bindEvent({ .bindEvent({
init: function(data) { init: function(data) {

View file

@ -95,12 +95,6 @@ pandora.ui.usersDialog = function() {
$list = Ox.TableList({ $list = Ox.TableList({
columns: [ columns: [
{
id: 'id',
title: 'ID',
unique: true,
visible: false
},
{ {
format: function(value, data) { format: function(value, data) {
return $('<img>') return $('<img>')
@ -371,7 +365,8 @@ pandora.ui.usersDialog = function() {
keys: ['notes', 'groups'], keys: ['notes', 'groups'],
max: -1, max: -1,
scrollbarVisible: true, scrollbarVisible: true,
sort: [{key: 'lastseen', operator: '-'}] sort: [{key: 'lastseen', operator: '-'}],
unique: 'id'
}) })
.bindEvent({ .bindEvent({
init: function(data) { init: function(data) {