Bug #18047 » 20080205_rfc7262_base.diff
typo3/stylesheet.css (working copy) | ||
---|---|---|
background-color: #9BA1A8;
|
||
}
|
||
body#typo3-alt-doc-php { padding: 0; margin: 0; overflow: hidden; height: 100%; }
|
||
body#typo3-alt-doc-php, body#typo3-db-list-php, body#ext-cms-layout-db-layout-php, body#ext-tstemplate-ts-index-php, body#typo3-mod-web-perm-index-php, body#typo3-mod-web-info-index-php, body#typo3-mod-web-func-index-php, body#ext-version-cm1-index-php { padding: 0; margin: 0; overflow: hidden; height: 100%; }
|
||
/****************************************
|
||
* SPECIFIC WRAPPERS
|
||
*
|
||
... | ... | |
div#typo3-docheader div.buttonsleft { margin: 0 0 0 3px; line-height: 16px; float: left; }
|
||
div#typo3-docheader div.buttonsright { margin: 0 3px 0 0; line-height: 16px; float: right; }
|
||
div#typo3-docheader img, div#typo3-docheader input { margin: 2px 3px 0; vertical-align: top; }
|
||
div#typo3-docheader img.typo3-csh-icon { margin: 2px 15px 0 2px; }
|
||
div#typo3-docheader select { margin: 2px 0 0; }
|
||
div#typo3-docheader img.typo3-csh-icon { margin: 2px 2px 0 2px; }
|
||
div#typo3-docheader select { margin: 1px 0 0; }
|
||
div#typo3-docheader div.pagepath { margin-left: 6px; float: left; }
|
||
div#typo3-docheader div.infooptions { margin-right: 6px; float: right; }
|
||
div#typo3-docbody { width: 98%; padding: 2% 0% 2% 2%; overflow: auto; top: 49px; bottom: 0; position: absolute; z-index: 2; }
|
||
* html div#typo3-docbody { height: 90%; top: 49px; padding-top: 0; padding-bottom: 0; }
|
||
div#typo3-docbody { width: 98%; padding: 2% 0% 2% 2%; overflow: auto; top: 51px; bottom: 0; position: absolute; z-index: 2; }
|
||
* html div#typo3-docbody { height: 90%; top: 51px; padding-top: 0; padding-bottom: 0; }
|
||
* html div#typo3-docbody table.typo3-TCEforms { margin-top: 20px; }
|
||
div#typo3-docheader div.buttongroup { height: 20px; float: left; padding-right: 20px; border-right: 1px dashed #ccc; margin-right: 5px; }
|
||
/* Login Screen
|
||
... | ... | |
TABLE#typo3-page-stdlist TR TD.c-headLine { background-color: #ABBBB4; }
|
||
/* Web > List */
|
||
TABLE.typo3-dblist { width: 98%; }
|
||
TABLE.typo3-dblist { width: 93%; }
|
||
TABLE.typo3-dblist IMG { vertical-align: middle; }
|
||
TABLE.typo3-dblist TR TD { padding-left: 1px; padding-right: 6px; }
|
||
TABLE.typo3-dblist TR TD.db_list_alt { background-color: #E3DFD3; }
|
||
... | ... | |
DIV#typo3-newRecordLink IMG, DIV.typo3-newRecordLink IMG, DIV.typo3-localizationLink IMG, DIV.typo3-synchronizationLink IMG { margin-right: 5px; vertical-align: middle; }
|
||
INPUT.smallCheckboxes { vertical-align: middle; margin: 0px; padding: 0px; width: 12px; height: 12px; }
|
||
DIV#typo3-listOptions { margin: 10px 0px 10px 0px; }
|
||
DIV#typo3-listOptions { margin: 10px 0px 10px 0px; width: 93%; }
|
||
/* Web > Template */
|
||
.typo3-tstemplate-ceditor-control { margin-right: 3px; vertical-align: bottom;cursor:pointer;}
|
||
... | ... | |
*********************************************/
|
||
/* context menus */
|
||
div#contentMenu0 { z-index: 1; position: absolute; }
|
||
div#contentMenu1 { z-index: 2; position: absolute; }
|
||
div#contentMenu0 { z-index: 10; position: absolute; }
|
||
div#contentMenu1 { z-index: 20; position: absolute; }
|
||
/* Dimmed span tag color (disabled) */
|
||
.typo3-dimmed { color: #666; }
|
||
... | ... | |
H2,H3,H4,DIV { border: 1px dotted #666; }
|
||
*/
|
||
typo3/template.php (working copy) | ||
---|---|---|
var $JScodeArray = array(); // Similar to $JScode but for use as array with associative keys to prevent double inclusion of JS code. a <script> tag is automatically wrapped around.
|
||
var $postCode=''; // Additional 'page-end' code could be accommulated in this var. It will be outputted at the end of page before </body> and some other internal page-end code.
|
||
var $docType = ''; // Doc-type used in the header. Default is HTML 4. You can also set it to 'strict', 'xhtml_trans', or 'xhtml_frames'.
|
||
var $moduleTemplate = ''; // HTML template with markers for module
|
||
// Other vars you can change, but less frequently used:
|
||
var $scriptID=''; // Script ID.
|
||
... | ... | |
}
|
||
}
|
||
}
|
||
/**
|
||
* Function to load a HTML template file with markers.
|
||
*
|
||
* @param string tmpl name, usually in the typo3/template/ directory
|
||
* @return string HTML of template
|
||
*/
|
||
function getHtmlTemplate($filename) {
|
||
if ($GLOBALS['TBE_STYLES']['htmlTemplates'][$filename]) {
|
||
$filename = $GLOBALS['TBE_STYLES']['htmlTemplates'][$filename];
|
||
}
|
||
return ($filename ? t3lib_div::getURL($this->backPath . $filename) : '');
|
||
}
|
||
|
||
/**
|
||
* Define the template for the module
|
||
*
|
||
* @param string filename
|
||
*/
|
||
function setModuleTemplate($filename) {
|
||
$this->moduleTemplate = $this->getHtmlTemplate($filename);
|
||
}
|
||
|
||
/**
|
||
* Put together the various elements for the module <body> using a static HTML
|
||
* template
|
||
*
|
||
* @param array Record of the current page, used for page path and info
|
||
* @param array HTML for all buttons
|
||
* @param array HTML for all other markers
|
||
* @return string Composite HTML
|
||
*/
|
||
function moduleBody($pageRecord = array(), $buttons = array(), $markerArray = array()) {
|
||
// Get the HTML template for the module
|
||
$moduleBody = t3lib_parsehtml::getSubpart($this->moduleTemplate, '###FULLDOC###');
|
||
// Add CSS
|
||
$this->inDocStylesArray[] = 'html { overflow: hidden; }';
|
||
// Add JS code to the <head> for IE
|
||
$this->JScode.= $this->wrapScriptTags('
|
||
// workaround since IE6 cannot deal with relative height for scrolling elements
|
||
function resizeDocBody() {
|
||
$("typo3-docbody").style.height = (document.body.offsetHeight - parseInt($("typo3-docheader").getStyle("height")));
|
||
}
|
||
if (/MSIE 6/.test(navigator.userAgent)) {
|
||
Event.observe(window, "resize", resizeDocBody, false);
|
||
Event.observe(window, "load", resizeDocBody, false);
|
||
}
|
||
');
|
||
// Get the page path for the docheader
|
||
$markerArray['PAGEPATH'] = $this->pagePath($pageRecord);
|
||
// Get the page info for the docheader
|
||
$markerArray['PAGEINFO'] = $this->pageInfo($pageRecord);
|
||
// Get all the buttons for the docheader
|
||
$docHeaderButtons = $this->docHeaderButtons($buttons);
|
||
// Merge docheader buttons with the marker array
|
||
$markerArray = array_merge($markerArray, $docHeaderButtons);
|
||
// replacing all markers with the finished markers and return the HTML content
|
||
return t3lib_parsehtml::substituteMarkerArray($moduleBody, $markerArray, '###|###');
|
||
}
|
||
|
||
/**
|
||
* Fill the button lists with the defined HTML
|
||
*
|
||
* @param array HTML for all buttons
|
||
* @return array Containing HTML for both buttonlists
|
||
*/
|
||
function docHeaderButtons($buttons) {
|
||
$markerArray = array();
|
||
// Fill buttons for left and right float
|
||
$floats = array('left', 'right');
|
||
foreach($floats as $key) {
|
||
// Get the template for each float
|
||
$buttonTemplate = t3lib_parsehtml::getSubpart($this->moduleTemplate, '###BUTTON_GROUPS_' . strtoupper($key) . '###');
|
||
// Fill the button markers in this float
|
||
$buttonTemplate = t3lib_parsehtml::substituteMarkerArray($buttonTemplate, $buttons, '###|###', true);
|
||
// getting the wrap for each group
|
||
$buttonWrap = t3lib_parsehtml::getSubpart($this->moduleTemplate, '###BUTTON_GROUP_WRAP###');
|
||
// looping through the groups (max 6) and remove the empty groups
|
||
for ($groupNumber = 1; $groupNumber < 6; $groupNumber++) {
|
||
$buttonMarker = '###BUTTON_GROUP' . $groupNumber . '###';
|
||
$buttonGroup = t3lib_parsehtml::getSubpart($buttonTemplate, $buttonMarker);
|
||
if (trim($buttonGroup)) {
|
||
if ($buttonWrap) {
|
||
$buttonGroup = t3lib_parsehtml::substituteMarker($buttonWrap, '###BUTTONS###', $buttonGroup);
|
||
}
|
||
$buttonTemplate = t3lib_parsehtml::substituteSubpart($buttonTemplate, $buttonMarker, trim($buttonGroup));
|
||
}
|
||
}
|
||
// replace the marker with the template and remove all line breaks (for IE compat)
|
||
$markerArray['BUTTONLIST_' . strtoupper($key)] = str_replace("\n", '', $buttonTemplate);
|
||
}
|
||
return $markerArray;
|
||
}
|
||
|
||
/**
|
||
* Generate the page path for docheader
|
||
*
|
||
* @param array Current page
|
||
* @return string Page path
|
||
*/
|
||
function pagePath($pageRecord) {
|
||
global $LANG;
|
||
// Is this a real page
|
||
if ($pageRecord['uid']) {
|
||
$title = $pageRecord['_thePath'];
|
||
} else {
|
||
$title = $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'];
|
||
}
|
||
// Setting the path of the page
|
||
$pagePath = $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path', 1) . ': <strong>' . htmlspecialchars(t3lib_div::fixed_lgd_cs($title, -50)) . '</strong>';
|
||
return $pagePath;
|
||
}
|
||
|
||
/**
|
||
* Setting page icon with clickmenu + uid for docheader
|
||
*
|
||
* @param array Current page
|
||
* @return string Page info
|
||
*/
|
||
function pageInfo($pageRecord) {
|
||
global $BE_USER;
|
||
// Add icon with clickmenu, etc:
|
||
if ($pageRecord['uid']) { // If there IS a real page
|
||
$alttext = t3lib_BEfunc::getRecordIconAltText($pageRecord, 'pages');
|
||
$iconImg = t3lib_iconWorks::getIconImage('pages', $pageRecord, $this->backPath, 'class="absmiddle" title="'. htmlspecialchars($alttext) . '"');
|
||
// Make Icon:
|
||
$theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, 'pages', $pageRecord['uid']);
|
||
} else { // On root-level of page tree
|
||
// Make Icon
|
||
$iconImg = '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/i/_icon_website.gif') . ' alt="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . '" />';
|
||
if($BE_USER->user['admin']) {
|
||
$theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, 'pages', 0);
|
||
} else {
|
||
$theIcon = $iconImg;
|
||
}
|
||
}
|
||
|
||
// Setting icon with clickmenu + uid
|
||
$pageInfo = $theIcon . '<em>[pid: ' . $pageRecord['uid'] . ']</em>';
|
||
return $pageInfo;
|
||
}
|
||
}
|
||
// ******************************
|
||
// Extension classes of the template class.
|
||
// These are meant to provide backend screens with different widths.
|