1
0
Fork 0
forked from 0x2620/oxjs

remove new for all Ox.Elements, dont declare arguments again, add some semicolons

This commit is contained in:
j 2011-06-19 19:48:32 +02:00
commit b27ed00356
69 changed files with 430 additions and 440 deletions

View file

@ -39,8 +39,8 @@ Ox.TextList = function(options, self) {
// fixme: rename to TableList
var self = self || {},
that = new Ox.Element({}, self)
self = self || {};
var that = Ox.Element({}, self)
.defaults({
columns: [],
columnsMovable: false,
@ -114,7 +114,7 @@ Ox.TextList = function(options, self) {
if (!Ox.isUndefined(v.position)) {
self.visibleColumns[v.position] = v;
}
})
});
$.extend(self, {
columnWidths: $.map(self.visibleColumns, function(v, i) {
return v.width;
@ -132,11 +132,11 @@ Ox.TextList = function(options, self) {
// Head
if (self.options.columnsVisible) {
that.$bar = new Ox.Bar({
that.$bar = Ox.Bar({
orientation: 'horizontal',
size: 16
}).appendTo(that);
that.$head = new Ox.Container()
that.$head = Ox.Container()
.addClass('OxHead')
.css({
right: self.options.scrollbarVisible ? Ox.UI.SCROLLBAR_SIZE + 'px' : 0
@ -145,7 +145,7 @@ Ox.TextList = function(options, self) {
that.$head.$content.addClass('OxTitles');
constructHead();
if (self.options.columnsRemovable) {
that.$select = new Ox.Select({
that.$select = Ox.Select({
id: self.options.id + 'SelectColumns',
items: $.map(self.options.columns, function(v, i) {
return {
@ -166,7 +166,7 @@ Ox.TextList = function(options, self) {
// Body
that.$body = new Ox.List({
that.$body = Ox.List({
construct: constructItem,
id: self.options.id,
items: self.options.items,
@ -299,7 +299,7 @@ Ox.TextList = function(options, self) {
var $order, $resize, $left, $center, $right;
offset += self.columnWidths[i];
self.columnOffsets[i] = offset - self.columnWidths[i] / 2;
that.$titles[i] = new Ox.Element()
that.$titles[i] = Ox.Element()
.addClass('OxTitle OxColumn' + Ox.toTitleCase(v.id))
.css({
width: (self.columnWidths[i] - 9) + 'px',
@ -338,7 +338,7 @@ Ox.TextList = function(options, self) {
$(this).prev().trigger('click')
})
.appendTo(that.$head.$content.$element);
$resize = new Ox.Element()
$resize = Ox.Element()
.addClass('OxResize')
.appendTo(that.$head.$content.$element);
// if columns are resizable, bind click and drag events
@ -741,7 +741,7 @@ Ox.TextList = function(options, self) {
.css({
width: width + 'px'
});
$input = new Ox.Input({
$input = Ox.Input({
autovalidate: column.input ? column.input.autovalidate : null,
style: 'square',
value: html,