Project

General

Profile

Bug #32210 ยป class.tslib_fe.php.patch

The Patch includes a little bit of nice stying and a language selector for workspaces. - Michael Fritz, 2011-11-30 13:57

View differences:

class.tslib_fe.php (working copy)
* @return void
*/
function previewInfo() {
if ($this->fePreview && (!isset($this->config['config']['disablePreviewNotification']) || intval($this->config['config']['disablePreviewNotification']) !== 1)) {
if ($this->fePreview === 2) {
......
'pages_language_overlay',
'pid='.$this->id.' AND hidden=0 AND deleted=0') OR die(mysql_error());
$langselect = '<a href="'.t3lib_div::getIndpEnv('TYPO3_SITE_URL').'?id='.intval($_GET['id']).'&amp;type='.$_GET['type'].'&amp;L=0&amp;ADMCMD_noBeUser=#p'.$_GET['id'].'">Deutsch</a>&nbsp;';
$langselect = '<a class="previewlinkurl" href="'.t3lib_div::getIndpEnv('TYPO3_SITE_URL').'?id='.intval($_GET['id']).'&amp;type='.$_GET['type'].'&amp;L=0&amp;ADMCMD_noBeUser=#p'.$_GET['id'].'">Deutsch</a>&nbsp;';
if ($res) {
while( $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res) ) {
......
'sys_language',
'uid='.$row['sys_language_uid']);
$language = $GLOBALS['TYPO3_DB']->sql_fetch_row($res2);
$langselect .= '<a href="'.t3lib_div::getIndpEnv('TYPO3_SITE_URL').'?id='.intval($_GET['id']).'&amp;type='.$_GET['type'].'&amp;L='.$row['sys_language_uid'].'&amp;ADMCMD_noBeUser=#p'.$_GET['id'].'">'.$language[0].'</a>&nbsp;';
$langselect .= '<a class="previewlinkurl" href="'.t3lib_div::getIndpEnv('TYPO3_SITE_URL').'?id='.intval($_GET['id']).'&amp;type='.$_GET['type'].'&amp;L='.$row['sys_language_uid'].'&amp;ADMCMD_noBeUser=#p'.$_GET['id'].'">'.$language[0].'</a>&nbsp;';
}
}
$onclickForStoppingPreview = 'document.location="'.t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?ADMCMD_prev=LOGOUT&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')).'";return false;';
$text = 'Preview of workspace "'.$this->whichWorkspace(TRUE).'" ('.$this->whichWorkspace().')';
$html = $this->doWorkspacePreview() ? '<br/>'.$langselect.'<input name="_" type="submit" value="Stop preview" onclick="'.htmlspecialchars($onclickForStoppingPreview).'" />' : '';
$html = $this->doWorkspacePreview() ? '<br/><span style="float:left; width:200px;">'.$langselect.'</span><span style="float:right"><input name="_" type="submit" value="Stop preview" class="css3button" onclick="'.htmlspecialchars($onclickForStoppingPreview).'" /></span>' : '';
} else {
$text = 'PREVIEW!';
$html = '';
}
$stdMsg = '<div id="typo3-previewInfo" style="position: absolute; top: 20px; right: 20px; border: 2px solid #000; padding: 5px 5px; background: #f00; font: 1em Verdana; color: #000; font-weight: bold; z-index: 10001">'.htmlspecialchars($text).$html.'</div>';
$stdMsg = '<div id="typo3-previewInfo" style=" "><strong>'.htmlspecialchars($text).'</strong><br />'.$html.'</div>'
."<style>
a.previewlinkurl, a.previewlinkurl:active, a.previewlinkurl:visited {
color: rgba(0, 0, 0, 0.8);
line-height: 1.5;
text-shadow: 0 1px 0 #FFFFFF;
}
#typo3-previewInfo
{
position: absolute;
top: 0;
width: 400px;
background: #ddd;
-moz-border-radius: 4px;
border-radius: 4px;
padding: 1em 1.5em;
color: rgba(0,0,0, .8);
text-shadow: 0 1px 0 #fff;
line-height: 1.5;
margin: 0 auto 60px auto;
}
#typo3-previewInfo:before, #typo3-previewInfo:after
{
z-index: -1;
position: absolute;
content: '';
bottom: 15px;
left: 10px;
width: 50%;
top: 80%;
max-width:300px;
background: rgba(0, 0, 0, 0.7);
-webkit-box-shadow: 0 15px 10px rgba(0,0,0, 0.7);
-moz-box-shadow: 0 15px 10px rgba(0, 0, 0, 0.7);
box-shadow: 0 15px 10px rgba(0, 0, 0, 0.7);
-webkit-transform: rotate(-3deg);
-moz-transform: rotate(-3deg);
-o-transform: rotate(-3deg);
-ms-transform: rotate(-3deg);
transform: rotate(-3deg);
}
#typo3-previewInfo:after
{
-webkit-transform: rotate(3deg);
-moz-transform: rotate(3deg);
-o-transform: rotate(3deg);
-ms-transform: rotate(3deg);
transform: rotate(3deg);
right: 10px;
left: auto;
}
button.css3button, .css3button {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
cursor: pointer;
color: #ffffff;
padding: 10px 20px;
background: -moz-linear-gradient(
top,
#abb2b8 0%,
#424447);
background: -webkit-gradient(
linear, left top, left bottom,
from(#abb2b8),
to(#424447));
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border: 1px solid #003366;
-moz-box-shadow:
0px 1px 3px rgba(000,000,000,0),
inset 0px 0px 1px rgba(255,255,255,0.5);
-webkit-box-shadow:
0px 1px 3px rgba(000,000,000,0),
inset 0px 0px 1px rgba(255,255,255,0.5);
text-shadow:
0px -1px 0px rgba(000,000,000,0.7),
0px 1px 0px rgba(255,255,255,0.3);
}
</style>";
if ($this->fePreview === 2) {
$temp_content = $this->config['config']['message_preview_workspace'] ?
@sprintf($this->config['config']['message_preview_workspace'], $this->whichWorkspace(TRUE),$this->whichWorkspace()) :
......
} else {
$temp_content = $this->config['config']['message_preview'] ? $this->config['config']['message_preview'] : $stdMsg;
}
echo $temp_content;
$this->content .= $temp_content;
}
}
    (1-1/1)