1
0
Fork 0
forked from 0x2620/oxjs

TextList -> TableList

This commit is contained in:
rolux 2012-06-27 09:41:10 +02:00
commit bdebb03a45
17 changed files with 101 additions and 104 deletions

View file

@ -169,7 +169,7 @@ Ox.Chart = function(options, self) {
}
function renderChart() {
return Ox.TextList({
return Ox.TableList({
columns: getColumns(),
items: self.items,
max: 0,

View file

@ -1512,7 +1512,7 @@ Ox.List = function(options, self) {
clearCache <f> empty list cache
() -> <o> the list
@*/
that.clearCache = function() { // fixme: was used by TextList resizeColumn, now probably no longer necessary
that.clearCache = function() { // fixme: was used by TableList resizeColumn, now probably no longer necessary
self.$pages = [];
return that;
};
@ -1560,7 +1560,7 @@ Ox.List = function(options, self) {
() -> <o> the list
@*/
that.reloadPages = function() {
// this is called by TextList when the column layout changes
// this is called by TableList when the column layout changes
var page, scrollLeft, scrollTop;
if (!self.isAsync) {
scrollLeft = that.scrollLeft();

View file

@ -1,8 +1,8 @@
'use strict';
/*@
Ox.TextList <f> TextList Object
([options[, self]]) -> <o:Ox.Element> TextList Object
Ox.TableList <f> TableList Widget
([options[, self]]) -> <o:Ox.Element> TableList Object
options <o> Options object
columns <[o]|[]> Columns
# Fixme: There's probably more...
@ -44,9 +44,8 @@ Ox.TextList <f> TextList Object
// fixme: options.columnsMovable, but options.sortable ... pick one.
Ox.TextList = function(options, self) {
Ox.TableList = function(options, self) {
// fixme: rename to TableList
// fixme: in columns, "operator" should be "sortOperator"
self = self || {};
@ -91,7 +90,7 @@ Ox.TextList = function(options, self) {
that.$body.options({sort: self.options.sort});
}
})
.addClass('OxTextList')
.addClass('OxTableList')
.bindEvent({
key_left: function() {
var $element = that.$body.$element,
@ -225,7 +224,7 @@ Ox.TextList = function(options, self) {
itemHeight: 16,
items: self.options.items,
itemWidth: getItemWidth(),
format: self.format, // fixme: not needed, happens in TextList
format: self.format, // fixme: not needed, happens in TableList
keys: self.visibleColumns.map(function(column) {
return column.id;
}).concat(self.options.keys),

View file

@ -62,8 +62,8 @@ Ox.TreeList = function(options, self) {
max: self.options.max,
min: self.options.min,
unique: 'id'
}, Ox.extend(Ox.clone(self), {updateCallbacks: []})) // pass event handler
.addClass('OxTextList OxTreeList')
}, Ox.clone(self))
.addClass('OxTableList OxTreeList')
.css({
width: self.options.width + 'px',
overflowY: 'scroll'