diff --git a/js/makegrid.js b/js/makegrid.js index be1c96f173..6abbe6eabf 100644 --- a/js/makegrid.js +++ b/js/makegrid.js @@ -103,8 +103,8 @@ .show(); } else { // vertical alignment var newtop = newn < this.colMov.n ? - colPos.top - 20 : // 20 here is from col_pointer.png image height - colPos.top + $(hoveredCol).outerHeight() - 20; + colPos.top : + colPos.top + $(hoveredCol).outerHeight(); $(this.cPointer) .css('top', newtop) .show(); @@ -262,21 +262,21 @@ g.cCpy = document.createElement('div'); // column copy, to store copy of dragged column header g.cPointer = document.createElement('div'); // column pointer, used when reordering column + // assign the table alignment + g.alignment = $("#top_direction_dropdown").val(); + // adjust g.cCpy g.cCpy.className = 'cCpy'; $(g.cCpy).hide(); // adjust g.cPoint - g.cPointer.className = 'cPointer'; + g.cPointer.className = g.alignment != 'vertical' ? 'cPointer' : 'cPointerVer'; $(g.cPointer).hide(); // chain table and grid together t.grid = g; g.t = t; - // assign the table alignment - g.alignment = $("#top_direction_dropdown").val(); - // get first row data columns var $firstRowCols = g.alignment != 'vertical' ? $(t).find('th.draggable') : diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index 0402a3a701..43c16e4c9d 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -1885,7 +1885,7 @@ span.mysql-number { } .cCpy { - background: #333; + background: #000; color: #FFF; margin: 0.1em; padding: 0.3em; @@ -1898,8 +1898,17 @@ span.mysql-number { .cPointer { background: url(getImgPath(); ?>col_pointer.png); - height: 20px; /* if the height changed, also change makegrid.js */ + height: 20px; margin-left: -5px; /* must be minus half of its width */ position: absolute; width: 10px; } + +.cPointerVer { /* cPointer with vertical display mode */ + background: url(getImgPath(); ?>col_pointer_ver.png); + height: 10px; + margin-left: -5px; + margin-top: -5px; /* must be minus half of its height */ + position: absolute; + width: 20px; +} diff --git a/themes/original/img/col_pointer_ver.png b/themes/original/img/col_pointer_ver.png new file mode 100644 index 0000000000..1b78158933 Binary files /dev/null and b/themes/original/img/col_pointer_ver.png differ diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index adc25f7160..6494e27616 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -2238,8 +2238,17 @@ span.mysql-number { .cPointer { background: url(./themes/pmahomme/img/col_pointer.png); - height: 20px; /* if the height changed, also change makegrid.js */ + height: 20px; margin-left: -5px; /* must be minus half of its width */ position: absolute; width: 10px; } + +.cPointerVer { /* cPointer with vertical display mode */ + background: url(./themes/pmahomme/img/col_pointer_ver.png); + height: 10px; + margin-left: -5px; + margin-top: -5px; /* must be minus half of its height */ + position: absolute; + width: 20px; +} diff --git a/themes/pmahomme/img/col_pointer.png b/themes/pmahomme/img/col_pointer.png index c62c2cdcc2..1d6e479e0b 100644 Binary files a/themes/pmahomme/img/col_pointer.png and b/themes/pmahomme/img/col_pointer.png differ diff --git a/themes/pmahomme/img/col_pointer_ver.png b/themes/pmahomme/img/col_pointer_ver.png new file mode 100644 index 0000000000..ee43c5c738 Binary files /dev/null and b/themes/pmahomme/img/col_pointer_ver.png differ