diff --git a/build/css/ox.ui.classic.css b/build/css/ox.ui.classic.css index a0d8582a..162e8ffd 100644 --- a/build/css/ox.ui.classic.css +++ b/build/css/ox.ui.classic.css @@ -370,8 +370,8 @@ Miscellaneous */ .OxThemeClassic .OxTooltip { - border: 1px solid rgba(128, 128, 128, 0.75); - background: rgba(255, 255, 255, 0.75); + border: 1px solid rgba(128, 128, 128, 0.96); + background: rgba(255, 255, 255, 0.96); color: rgba(128, 128, 128, 1); -moz-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); diff --git a/build/css/ox.ui.modern.css b/build/css/ox.ui.modern.css index 8dcb93f0..45aa9438 100644 --- a/build/css/ox.ui.modern.css +++ b/build/css/ox.ui.modern.css @@ -340,8 +340,8 @@ Miscellaneous */ .OxThemeModern .OxTooltip { - border: 1px solid rgba(128, 128, 128, 0.75); - background: rgba(0, 0, 0, 0.75); + border: 1px solid rgba(128, 128, 128, 0.96); + background: rgba(0, 0, 0, 0.96); color: rgba(128, 128, 128, 1); -moz-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index d49af069..7c28a00f 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -1374,6 +1374,7 @@ requires if (theme) { $('img').each(function() { var $this = $(this); + if (!$this.attr('src')) return; // fixme: remove, should't be neccessary $this.attr({ src: $this.attr('src').replace( '/ox.ui.' + theme + '/', '/ox.ui.' + arg + '/' @@ -7376,7 +7377,7 @@ requires $.extend(self, { columnPositions: [], defaultColumnWidths: $.map(self.options.columns, function(v) { - return v.width; + return v.defaultWidth || v.width; }), itemHeight: 16, page: 0, @@ -7387,6 +7388,12 @@ requires return v.visible ? v : null; }) }); + // fixme: there might be a better way than passing both visible and position + self.options.columns.forEach(function(v) { + if (!Ox.isUndefined(v.position)) { + self.visibleColumns[v.position] = v; + } + }) $.extend(self, { columnWidths: $.map(self.visibleColumns, function(v, i) { return v.width; @@ -7488,7 +7495,7 @@ requires function addColumn(id) { //Ox.print('addColumn', id); - var column, + var column, ids, index = 0; $.each(self.options.columns, function(i, v) { if (v.visible) { @@ -7531,6 +7538,7 @@ requires } }); } + triggerColumnChangeEvent(); } function clickColumn(id) { @@ -7587,27 +7595,40 @@ requires .appendTo(that.$head.$content.$element); if (self.options.columnsResizable) { $resize.addClass('OxResizable') + // fixme: make these their own named functions .mousedown(function(e) { var startWidth = self.columnWidths[i], startX = e.clientX; $window.mousemove(function(e) { - var x = e.clientX, - width = Ox.limit( - startWidth - startX + x, - self.options.columnWidth[0], - self.options.columnWidth[1] - ); - resizeColumn(v.id, width); + var width = getWidth(e); + resizeColumn(v.id, width); }); - $window.one('mouseup', function() { + $window.one('mouseup', function(e) { + var width = getWidth(e); + resizeColumn(v.id, width); + that.triggerEvent('columnresize', { + id: v.id, + width: width + }); $window.unbind('mousemove'); }); + function getWidth(e) { + return Ox.limit( + startWidth - startX + e.clientX, + self.options.columnWidth[0], + self.options.columnWidth[1] + ); + } }) + // fixme: never use doubleclick, mousedown will fire too + // make working click dblclick and drag Ox.Element events .dblclick(function() { - Ox.print('dblclick') - resizeColumn( - v.id, self.defaultColumnWidths[getColumnIndexById(v.id)] - ); + var width = self.defaultColumnWidths[getColumnIndexById(v.id)]; + resizeColumn(v.id, width); + that.triggerEvent('columnresize', { + id: v.id, + width: width + }); }); } $left = $('