The branch, master has been updated
via a2093e66e2189756057f152223b64aee8b495d71 (commit)
from 1b8b7a9b93ba889c23733e86225ce82d853c40b3 (commit)
- Log -----------------------------------------------------------------
commit a2093e66e2189756057f152223b64aee8b495d71
Author: Piotr Przybylski <piotrprz(a)gmail.com>
Date: Thu Sep 1 14:42:09 2011 +0200
bugfix: makegrid broke styling of rows with conditions in table search
-----------------------------------------------------------------------
Summary of changes:
js/makegrid.js | 28 ++++++++++++++++++----------
themes/original/css/theme_right.css.php | 4 +---
themes/pmahomme/css/theme_right.css.php | 26 ++++++++++++++++++++++----
3 files changed, 41 insertions(+), 17 deletions(-)
diff --git a/js/makegrid.js b/js/makegrid.js
index f559677..c1b796a 100644
--- a/js/makegrid.js
+++ b/js/makegrid.js
@@ -246,11 +246,21 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
reposRsz: function() {
$(g.cRsz).find('div').hide();
var $firstRowCols = $(g.t).find('tr:first th.draggable:visible');
+ var $resizeHandles = $(g.cRsz).find('div').removeClass('condition');
+ $('.pma_table').find('thead th:first').removeClass('before-condition');
for (var n = 0; n < $firstRowCols.length; n++) {
var $col = $($firstRowCols[n]);
- $cb = $(g.cRsz).find('div:eq(' + n + ')'); // column border
- $cb.css('left', $col.position().left + $col.outerWidth(true))
+ $($resizeHandles[n]).css('left', $col.position().left + $col.outerWidth(true))
.show();
+ if ($($firstRowCols[n]).hasClass('condition')) {
+ $($resizeHandles[n]).addClass('condition');
+ if (n > 0) {
+ $($resizeHandles[n-1]).addClass('condition');
+ }
+ }
+ }
+ if ($($resizeHandles[0]).hasClass('condition')) {
+ $('.pma_table').find('thead th:first').addClass('before-condition');
}
$(g.cRsz).css('height', $(g.t).height());
},
@@ -431,9 +441,10 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
}
// hide the hint if no text and the event is mouseenter
- g.qtip.disable(!text && e.type == 'mouseenter');
-
- g.qtip.updateContent(text, false);
+ if (g.qtip) {
+ g.qtip.disable(!text && e.type == 'mouseenter');
+ g.qtip.updateContent(text, false);
+ }
} else {
g.hideHint();
}
@@ -531,7 +542,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
* Reposition the column visibility drop-down arrow.
*/
reposDrop: function() {
- $th = $(t).find('th:not(.draggable)');
+ var $th = $(t).find('th:not(.draggable)');
for (var i = 0; i < $th.length; i++) {
var $cd = $(g.cDrop).find('div:eq(' + i + ')'); // column drop-down arrow
var pos = $($th[i]).position();
@@ -1446,7 +1457,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
var $firstRowCols = $(g.t).find('tr:first th.draggable');
// initialize column visibility
- $col_visib = $('#col_visib'); // check if column visibility is passed from PHP
+ var $col_visib = $('#col_visib'); // check if column visibility is passed from PHP
if ($col_visib.length > 0) {
g.colVisib = $col_visib.val().split(',');
for (var i = 0; i < g.colVisib.length; i++) {
@@ -1459,9 +1470,6 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
}
}
- // get data columns in the first row of the table
- var $firstRowCols = $(t).find('tr:first th.draggable');
-
// make sure we have more than one column
if ($firstRowCols.length > 1) {
var $colVisibTh = $(g.t).find('th:not(.draggable)');
diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php
index 28c8d6c..260869b 100644
--- a/themes/original/css/theme_right.css.php
+++ b/themes/original/css/theme_right.css.php
@@ -388,8 +388,6 @@ table tr.hover th {
/**
* marks table rows/cells if the db field is in a where condition
*/
-tr.condition th,
-tr.condition td,
td.condition,
th.condition {
border: 1px solid <?php echo $GLOBALS['cfg']['BrowseMarkerBackground']; ?>;
@@ -2295,7 +2293,7 @@ span.CodeMirror-selected {
border-right: solid 1px #FFFFFF;
cursor: col-resize;
height: 100%;
- margin-left: -6px;
+ margin-left: -5px;
position: absolute;
width: 5px;
}
diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php
index 53cde00..508e4f4 100644
--- a/themes/pmahomme/css/theme_right.css.php
+++ b/themes/pmahomme/css/theme_right.css.php
@@ -553,13 +553,31 @@ table tr.hover th {
/**
* marks table rows/cells if the db field is in a where condition
*/
-tr.condition th,
-tr.condition td,
-td.condition,
+.condition {
+ border-color: <?php echo $GLOBALS['cfg']['BrowseMarkerBackground']; ?> !important;
+}
+
th.condition {
- border: 1px solid <?php echo $GLOBALS['cfg']['BrowseMarkerBackground']; ?>;
+ border-width: 1px 1px 0 1px;
+ border-style: solid;
}
+td.condition {
+ border-width: 0 1px 0 1px;
+ border-style: solid;
+}
+
+tr:last-child td.condition {
+ border-width: 0 1px 1px 1px;
+}
+
+<?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
+/* for first th which must have right border set (ltr only) */
+.before-condition {
+ border-right: 1px solid <?php echo $GLOBALS['cfg']['BrowseMarkerBackground']; ?>;
+}
+<?php } ?>
+
/**
* cells with the value NULL
*/
hooks/post-receive
--
phpMyAdmin