diff options
Diffstat (limited to 'LibertySystem.php')
| -rwxr-xr-x | LibertySystem.php | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/LibertySystem.php b/LibertySystem.php index 88c978c..c859466 100755 --- a/LibertySystem.php +++ b/LibertySystem.php @@ -3,7 +3,7 @@ * System class for handling the liberty package * * @package liberty -* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.73 2007/05/20 09:18:10 laetzer Exp $ +* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.74 2007/05/20 10:09:14 squareing Exp $ * @author spider <spider@steelsun.com> */ @@ -844,7 +844,7 @@ $gLibertySystem = new LibertySystem(); * @access public * @return hash full of styling goodies */ -function liberty_plugins_div_style( $pParamHash ) { +function liberty_plugins_wrapper_style( $pParamHash ) { $ret = array(); $ret['style'] = $ret['description'] = ''; @@ -854,6 +854,11 @@ function liberty_plugins_div_style( $pParamHash ) { $pParamHash['text-align'] = 'right'; } + // force display:block to the "div" if not specified otherwise + if( empty( $pParamHash['display'] )) { + $pParamHash['display'] = "block"; + } + foreach( $pParamHash as $key => $value ) { if( !empty( $value ) ) { switch( $key ) { @@ -864,8 +869,6 @@ function liberty_plugins_div_style( $pParamHash ) { $ret[$key] = $value; break; // styling - case 'background-color': - $key = 'background'; case 'width': case 'height': if( preg_match( "/^\d+(em|px|%|pt)$/", trim( $value ) ) ) { @@ -873,9 +876,10 @@ function liberty_plugins_div_style( $pParamHash ) { } elseif( preg_match( "/^\d+$/", $value ) ) { $ret['style'] .= "{$key}:{$value}px;"; } + break; + case 'background': + $key = 'background-color'; case 'float': - case 'width': - case 'height': case 'padding': case 'margin': case 'background': @@ -886,6 +890,7 @@ function liberty_plugins_div_style( $pParamHash ) { case 'font-size': case 'font-weight': case 'font-family': + case 'display': $ret['style'] .= "{$key}:{$value};"; break; // align and float are special @@ -903,13 +908,6 @@ function liberty_plugins_div_style( $pParamHash ) { } } } - - // force display:block to the "div" if not specified otherwise - if( empty($pParamHash['display_prop']) || !isset($pParamHash['display_prop']) ){ - $ret['style'] .= "display:block;"; - }else{ - $ret['style'] .= "display:" . $pParamHash['display_prop'] . ""; - } } return $ret; |
