(feature) Fixed #6625: Cleaner Backend / HCI: Make "alt_doc" header fixed
authorBenni Mack <benni.mack@typo3.org>
Tue, 13 Nov 2007 23:42:57 +0000 (23:42 +0000)
committerBenni Mack <benni.mack@typo3.org>
Tue, 13 Nov 2007 23:42:57 +0000 (23:42 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2695 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms.php
typo3/alt_doc.php
typo3/stylesheet.css
typo3/sysext/t3skin/stylesheets/typo3-TCEforms.css
typo3/template.php

index dbd0051..5d580ad 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-14  Benjamin Mack  <mack@xnos.org>
+
+       * (feature) Fixed #6625: Cleaner Backend / HCI: Make "alt_doc" header fixed
+
 2007-11-13  Stanislas Rolland  <stanislas.rolland@fructifor.ca>
 
        * Feature #6705: htmlArea RTE: Display all classes of an element in the statusbar
index 7d40de9..d4bc1db 100755 (executable)
@@ -4350,10 +4350,9 @@ class t3lib_TCEforms     {
 
                        // Wrapping all table rows for a particular record being edited:
                $this->totalWrap='
-               <table border="0" cellspacing="0" cellpadding="0" width="'.($this->docLarge ? 440+150 : 440).'" class="typo3-TCEforms">'.
-                       '<tr class="bgColor2">
-                               <td><!-- --></td>
-                               <td>###RECORD_ICON### <span class="typo3-TCEforms-recHeader">###TABLE_TITLE###</span> ###ID_NEW_INDICATOR### - ###RECORD_LABEL###</td>
+               <table class="typo3-TCEforms">'.
+                       '<tr class="typo3-TCEforms-recHeaderRow bgColor2">
+                               <td colspan="2">###RECORD_ICON### <span class="typo3-TCEforms-recHeader">###TABLE_TITLE###</span> ###ID_NEW_INDICATOR### - ###RECORD_LABEL###</td>
                        </tr>'.
                        '|'.
                        '<tr>
index 95a5e5f..125daa4 100755 (executable)
@@ -246,6 +246,7 @@ class SC_alt_doc {
                }
        }
 
+
        /**
         * Detects, if a save command has been triggered.
         *
@@ -256,6 +257,7 @@ class SC_alt_doc {
                return $out;
        }
 
+
        /**
         * Do processing of data, submitting it to TCEmain.
         *
@@ -286,13 +288,17 @@ class SC_alt_doc {
                }
 
                        // Setting internal vars:
-               if ($BE_USER->uc['neverHideAtCopy'])    {       $tce->neverHideAtCopy = 1;      }
+               if ($BE_USER->uc['neverHideAtCopy'])    {
+                       $tce->neverHideAtCopy = 1;
+               }
                $tce->debug=0;
                $tce->disableRTE = $this->disableRTE;
 
                        // Loading TCEmain with data:
                $tce->start($this->data,$this->cmd);
-               if (is_array($this->mirror))    {       $tce->setMirror($this->mirror); }
+               if (is_array($this->mirror))    {
+                       $tce->setMirror($this->mirror);
+               }
 
                        // If pages are being edited, we set an instruction about updating the page tree after this operation.
                if (isset($this->data['pages']))        {
@@ -440,14 +446,15 @@ class SC_alt_doc {
                $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
 
                        // Create an instance of the document template object
-               $this->doc = t3lib_div::makeInstance('mediumDoc');
-               $this->doc->bodyTagMargins['x']=5;
-               $this->doc->bodyTagMargins['y']=5;
+               $this->doc = t3lib_div::makeInstance('template');
+               $this->doc->divClass = 'typo3-fullDoc';
                $this->doc->backPath = $BACK_PATH;
                $this->doc->docType = 'xhtml_trans';
+               $this->doc->inDocStylesArray[] = 'html { overflow: hidden; }';
 
                $this->doc->form='<form action="'.htmlspecialchars($this->R_URI).'" method="post" enctype="'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'].'" name="editform" onsubmit="document.editform._scrollPosition.value=(document.documentElement.scrollTop || document.body.scrollTop); return TBE_EDITOR.checkSubmit(1);">';
 
+               $this->doc->loadJavascriptLib('contrib/prototype/prototype.js');
                $this->doc->JScode = $this->doc->wrapScriptTags('
                        function jumpToUrl(URL,formEl)  {       //
                                if (!TBE_EDITOR.isFormChanged())        {
@@ -457,6 +464,15 @@ class SC_alt_doc {
                                }
                        }
 
+                               // 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(document, "load", resizeDocBody, false);
+                       }
+
                                // Object: TS:
                        function typoSetup      ()      {       //
                                this.uniqueID = "";
@@ -535,36 +551,25 @@ class SC_alt_doc {
                        $editForm = $this->makeEditForm();
 
                        if ($editForm)  {
-                               reset($this->elementsData);
-                               $this->firstEl = current($this->elementsData);
+                               $this->firstEl = reset($this->elementsData);
 
-                                       // language switch/selector for editing
-                                       // show only when a single record is edited - multiple records are too confusing
-                               if (count($this->elementsData)==1) {
-                                       $languageSwitch = $this->languageSwitch($this->firstEl['table'], $this->firstEl['uid'], $this->firstEl['pid']);
-                               }
+                                       // Module configuration
+                               $this->modTSconfig = ($this->viewId ? t3lib_BEfunc::getModTSconfig($this->viewId,'mod.xMOD_alt_doc') : array());
 
-
-                               if ($this->viewId)      {
-                                               // Module configuration:
-                                       $this->modTSconfig = t3lib_BEfunc::getModTSconfig($this->viewId,'mod.xMOD_alt_doc');
-                               } else $this->modTSconfig=array();
-
-                               $panel = $this->makeButtonPanel();
-                               $docSel = $this->makeDocSel();
-                               $cMenu = $this->makeCmenu();
-
-                               $formContent = $this->compileForm($panel,$docSel,$cMenu,$editForm,$languageSwitch);
-
-                               $this->content.= $this->tceforms->printNeededJSFunctions_top().
-                                                                       $formContent.
-                                                                       $this->tceforms->printNeededJSFunctions();
-                               $this->content.= $this->functionMenus();
+                               $this->content .= 
+                                       $this->tceforms->printNeededJSFunctions_top().
+                                       $this->compileHeader().'
+       <div id="typo3-docbody">'.
+                                       $this->compileForm($editForm).
+                                       $this->tceforms->printNeededJSFunctions().
+                                       $this->functionMenus().
 
                                        // Add CSH:
-                               $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'TCEforms', $GLOBALS['BACK_PATH'],'<br/>|',FALSE,'margin-top: 20px;');
-
-                               $this->content.= $this->shortCutLink();
+                                       t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'TCEforms', $GLOBALS['BACK_PATH'],'<br/>|',FALSE,'margin-top: 20px;').
+                                       '<br /><br />'.
+                                       $this->shortCutLink().
+                                       $this->openInNewWindowLink().'
+       </div>';
 
                                $this->tceformMessages();
                        }
@@ -765,9 +770,7 @@ class SC_alt_doc {
                                                                        if ($lockInfo = t3lib_BEfunc::isRecordLocked($table,$rec['uid']))       {
                                                                                $lockIcon = '
 
-                                                                                       <!--
-                                                                                               Warning box:
-                                                                                       -->
+                                                                                       <!-- Warning box: -->
                                                                                        <table border="0" cellpadding="0" cellspacing="0" class="warningbox">
                                                                                                <tr>
                                                                                                        <td><img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/recordlock_warning3.gif','width="17" height="12"').' alt="" /></td>
@@ -796,42 +799,55 @@ class SC_alt_doc {
                return $editForm;
        }
 
+
        /**
         * Create the panel of buttons for submitting the form or otherwise perform operations.
         *
         * @return      string          HTML code, comprised of images linked to various actions.
         */
        function makeButtonPanel()      {
-               global $TCA,$LANG;
+               $btns = $this->getButtons();
+               unset($btns['shortcut']);
+               return implode('', $btns);
+       }
+
 
-               $panel='';
+       /**
+        * Create the panel of buttons for submitting the form or otherwise perform operations.
+        *
+        * @return      array   all available buttons as an assoc. array
+        */
+       function getButtons()   {
+               global $TCA,$LANG;
+               $buttons = array();
 
                        // Render SAVE type buttons:
                        // The action of each button is decided by its name attribute. (See doProcessData())
                if (!$this->errorC && !$TCA[$this->firstEl['table']]['ctrl']['readOnly'])       {
 
                                // SAVE button:
-                       $panel.= '<input type="image" class="c-inputButton" name="_savedok"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/savedok.gif','').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc',1).'" />';
+                       $buttons['save'] = '<input type="image" class="c-inputButton" name="_savedok"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/savedok.gif','').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc',1).'" />';
 
                                // SAVE / VIEW button:
                        if ($this->viewId && !$this->noView && t3lib_extMgm::isLoaded('cms')) {
-                               $panel.= '<input type="image" class="c-inputButton" name="_savedokview"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/savedokshow.gif','').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDocShow',1).'" />';
+                               $buttons['save_view'] = '<input type="image" class="c-inputButton" name="_savedokview"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/savedokshow.gif','').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDocShow',1).'" />';
                        }
 
                                // SAVE / NEW button:
                        if (count($this->elementsData)==1 && $this->getNewIconMode($this->firstEl['table'])) {
-                               $panel.= '<input type="image" class="c-inputButton" name="_savedoknew"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/savedoknew.gif','').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveNewDoc',1).'" />';
+                               $buttons['save_new'] = '<input type="image" class="c-inputButton" name="_savedoknew"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/savedoknew.gif','').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveNewDoc',1).'" />';
                        }
 
                                // SAVE / CLOSE
-                       $panel.= '<input type="image" class="c-inputButton" name="_saveandclosedok"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/saveandclosedok.gif','').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc',1).'" />';
+                       $buttons['save_close'] = '<input type="image" class="c-inputButton" name="_saveandclosedok"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/saveandclosedok.gif','').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc',1).'" />';
                }
 
                        // CLOSE button:
-               $panel.= '<a href="#" onclick="document.editform.closeDoc.value=1; document.editform.submit(); return false;">'.
+               $buttons['close'] = '<a href="#" onclick="document.editform.closeDoc.value=1; document.editform.submit(); return false;">'.
                                '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/closedok.gif','width="21" height="16"').' class="c-inputButton" title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc',1).'" alt="" />'.
                                '</a>';
 
+
                        // DELETE + UNDO buttons:
                if (!$this->errorC && !$TCA[$this->firstEl['table']]['ctrl']['readOnly'] && count($this->elementsData)==1)      {
                        if ($this->firstEl['cmd']!='new' && t3lib_div::testInt($this->firstEl['uid']))  {
@@ -839,41 +855,39 @@ class SC_alt_doc {
                                        // Delete:
                                if ($this->firstEl['deleteAccess'] && !$TCA[$this->firstEl['table']]['ctrl']['readOnly'] && !$this->getNewIconMode($this->firstEl['table'],'disableDelete')) {
                                        $aOnClick = 'return deleteRecord(\''.$this->firstEl['table'].'\',\''.$this->firstEl['uid'].'\',unescape(\''.rawurlencode($this->retUrl).'\'));';
-                                       $panel.= '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
+                                       $buttons['delete'] = '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
                                                        '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/deletedok.gif','width="21" height="16"').' class="c-inputButton" title="'.$LANG->getLL('deleteItem',1).'" alt="" />'.
                                                        '</a>';
                                }
 
                                        // Undo:
-                               $undoButton = 0;
                                $undoRes = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tstamp', 'sys_history', 'tablename='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->firstEl['table'], 'sys_history').' AND recuid='.intval($this->firstEl['uid']), '', 'tstamp DESC', '1');
                                if ($undoButtonR = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($undoRes))     {
-                                       $undoButton = 1;
-                               }
-                               if ($undoButton) {
                                        $aOnClick = 'window.location.href=\'show_rechis.php?element='.rawurlencode($this->firstEl['table'].':'.$this->firstEl['uid']).'&revert=ALL_FIELDS&sumUp=-1&returnUrl='.rawurlencode($this->R_URI).'\'; return false;';
-                                       $panel.= '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
+                                       $buttons['undo'] = '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
                                                        '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/undo.gif','width="21" height="16"').' class="c-inputButton" title="'.htmlspecialchars(sprintf($LANG->getLL('undoLastChange'),t3lib_BEfunc::calcAge(time()-$undoButtonR['tstamp'],$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')))).'" alt="" />'.
                                                        '</a>';
                                }
                                if ($this->getNewIconMode($this->firstEl['table'],'showHistory'))       {
                                        $aOnClick = 'window.location.href=\'show_rechis.php?element='.rawurlencode($this->firstEl['table'].':'.$this->firstEl['uid']).'&returnUrl='.rawurlencode($this->R_URI).'\'; return false;';
-                                       $panel.= '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
+                                       $buttons['history'] = '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
                                                        '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/history2.gif','width="13" height="12"').' class="c-inputButton" alt="" />'.
                                                        '</a>';
                                }
 
                                        // If only SOME fields are shown in the form, this will link the user to the FULL form:
                                if ($this->columnsOnly) {
-                                       $panel.= '<a href="'.htmlspecialchars($this->R_URI.'&columnsOnly=').'">'.
+                                       $buttons['columns_only'] = '<a href="'.htmlspecialchars($this->R_URI.'&columnsOnly=').'">'.
                                                        '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/edit2.gif','width="11" height="12"').' class="c-inputButton" title="'.$LANG->getLL('editWholeRecord',1).'" alt="" />'.
                                                        '</a>';
                                }
                        }
                }
-               return $panel;
+               $buttons['shortcut'] = $this->shortCutLink();
+               return $buttons;
        }
 
+
        /**
         * Create the selector box form element which allows to select between open documents.
         * Can be disabled through Page TSconfig.
@@ -883,6 +897,7 @@ class SC_alt_doc {
        function makeDocSel()   {
                global $BE_USER,$LANG;
 
+               $docSel = '';
                        // Render the selector ONLY if it has not been disabled:
                if (!$this->modTSconfig['properties']['disableDocSelector'])    {
 
@@ -893,7 +908,6 @@ class SC_alt_doc {
                        }
 
                                // Now, create the document selector box:
-                       $docSel='';
                        if (is_array($this->docHandler))        {
                                $opt = array();
                                $opt[] = '<option value="">[ '.$LANG->getLL('openDocs',1).': ]</option>';
@@ -911,7 +925,7 @@ class SC_alt_doc {
                                        // Add CSH:
                                $docSel.=t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'TCEforms_docSelector', $GLOBALS['BACK_PATH'],'', TRUE);
                        }
-               } else $docSel='';
+               }
                return $docSel;
        }
 
@@ -923,6 +937,7 @@ class SC_alt_doc {
         * @see template::clearCacheMenu()
         */
        function makeCmenu()    {
+               $cMenu = '';
 
                        // Generate the menu if NOT disabled:
                if (!$this->modTSconfig['properties']['disableCacheSelector'])  {
@@ -930,85 +945,89 @@ class SC_alt_doc {
 
                                // Add CSH:
                        $cMenu.=t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'TCEforms_cacheSelector', $GLOBALS['BACK_PATH'],'', TRUE);
-               } else $cMenu ='';
+               }
                return $cMenu;
        }
 
+
        /**
-        * Put together the various elements (buttons, selectors, form) into a table
+        * Put together the various elements for the header
         *
-        * @param       string          The button panel HTML
-        * @param       string          Document selector HTML
-        * @param       string          Clear-cache menu HTML
-        * @param       string          HTML form.
-        * @param       string          Language selector HTML for localization
         * @return      string          Composite HTML
         */
-       function compileForm($panel,$docSel,$cMenu,$editForm, $langSelector='') {
+       function compileHeader()        {
                global $LANG;
 
+               $btns = $this->getButtons();
+               $docSel = $this->makeDocSel();
+               $cMenu = $this->makeCmenu();
 
-               $formContent='';
-               $formContent.='
-
-                       <!--
-                               Header of the editing page.
-                               Contains the buttons for saving/closing, the document selector and menu selector.
-                               Shows the path of the editing operation as well.
-                       -->
-                       <table border="0" cellpadding="0" cellspacing="1" width="470" id="typo3-altdoc-header">
-                               <tr>
-                                       <td nowrap="nowrap" valign="top"><div class="bgColor4" style="position:fixed; padding: 5px 5px 5px 5px; border: 1px solid black;">'.$panel.'</div></td>
-                                       <td nowrap="nowrap" valign="top" align="right">'.$docSel.$cMenu.'</td>
-                               </tr>';
-
-               if ($langSelector) {
-                       $langSelector ='<div id="typo3-altdoc-lang-selector">'.$langSelector.'</div>';
-               }
+               $content = '
+       <!-- Page header with buttons for saving & closing and path details -->
+       <div id="typo3-docheader">
+               <div id="typo3-docheader-row1">
+                       <div class="buttonsleft">'.$btns['save'].$btns['save_view'].$btns['save_close'].$btns['save_new'].'</div>
+                       <div class="buttonsright">'.$docSel.$cMenu.$btns['delete'].$btns['shortcut'].$btns['history'].$btns['undo'].$btns['close'].'</div>
+               </div>
+               ';
 
                if (is_array($this->tceforms->extraFormHeaders))        {
-                       $formContent .= implode(chr(10), $this->tceforms->extraFormHeaders);
+                       $content .= '<div id="typo3-docheader-rowextra">'.implode(chr(10), $this->tceforms->extraFormHeaders).'</div>';
                }
 
-               $pagePath = '<div id="typo3-altdoc-page-path">'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path',1).': '.htmlspecialchars($this->generalPathOfForm).'</div>';
 
-               $formContent.='
-                               <tr>
-                                       <td colspan="2"><div id="typo3-altdoc-header-info-options">'.$pagePath.$langSelector.'</div></td>
-                               </tr>
-                       </table>
+                       // language switch/selector for editing
+                       // show only when a single record is edited - multiple records are too confusing
+               if (count($this->elementsData) == 1) {
+                       $langSelector = '<div class="langselector">'.$this->languageSwitch($this->firstEl['table'], $this->firstEl['uid'], $this->firstEl['pid']).'</div>';
+               }
 
+               
+               $content.='
+               <div id="typo3-docheader-row2">
+                       <div class="pagepath">'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path',1).': '.htmlspecialchars($this->generalPathOfForm).'</div>
+                       <div class="infooptions">'.$langSelector.'</div>
+               </div>
+       </div>';
+               return $content;
+       }
 
 
+       /**
+        * Put together the various elements (buttons, selectors, form) into a table
+        *
+        * @param       string          HTML form.
+        * @return      string          Composite HTML
+        */
+       function compileForm($editForm) {
+               global $LANG;
 
-                       <!--
-                               EDITING FORM:
-                       -->
+               $panel = $this->makeButtonPanel();
+               
+               $formContent = '
 
+                       <!-- EDITING FORM -->
                        '.$editForm.'
 
+                       <!-- Saving buttons (same as in top) -->
 
-
-                       <!--
-                               Saving buttons (same as in top)
-                       -->
-
-                       '.$panel.
-                       '<input type="hidden" name="returnUrl" value="'.htmlspecialchars($this->retUrl).'" />
+                       '.$panel.'
+                       <input type="hidden" name="returnUrl" value="'.htmlspecialchars($this->retUrl).'" />
                        <input type="hidden" name="viewUrl" value="'.htmlspecialchars($this->viewUrl).'" />';
 
                if ($this->returnNewPageId)     {
-                       $formContent.='<input type="hidden" name="returnNewPageId" value="1" />';
+                       $formContent .= '<input type="hidden" name="returnNewPageId" value="1" />';
                }
-               $formContent.='<input type="hidden" name="popViewId" value="'.htmlspecialchars($this->viewId).'" />';
+               $formContent .= '<input type="hidden" name="popViewId" value="'.htmlspecialchars($this->viewId).'" />';
                if ($this->viewId_addParams) {
-                       $formContent.='<input type="hidden" name="popViewId_addParams" value="'.htmlspecialchars($this->viewId_addParams).'" />';
+                       $formContent .= '<input type="hidden" name="popViewId_addParams" value="'.htmlspecialchars($this->viewId_addParams).'" />';
                }
-               $formContent.='<input type="hidden" name="closeDoc" value="0" />';
-               $formContent.='<input type="hidden" name="doSave" value="0" />';
-               $formContent.='<input type="hidden" name="_serialNumber" value="'.md5(microtime()).'" />';
-               $formContent.='<input type="hidden" name="_disableRTE" value="'.$this->tceforms->disableRTE.'" />';
-               $formContent.='<input type="hidden" name="_scrollPosition" value="" />';
+               $formContent .= '
+                       <input type="hidden" name="closeDoc" value="0" />
+                       <input type="hidden" name="doSave" value="0" />
+                       <input type="hidden" name="_serialNumber" value="'.md5(microtime()).'" />
+                       <input type="hidden" name="_disableRTE" value="'.$this->tceforms->disableRTE.'" />
+                       <input type="hidden" name="_scrollPosition" value="" />';
 
                return $formContent;
        }
@@ -1044,39 +1063,40 @@ class SC_alt_doc {
                                '.$funcMenus;
        }
 
+
        /**
-        * Create shortcut and open-in-window link in the bottom of the page
+        * Create shortcut icon
         *
         * @return      string
         */
        function shortCutLink() {
                global $BE_USER,$LANG;
 
-                       // ShortCut
-               if ($this->returnUrl!='close.html')     {
-                       $content.='<br /><br />';
+               if ($this->returnUrl == 'close.html' || !$BE_USER->mayMakeShortcut()) {
+                       return '';
+               }
+               return $this->doc->makeShortcutIcon('returnUrl,edit,defVals,overrideVals,columnsOnly,returnNewPageId,editRegularContentFromId,disHelp,noView',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name'],1);
+       }
 
-                               // Shortcut:
-                       if ($BE_USER->mayMakeShortcut())        {
-                               $content.=$this->doc->makeShortcutIcon('returnUrl,edit,defVals,overrideVals,columnsOnly,returnNewPageId,editRegularContentFromId,disHelp,noView',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name'],1);
-                       }
 
-                               // Open in new window:
-                       $aOnClick = 'vHWin=window.open(\''.t3lib_div::linkThisScript(array('returnUrl'=>'close.html')).'\',\''.md5($this->R_URI).'\',\''.($BE_USER->uc['edit_wideDocument']?'width=670,height=500':'width=600,height=400').',status=0,menubar=0,scrollbars=1,resizable=1\');vHWin.focus();return false;';
-                       $content.='<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
-                                       '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/open_in_new_window.gif','width="19" height="14"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.openInNewWindow',1).'" alt="" />'.
-                                       '</a>';
+       /**
+        * Creates open-in-window link
+        *
+        * @return      string
+        */
+       function openInNewWindowLink()  {
+               global $BE_USER,$LANG;
+               if ($this->returnUrl == 'close.html') {
+                       return '';
                }
-               return '
-
-                               <!--
-                                       Shortcut link:
-                               -->
-                               '.$content;
+               $aOnClick = 'vHWin=window.open(\''.t3lib_div::linkThisScript(array('returnUrl'=>'close.html')).'\',\''.md5($this->R_URI).'\',\''.($BE_USER->uc['edit_wideDocument']?'width=670,height=500':'width=600,height=400').',status=0,menubar=0,scrollbars=1,resizable=1\');vHWin.focus();return false;';
+               return '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
+                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/open_in_new_window.gif','width="19" height="14"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.openInNewWindow',1).'" alt="" /></a>';
        }
 
+
        /**
-        * Reads comment messages from TCEforms and prints them in a HTML comment in the buttom of the page.
+        * Reads comment messages from TCEforms and prints them in a HTML comment in the bottom of the page.
         *
         * @return      void
         */
index 4f6814b..a9c14c2 100755 (executable)
@@ -126,6 +126,7 @@ BODY#typo3-alt-toplogo-php, BODY#typo3-alt-menu-sel-php, BODY#typo3-alt-topmenu-
        background-color: #9BA1A8;
 }
 
+body#typo3-alt-doc-php { padding: 0; margin: 0; overflow: hidden; height: 100%; }
 
 
 
@@ -143,6 +144,7 @@ DIV.typo3-bigDoc, DIV.typo3-noDoc { margin-left: 10px; margin-top: 5px; width: 7
 DIV.typo3-noDoc H2 { width: 740px; }
 DIV.typo3-mediumDoc { width: 470px; }
 DIV.typo3-smallDoc { width: 350px; }
+div.typo3-fullDoc { width: 100%; height: 100%; }
 
 
 
@@ -273,7 +275,10 @@ UL.tree LI.active UL, UL.tree UL LI.active UL      { background-color: #f7f3ef; }
 #dragIcon { z-index: 1; position: absolute; visibility: hidden; filter: alpha(opacity=50); -moz-opacity:0.5; opacity:0.5; white-space: nowrap; }
 
 /* TCEforms */
+table.typo3-TCEforms { width: 93%; border-collapse: collapse; }
+table.typo3-TCEforms, table.typo3-TCEforms td { margin: 0; border: 0; padding: 0; }
 TABLE.typo3-TCEforms SPAN.typo3-TCEforms-recHeader { font-weight: bold; color: #333366; }
+table.typo3-TCEforms tr.typo3-TCEforms-recHeaderRow, TABLE.typo3-TCEforms tr.typo3-TCEforms-recHeaderRow td { border: 0; }
 TABLE.typo3-TCEforms SPAN.typo3-TCEforms-newToken { font-weight: bold; color: #990000; }
 TABLE.typo3-TCEforms SPAN.typo3-TCEforms-helpText { color: #666; }
 TABLE.typo3-TCEforms OPTION.c-divider { font-style: italic; color: #666; background-color: #eee; text-transform: uppercase; margin-top: 10px; border-bottom: 1px solid #666; }
@@ -288,6 +293,7 @@ TABLE.typo3-TCEforms TABLE.typo3-TCEforms-select-singlebox { margin-top: 4px; ma
 TABLE.typo3-TCEforms DIV.typo3-TCEforms-originalLanguageValue { background-color: #bbccbb; }
 TABLE.typo3-TCEforms DIV.typo3-TCEforms-diffBox { background-color: white; border: 1px solid black; }
 TABLE.typo3-TCEforms DIV.typo3-TCEforms-diffBox-header { background-color: red; font-weight: bold; }
+table.typo3-TCEforms div.typo3-dyntabmenu-tabs { margin-top: 10px; }
 
 /* TCEforms Inline-Relational-Record-Editing */
 .typo3-TCEforms DIV.inlineDiv { display: inline-block; }
@@ -339,11 +345,19 @@ BODY#typo3-alt-doc-nodoc-php P IMG { vertical-align: middle; margin-left: 5px; }
 BODY#typo3-alt-doc-nodoc-php { margin-left: 5px; }
 
 /* Record editing (alt_doc.php) */
-TABLE#typo3-altdoc-header { margin: 0px 0px 0.3em 0px; }
-DIV#typo3-altdoc-header-info-options { margin-top: 1em; display: table; width: 100%; }
-DIV#typo3-altdoc-header-info-options div { display: table-cell; }
-DIV#typo3-altdoc-header-info-options div { vertical-align: bottom; }
-DIV#typo3-altdoc-lang-selector { text-align: right; }
+div#typo3-docheader { postion: absolute; top: 0; left: 0; z-index: 5; min-width: 350px; }
+div#typo3-docheader-row1 { height: 20px; background: #cbc7c3; }
+div#typo3-docheader-row2 { background: #f3f3f9; height: 27px; line-height: 27px; border-bottom: 2px solid #595d66; }
+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; border: 0; padding: 0; height: 16px; line-height: 16px; }
+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; }
+* html div#typo3-docbody table.typo3-TCEforms { margin-top: 20px; }
 
 /* Login Screen
 
index e7d2341..b5d4249 100644 (file)
@@ -2,15 +2,16 @@
  * typo3-TCEforms.css
  */
 
-table.typo3-TCEforms {
-       }
+div#typo3-docheader-row1 { background: url('../icons/gfx/alt_menu_mainitem_bg.gif') top left repeat-x; }
+
+table.typo3-TCEforms { }
 
 table.typo3-TCEforms .bgColor2,
 table.typo3-TCEforms tr.bgColor2 td {
        background-color: #EFEFF4;
        color: #212424;
        padding-bottom: 5px;
-       }
+}
 
 table#typo3-altdoc-header input,
 .c-inputButton {
index d42b882..cdfcc2b 100755 (executable)
@@ -455,8 +455,7 @@ class template {
                                        $mMN.
                                        '\';}return false;';
 
-               $sIcon = '<a href="#" onclick="'.htmlspecialchars($onClick).'">
-                               <img'.t3lib_iconWorks::skinImg($backPath,'gfx/shortcut.gif','width="14" height="14"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.makeShortcut',1).'" alt="" /></a>';
+               $sIcon = '<a href="#" onclick="'.htmlspecialchars($onClick).'"><img'.t3lib_iconWorks::skinImg($backPath,'gfx/shortcut.gif','width="14" height="14"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.makeShortcut',1).'" alt="" /></a>';
                return $sIcon;
        }