forked from 0x2620/oxjs
misc bugfixes
This commit is contained in:
parent
72fe370492
commit
84e7e794f7
3 changed files with 14 additions and 15 deletions
|
|
@ -162,7 +162,6 @@ Ox.TextList = function(options, self) {
|
|||
id: self.options.id + 'SelectColumns',
|
||||
items: self.options.columns.map(function(column) {
|
||||
return {
|
||||
checked: column.visible,
|
||||
disabled: column.removable === false,
|
||||
id: column.id,
|
||||
title: column.title
|
||||
|
|
@ -170,7 +169,10 @@ Ox.TextList = function(options, self) {
|
|||
}),
|
||||
max: -1,
|
||||
min: 1,
|
||||
type: 'image'
|
||||
type: 'image',
|
||||
value: Ox.map(self.options.columns, function(column) {
|
||||
return column.visible ? column.id : null;
|
||||
})
|
||||
})
|
||||
.bindEvent('change', changeColumns)
|
||||
.appendTo(that.$bar.$element);
|
||||
|
|
@ -265,14 +267,14 @@ Ox.TextList = function(options, self) {
|
|||
function changeColumns(data) {
|
||||
var add,
|
||||
ids = [];
|
||||
Ox.forEach(data.value, function(column) {
|
||||
var index = getColumnIndexById(column.id);
|
||||
Ox.forEach(data.value, function(id) {
|
||||
var index = getColumnIndexById(id);
|
||||
if (!self.options.columns[index].visible) {
|
||||
addColumn(column.id);
|
||||
addColumn(id);
|
||||
add = true;
|
||||
return false;
|
||||
}
|
||||
ids.push(column.id);
|
||||
ids.push(id);
|
||||
});
|
||||
if (!add) {
|
||||
Ox.forEach(self.visibleColumns, function(column) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue