Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
a34cee6ed9
@ -310,6 +310,61 @@ class PMA_Theme
|
||||
return $this->img_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a CSS rule used for html formatted SQL queries
|
||||
*
|
||||
* @param string $classname The class name
|
||||
* @param string $property The property name
|
||||
* @param string $value The property value
|
||||
*
|
||||
* @return string The CSS rule
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @see PMA_SQP_buildCssData()
|
||||
*/
|
||||
public function SQP_buildCssRule($classname, $property, $value)
|
||||
{
|
||||
$str = '.' . $classname . ' {';
|
||||
if ($value != '') {
|
||||
$str .= $property . ': ' . $value . ';';
|
||||
}
|
||||
$str .= '}' . "\n";
|
||||
|
||||
return $str;
|
||||
} // end of the "PMA_SQP_buildCssRule()" function
|
||||
|
||||
|
||||
/**
|
||||
* Builds CSS rules used for html formatted SQL queries
|
||||
*
|
||||
* @return string The CSS rules set
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @global array The current PMA configuration
|
||||
*
|
||||
* @see PMA_SQP_buildCssRule()
|
||||
*/
|
||||
public function SQP_buildCssData()
|
||||
{
|
||||
global $cfg;
|
||||
|
||||
$css_string = '';
|
||||
foreach ($cfg['SQP']['fmtColor'] AS $key => $col) {
|
||||
$css_string .= $this->SQP_buildCssRule('syntax_' . $key, 'color', $col);
|
||||
}
|
||||
|
||||
for ($i = 0; $i < 8; $i++) {
|
||||
$css_string .= $this->SQP_buildCssRule(
|
||||
'syntax_indent' . $i, 'margin-left',
|
||||
($i * $cfg['SQP']['fmtInd']) . $cfg['SQP']['fmtIndUnit']
|
||||
);
|
||||
}
|
||||
|
||||
return $css_string;
|
||||
} // end of the "PMA_SQP_buildCssData()" function
|
||||
|
||||
/**
|
||||
* load css (send to stdout, normally the browser)
|
||||
*
|
||||
@ -320,7 +375,7 @@ class PMA_Theme
|
||||
{
|
||||
$success = true;
|
||||
|
||||
echo PMA_SQP_buildCssData();
|
||||
echo $this->SQP_buildCssData();
|
||||
|
||||
if ($GLOBALS['text_dir'] === 'ltr') {
|
||||
$right = 'right';
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,6 @@
|
||||
|
||||
define('PMA_MINIMUM_COMMON', true);
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/sqlparser.lib.php';
|
||||
|
||||
// MSIE 6 (at least some unpatched versions) has problems loading CSS
|
||||
// when zlib_compression is on
|
||||
|
||||
Loading…
Reference in New Issue
Block a user