API CHANGE Removed LeftAndMain->setLogo() $logoStyle parameter and LeftAndMain->LogoStyle(), use CSS

This commit is contained in:
Ingo Schommer 2011-03-31 12:03:21 +13:00
parent e3928a0517
commit 05f0ce3a21
2 changed files with 2 additions and 25 deletions

View File

@ -1137,39 +1137,16 @@ class LeftAndMain extends Controller {
* @var unknown_type * @var unknown_type
*/ */
static $application_logo = 'sapphire/admin/images/mainmenu/logo.gif'; static $application_logo = 'sapphire/admin/images/mainmenu/logo.gif';
/**
* The application logo style. Customisable by calling
* LeftAndMain::setLogo() - the second parameter.
*
* @var String
*/
static $application_logo_style = '';
/** /**
* Set the CMS application logo. * Set the CMS application logo.
* *
* @param String $logo Relative path to the logo * @param String $logo Relative path to the logo
* @param String $logoStyle Custom CSS styles for the logo
* e.g. "border: 1px solid red; padding: 5px;"
*/ */
static function setLogo($logo, $logoStyle) { static function setLogo($logo) {
self::$application_logo = $logo; self::$application_logo = $logo;
self::$application_logo_style = $logoStyle;
self::$application_logo_text = ''; self::$application_logo_text = '';
} }
/**
* Combines an optional background image and additional CSS styles,
* set through {@link setLogo()}.
*
* @return String CSS attribute
*/
function LogoStyle() {
$attr = self::$application_logo_style;
if(self::$application_logo) $attr .= "background: url(" . self::$application_logo . ") no-repeat; ";
return $attr;
}
/** /**
* Return the base directory of the tiny_mce codebase * Return the base directory of the tiny_mce codebase

View File

@ -1,4 +1,4 @@
<div id="Logo" style="$LogoStyle"> <div id="Logo">
<% if ApplicationLogoText %> <% if ApplicationLogoText %>
<a href="$ApplicationLink" target="_blank">$ApplicationLogoText</a><br /> <a href="$ApplicationLink" target="_blank">$ApplicationLogoText</a><br />
<% end_if %> <% end_if %>