git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1879 709f56b5-9817-0410-a4d7...
authorKasper Skårhøj <kasper@typo3.org>
Thu, 14 Dec 2006 14:58:18 +0000 (14:58 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Thu, 14 Dec 2006 14:58:18 +0000 (14:58 +0000)
ChangeLog
t3lib/class.t3lib_div.php
t3lib/class.t3lib_tcemain.php
t3lib/stddb/tables.php
typo3/sysext/cms/ext_tables.php
typo3/template.php

index 1b8ab75..3b1694f 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
+2006-12-14  Kasper Sk\8crh¿j
 
+       * Modified t3lib_div::makeInstance() to require filenames in lowercase
+       * Added some fields ("languageField", "transOrigPointerField", "type", "header") as default "shadowColumnsForNewPlaceholders" fields (tcemain "localize" command related)
+       * Fixed Safari context menu bug
+       
 2006-12-13  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
        * Improved t3lib_BEfunc::getRecordRaw() (error checking, freeing result set)
index 3b45938..e1c9a3d 100755 (executable)
@@ -3996,7 +3996,7 @@ class t3lib_div {
                        // Load class file if not found:
                if (!class_exists($className))  {
                        if (substr($className,0,6)=='t3lib_')   {
-                               t3lib_div::requireOnce(PATH_t3lib.'class.'.$className.'.php');
+                               t3lib_div::requireOnce(PATH_t3lib.'class.'.strtolower($className).'.php');
                        }
                }
                
index 79c9cba..7abd27f 100755 (executable)
@@ -871,14 +871,21 @@ class t3lib_TCEmain       {
        function placeholderShadowing($table,$id)       {
                global $TCA;
 
+               t3lib_div::loadTCA($table);
                if ($liveRec = t3lib_BEfunc::getLiveVersionOfRecord($table,$id,'*'))    {
                        if ((int)$liveRec['t3ver_state']===1)   {
                                $justStoredRecord = t3lib_BEfunc::getRecord($table,$id);
                                $newRecord = array();
 
-                               $shadowColumns = t3lib_div::trimExplode(',', $TCA[$table]['ctrl']['shadowColumnsForNewPlaceholders'],1);
+                               $shadowCols = $TCA[$table]['ctrl']['shadowColumnsForNewPlaceholders'];
+                               $shadowCols.= ','.$TCA[$table]['ctrl']['languageField'];
+                               $shadowCols.= ','.$TCA[$table]['ctrl']['transOrigPointerField'];
+                               $shadowCols.= ','.$TCA[$table]['ctrl']['type'];
+                               $shadowCols.= ','.$TCA[$table]['ctrl']['label'];
+
+                               $shadowColumns = array_unique(t3lib_div::trimExplode(',', $shadowCols,1));
                                foreach($shadowColumns as $fieldName)   {
-                                       if (strcmp($justStoredRecord[$fieldName],$liveRec[$fieldName])) {
+                                       if (strcmp($justStoredRecord[$fieldName],$liveRec[$fieldName]) && isset($TCA[$table]['columns'][$fieldName]) && $fieldName!=='uid' && $fieldName!=='pid')       {
                                                $newRecord[$fieldName] = $justStoredRecord[$fieldName];
                                        }
                                }
index f19e6b7..6604eb4 100755 (executable)
@@ -148,8 +148,7 @@ $TCA['pages'] = Array (
                'prependAtCopy' => 'LLL:EXT:lang/locallang_general.php:LGL.prependAtCopy',
                'cruser_id' => 'cruser_id',
                'editlock' => 'editlock',
-               'useColumnsForDefaultValues' => 'doktype',
-               'shadowColumnsForNewPlaceholders' => 'doktype,title',
+               'useColumnsForDefaultValues' => 'doktype'
        ),
        'interface' => Array (
                'showRecordFieldList' => 'doktype,title',
index db46806..b5fb010 100755 (executable)
@@ -514,7 +514,7 @@ $TCA['tt_content'] = Array (
                'prependAtCopy' => 'LLL:EXT:lang/locallang_general.php:LGL.prependAtCopy',
                'copyAfterDuplFields' => 'colPos,sys_language_uid',
                'useColumnsForDefaultValues' => 'colPos,sys_language_uid',
-               'shadowColumnsForNewPlaceholders' => 'sys_language_uid,l18n_parent,colPos,header',
+               'shadowColumnsForNewPlaceholders' => 'colPos',
                'transOrigPointerField' => 'l18n_parent',
                'transOrigDiffSourceField' => 'l18n_diffsource',
                'languageField' => 'sys_language_uid',
@@ -634,7 +634,7 @@ $TCA['pages_language_overlay'] = Array (
                'transOrigPointerField' => 'pid',
                'transOrigPointerTable' => 'pages',
                'transOrigDiffSourceField' => 'l18n_diffsource',
-               'shadowColumnsForNewPlaceholders' => 'sys_language_uid,title',
+               'shadowColumnsForNewPlaceholders' => 'title',
                'languageField' => 'sys_language_uid',
                'mainpalette' => 1,
                'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tbl_cms.php'
index 661365c..d36d152 100755 (executable)
@@ -1303,6 +1303,7 @@ $str.=$this->docBodyTagBegin().
                                        //browsercheck...
                                function GL_checkBrowser(){     //
                                        this.dom= (document.getElementById);
+                                       this.safari =  (navigator.userAgent.indexOf("Safari")>-1);
                                        this.op=  (navigator.userAgent.indexOf("Opera")>-1);
                                        this.op7=  this.op && (navigator.appVersion.indexOf("7")>-1);  // check for Opera version 7
                                        this.konq=  (navigator.userAgent.indexOf("Konq")>-1);
@@ -1341,9 +1342,15 @@ $str.=$this->docBodyTagBegin().
 
                                                GLV_xRel = event.clientX-2;
                                                GLV_yRel = event.clientY-2;
-                                               GLV_x = GLV_xRel + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
-                                               GLV_y = GLV_yRel + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
-
+                                               
+                                               GLV_x = GLV_xRel;
+                                               GLV_y = GLV_yRel;
+                                               
+                                               if (this.safari)        {
+                                                       GLV_x = GLV_xRel + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
+                                                       GLV_y = GLV_yRel + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
+                                               }
+                                               
                                        //      status = (GLV_x+GLV_gap-GLV_curLayerX[0]) + " | " + (GLV_y+GLV_gap-GLV_curLayerY[0]);
                                                if (GLV_isVisible[1])   {
                                                        if (outsideLayer(1))    hideSpecific(1);