forked from 0x2620/oxjs
TextList -> TableList
This commit is contained in:
parent
7648d2d4ac
commit
bdebb03a45
17 changed files with 101 additions and 104 deletions
|
|
@ -225,7 +225,7 @@ Ox.CalendarEditor = function(options, self) {
|
|||
.css({float: 'right', margin: '4px'})
|
||||
.appendTo(self.$listToolbar);
|
||||
|
||||
self.$list = Ox.TextList({
|
||||
self.$list = Ox.TableList({
|
||||
columns: self.columns,
|
||||
columnsRemovable: true,
|
||||
columnsVisible: true,
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ Ox.FileInput = function(options, self) {
|
|||
})
|
||||
.appendTo(that);
|
||||
self.options.value.length == 0 && self.$files.hide();
|
||||
self.$list = Ox.TextList({
|
||||
self.$list = Ox.TableList({
|
||||
columns: [
|
||||
{
|
||||
id: 'name',
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Ox.FormPanel = function(options, self) {
|
|||
|
||||
self.section = 0;
|
||||
self.sectionTitle = self.options.form[self.section].title;
|
||||
self.$list = Ox.TextList({
|
||||
self.$list = Ox.TableList({
|
||||
columns: [
|
||||
{
|
||||
id: 'id',
|
||||
|
|
@ -120,10 +120,9 @@ Ox.FormPanel = function(options, self) {
|
|||
.hide()
|
||||
.appendTo(self.$section);
|
||||
});
|
||||
self.$list.bindEvent('load', function() {
|
||||
self.$forms.forEach(function($form, i) {
|
||||
self.$list.value(self.options.form[i].id, 'valid', $form.valid());
|
||||
});
|
||||
|
||||
self.$forms.forEach(function($form, i) {
|
||||
self.$list.value(self.options.form[i].id, 'valid', $form.valid());
|
||||
});
|
||||
|
||||
self.$sections[0].show();
|
||||
|
|
|
|||
2
source/Ox.UI/js/List/Chart.js
vendored
2
source/Ox.UI/js/List/Chart.js
vendored
|
|
@ -169,7 +169,7 @@ Ox.Chart = function(options, self) {
|
|||
}
|
||||
|
||||
function renderChart() {
|
||||
return Ox.TextList({
|
||||
return Ox.TableList({
|
||||
columns: getColumns(),
|
||||
items: self.items,
|
||||
max: 0,
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -1564,7 +1564,7 @@ Ox.Map = function(options, self) {
|
|||
(id, key, value) -> <o> set id, key to value
|
||||
@*/
|
||||
that.value = function(id, key, value) {
|
||||
// fixme: should be like the corresponding List/TextList/etc value function
|
||||
// fixme: should be like the corresponding List/TableList/etc value function
|
||||
Ox.Log('Map', 'Map.value', id, key, value);
|
||||
getPlaceById(id).options(key, value);
|
||||
if (id == self.options.selected) {
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ Ox.MapEditor = function(options, self) {
|
|||
.css({float: 'right', margin: '4px'})
|
||||
.appendTo(self.$listToolbar);
|
||||
|
||||
self.$list = Ox.TextList({
|
||||
self.$list = Ox.TableList({
|
||||
columns: self.columns,
|
||||
columnsRemovable: true,
|
||||
columnsVisible: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue