1
0
Fork 0
forked from 0x2620/oxjs

cleanup, again

This commit is contained in:
rolux 2011-11-03 16:42:41 +01:00
commit 094b1a59ec
34 changed files with 93 additions and 101 deletions

View file

@ -1,5 +1,5 @@
Ox.InfoList = function(options, self) {
self = self || {};
var that = Ox.Element({}, self)
.defaults({
@ -64,7 +64,7 @@ Ox.InfoList = function(options, self) {
info: {}
};
Ox.print('DATA -=-------', data)
var $icon = Ox.Element()
.css({
float: 'left',

View file

@ -72,13 +72,13 @@ Ox.List = function(options, self) {
.options(options || {})
.scroll(scroll);
that.$content.bindEvent({
that.$content.bindEvent({
mousedown: mousedown,
singleclick: singleclick,
doubleclick: doubleclick
});
if (self.options.draggable) {
that.$content.bindEvent({
that.$content.bindEvent({
dragstart: dragstart,
drag: drag,
dragpause: dragpause,
@ -87,7 +87,7 @@ Ox.List = function(options, self) {
dragend: dragend
});
} else if (self.options.sortable) {
that.$content.bindEvent({
that.$content.bindEvent({
dragstart: movestart,
drag: move,
dragend: moveend
@ -372,7 +372,7 @@ Ox.List = function(options, self) {
});
}
}
function drag(data) {
self.drag && that.triggerEvent('draganddrop', {
ids: self.drag.ids,
@ -887,7 +887,7 @@ Ox.List = function(options, self) {
clickable, editable;
if (pos > -1) {
if (
!data.metaKey && !data.shiftKey
!data.metaKey && !data.shiftKey
&& isSelected(pos) && self.selected.length > 1
) {
// click on one of multiple selected items

View file

@ -723,7 +723,7 @@ Ox.TextList = function(options, self) {
pos = getColumnPositionById(id);
self.options.columns[i].width = width;
self.columnWidths[pos] = width;
if (self.options.columnsVisible) {
if (self.options.columnsVisible) {
that.$head.$content.css({
width: (Ox.sum(self.columnWidths) + 2) + 'px'
});
@ -784,7 +784,7 @@ Ox.TextList = function(options, self) {
self.selectedColumn = getColumnIndexById(self.options.sort[0].key);
toggleSelected(self.options.columns[self.selectedColumn].id);
}
}
}
}
function updateOrder(id) {
@ -959,7 +959,7 @@ Ox.TextList = function(options, self) {
id = value;
}
$cell = getCell(id, key);
$cell && $cell.html(formatValue(key, value, that.$body.value(id)));
$cell && $cell.html(formatValue(key, value, that.$body.value(id)));
if (key == self.options.sort[0].key) {
// sort key has changed
that.$body.sort();

View file

@ -220,5 +220,5 @@ Ox.TreeList = function(options, self) {
};
return that;
};