1
0
Fork 0
forked from 0x2620/oxjs

exclusively handle selectability of text via .OxSelectable and body.OxDragging (to be set/unset in dragstart/dragend handlers)

This commit is contained in:
rlx 2013-07-19 08:42:25 +00:00
commit 564ce69a78
17 changed files with 53 additions and 39 deletions

View file

@ -568,6 +568,7 @@ Ox.TableList = function(options, self) {
}
function dragstartColumn(id, e) {
Ox.$body.addClass('OxDragging');
self.drag = {
columnOffsets: getColumnOffsets(),
listOffset: that.$element.offset().left - that.$body.scrollLeft(),
@ -631,6 +632,7 @@ Ox.TableList = function(options, self) {
function dragendColumn(id, e) {
var column = self.visibleColumns.splice(self.drag.stopPos, 1)[0],
width = self.columnWidths.splice(self.drag.stopPos, 1)[0];
Ox.$body.removeClass('OxDragging');
self.visibleColumns.splice(self.drag.stopPos, 0, column);
self.columnWidths.splice(self.drag.stopPos, 0, width);
that.$head.$content.empty();
@ -645,6 +647,7 @@ Ox.TableList = function(options, self) {
function dragstartResize(id, e) {
var pos = getColumnPositionById(id);
Ox.$body.addClass('OxDragging');
self.drag = {
startWidth: self.columnWidths[pos]
};
@ -662,6 +665,7 @@ Ox.TableList = function(options, self) {
function dragendResize(id, e) {
var pos = getColumnPositionById(id);
// fixme: shouldn't this be resizecolumn?
Ox.$body.removeClass('OxDragging');
that.triggerEvent('columnresize', {
id: id,
width: self.columnWidths[pos]