Project

General

Profile

Bug #23996 » 16318v4.diff

Administrator Admin, 2010-11-13 23:31

View differences:

t3lib/class.t3lib_flashmessagequeue.php (working copy)
*/
public static function renderFlashMessages() {
$content = '';
$addFadeOutEffectJavascript = FALSE;
$flashMessages = self::getAllMessagesAndFlush();
if (count($flashMessages)) {
foreach ($flashMessages as $flashMessage) {
if ($flashMessage->getSeverity() <= t3lib_FlashMessage::OK) {
$flashMessage->addCssClass('message-fade-out');
$addFadeOutEffectJavascript = TRUE;
}
$content .= $flashMessage->render();
}
}
if ($addFadeOutEffectJavascript) {
$content .= LF . '<script type="text/javascript">' .
LF . '/*<![CDATA[*/' . LF . '<!--
Ext.select(".message-fade-out").each(function(message) {
message.pause(5).ghost("t", {remove:true});
});
' . LF . '// -->' . LF . '/*]]>*/' . LF .
'</script>';
}
return $content;
}
}
t3lib/class.t3lib_flashmessage.php (working copy)
protected $storeInSession = FALSE;
/**
* Additional CSS classes to use when rendering the flash message.
*
* @var array
*/
protected $additionalCssClasses = array();
/**
* Constructor for a flash message
*
* @param string The message.
......
}
/**
* Adds a CSS class when rendering the flash message.
*
* @param string The CSS class to add
*/
public function addCssClass($cssClass) {
$this->additionalCssClasses[] = htmlspecialchars($cssClass);
}
/**
* Renders the flash message.
*
* @return string The flash message as HTML.
......
$title = '<div class="message-header">' . $this->title . '</div>';
}
$message = '<div class="typo3-message message-' . $classes[$this->severity] . '">'
$message = '<div class="typo3-message '
. 'message-' . $classes[$this->severity] . ' '
. implode(' ', $this->additionalCssClasses)
. '">'
. $title
. '<div class="message-body">' . $this->message . '</div>'
. '</div>';
. '</div>';
return $message;
}
(2-2/3)