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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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