rfe #2972969 [interface] Fix flipping of headers in non-IE browsers.

This commit is contained in:
Michal Čihař
2010-04-16 15:41:13 +02:00
parent 84d25c0c00
commit 87d19393b3
4 changed files with 45 additions and 32 deletions

View File

@@ -72,6 +72,7 @@ $Id$
- patch #2983960 [interface] Add javascript validation of datetime input,
thanks to Sutharshan Balachandren.
- rfe #2981999 [interface] Default sort order is now SMART.
- rfe #2972969 [interface] Fix flipping of headers in non-IE browsers.
3.3.3.0 (not yet released)
- patch #2982480 [navi] Do not group if there would be one table in group,

View File

@@ -1875,20 +1875,25 @@ $cfg['TrustedProxies'] =
"Left" and "right" are parsed as "top"
and &quot;bottom&quot; with vertical display mode.</dd>
<dt id="cfg_DefaultDisplay">$cfg['DefaultDisplay'] string
<span id="cfg_HeaderFlipType">$cfg['HeaderFlipType'] </span>string
</dt>
<dt id="cfg_DefaultDisplay">$cfg['DefaultDisplay'] string</dt>
<dd>There are 3 display modes: horizontal, horizontalflipped and vertical.
Define which one is displayed by default. The first mode displays each
row on a horizontal line, the second rotates the headers by 90
degrees, so you can use descriptive headers even though fields only
contain small values and still print them out. The vertical mode sorts
each row on a vertical lineup.<br /><br />
each row on a vertical lineup.
</dd>
The HeaderFlipType can be set to 'css' or 'fake'. When using 'css'
the rotation of the header for horizontalflipped is done via CSS. If
set to 'fake' PHP does the transformation for you, but of course this
does not look as good as CSS.</dd>
<dt id="cfg_HeaderFlipType">$cfg['HeaderFlipType'] </span>string</dt>
<dd>
The HeaderFlipType can be set to 'auto', 'css' or 'fake'. When using
'css' the rotation of the header for horizontalflipped is done via
CSS. The CSS transformation currently works only in Internet
Explorer.If set to 'fake' PHP does the transformation for you, but of
course this does not look as good as CSS. The 'auto' option enables
CSS transformation when browser supports it and use PHP based one
otherwise.
</dd>
<dt id="DefaultPropDisplay">
<span id="cfg_DefaultPropDisplay">$cfg['DefaultPropDisplay']</span>

View File

@@ -2179,12 +2179,12 @@ $cfg['DefaultDisplay'] = 'horizontal';
$cfg['DefaultPropDisplay'] = 3;
/**
* table-header rotation via faking or CSS? (css|fake)
* table-header rotation via faking or CSS? (css|fake|auto)
* NOTE: CSS only works in IE browsers!
*
* @global string $cfg['HeaderFlipType']
*/
$cfg['HeaderFlipType'] = 'css';
$cfg['HeaderFlipType'] = 'auto';
/**
* shows stored relation-comments in 'browse' mode.

View File

@@ -852,6 +852,13 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
$order_link_params['onmouseout'] = 'if(document.getElementById(\'soimg' . $i . '\')){ document.getElementById(\'soimg' . $i . '\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_desc.png\'; }';
}
}
if ($GLOBALS['cfg']['HeaderFlipType'] == 'auto') {
if (PMA_USR_BROWSER_AGENT == 'IE') {
$GLOBALS['cfg']['HeaderFlipType'] = 'css';
} else {
$GLOBALS['cfg']['HeaderFlipType'] = 'fake';
}
}
if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
&& $GLOBALS['cfg']['HeaderFlipType'] == 'css') {
$order_link_params['style'] = 'direction: ltr; writing-mode: tb-rl;';