diff --git a/js/makegrid.js b/js/makegrid.js
index 040f35d183..e18225c11a 100644
--- a/js/makegrid.js
+++ b/js/makegrid.js
@@ -13,8 +13,10 @@
hintShown: false, // true if hint balloon is shown, used by updateHint() method
reorderHint: '', // string, hint for column reordering
sortHint: '', // string, hint for column sorting
+ markHint: '', // string, hint for column marking
showReorderHint: false, // boolean, used by showHint() method
showSortHint: false, // boolean, used by showHint() method
+ showMarkHint: false,
hintIsHiding: false, // true when hint is still shown, but hide() already called
// functions
@@ -45,7 +47,7 @@
width: $(obj).width()
});
$(this.cPointer).css({
- top: objPos.top,
+ top: objPos.top
});
} else { // vertical alignment
$(this.cCpy).css({
@@ -55,7 +57,7 @@
width: $(obj).width()
});
$(this.cPointer).css({
- top: objPos.top,
+ top: objPos.top
});
}
@@ -349,9 +351,13 @@
text += this.reorderHint;
}
if (this.showSortHint) {
- text += this.showReorderHint ? '
' : '';
+ text += text.length > 0 ? '
' : '';
text += this.sortHint;
}
+ if (this.showMarkHint) {
+ text += text.length > 0 ? '
' : '';
+ text += this.markHint;
+ }
// hide the hint if no text
if (!text) {
@@ -448,6 +454,7 @@
// assign column reorder & column sort hint
g.reorderHint = $('#col_order_hint').val();
g.sortHint = $('#sort_hint').val();
+ g.markHint = $('#col_mark_hint').val();
// determine whether to show the column reordering hint or not
g.showReorderHint = $firstRowCols.length > 1;
@@ -488,22 +495,25 @@
$(t).find('th.draggable')
.mousedown(function(e) {
g.dragStartMove(e, this);
- })
- // show/hide draggable column
- .mouseenter(function(e) {
- g.showHint(e);
- })
- .mouseleave(function(e) {
- g.hideHint();
});
}
+ $(t).find('th.draggable')
+ .mouseenter(function(e) {
+ g.showMarkHint = !g.showSortHint;
+ g.showHint(e);
+ })
+ .mouseleave(function(e) {
+ g.hideHint();
+ });
$(t).find('th.draggable a')
.mouseenter(function(e) {
g.showSortHint = true;
+ g.showMarkHint = false;
g.showHint(e);
})
.mouseleave(function(e) {
g.showSortHint = false;
+ g.showMarkHint = true;
g.showHint(e);
});
$(document).mousemove(function(e) {
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index 2a15a340f8..b50a60d9a0 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -192,11 +192,11 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
function PMA_isBrowsing()
{
// global variables set from sql.php
- global $is_count, $is_export, $is_func, $is_analyze;
+ global $is_count, $is_export, $is_func, $is_analyse;
global $analyzed_sql;
-
- return basename($GLOBALS['PMA_PHP_SELF']) == 'sql.php'
- && ! ($is_count || $is_export || $is_func || $is_analyse)
+
+ return ! ($is_count || $is_export || $is_func || $is_analyse)
+ && count($analyzed_sql[0]['select_expr']) == 0
&& isset($analyzed_sql[0]['queryflags']['select_from'])
&& count($analyzed_sql[0]['table_ref']) == 1;
}
@@ -406,10 +406,10 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
echo '';
}
- // generate text for draggable column hint
+ // generate hints
echo '';
- // generate text for sortable column hint
echo '';
+ echo '';
?>