table list columns: add 'addable' property (defaults to true, like removable)
This commit is contained in:
parent
8c6803dc0e
commit
ce579b8f3f
1 changed files with 6 additions and 3 deletions
|
@ -7,12 +7,13 @@ Ox.TableList <f> TableList Widget
|
|||
clearButtonTooltip <s|''> Clear button tooltip
|
||||
columns <[o]|[]> Columns
|
||||
# Fixme: There's probably more...
|
||||
addable <b|true> ...
|
||||
align <s|'left'> ...
|
||||
editable <b> ...
|
||||
format <f> ...
|
||||
id <s> ...
|
||||
operator <s> default sort operator
|
||||
removable <b> ...
|
||||
removable <b|true> ...
|
||||
resizable <b> ...
|
||||
sort <f> function(value, object) that maps values to sort values
|
||||
title <s> ...
|
||||
|
@ -211,7 +212,9 @@ Ox.TableList = function(options, self) {
|
|||
if (self.options.columnsRemovable) {
|
||||
that.$select = Ox.Select({
|
||||
id: self.options.id + 'SelectColumns',
|
||||
items: self.options.columns.map(function(column) {
|
||||
items: self.options.columns.filter(function(column){
|
||||
return column.addable !== false;
|
||||
}).map(function(column) {
|
||||
return {
|
||||
disabled: column.removable === false,
|
||||
id: column.id,
|
||||
|
@ -489,7 +492,7 @@ Ox.TableList = function(options, self) {
|
|||
$('<div>').appendTo($resize);
|
||||
$('<div>').addClass('OxCenter').appendTo($resize);
|
||||
$('<div>').appendTo($resize);
|
||||
// if columns are resizable, bind click and drag events
|
||||
// if columns are resizable, bind doubleclick and drag events
|
||||
if (self.options.columnsResizable && column.resizable !== false) {
|
||||
$resize.addClass('OxResizable')
|
||||
.bindEvent({
|
||||
|
|
Loading…
Reference in a new issue