Fixed issue #10764: Use new JS-function for loading prototype/scriptaculous/extJS
authorSteffen Kamper <info@sk-typo3.de>
Sat, 4 Apr 2009 11:35:00 +0000 (11:35 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Sat, 4 Apr 2009 11:35:00 +0000 (11:35 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5283 709f56b5-9817-0410-a4d7-c38de5d9e867

13 files changed:
ChangeLog
t3lib/class.t3lib_tceforms.php
typo3/alt_db_navframe.php
typo3/alt_doc.php
typo3/class.browse_links.php
typo3/mod/web/perm/index.php
typo3/sysext/fe_edit/view/class.tx_feedit_adminpanel.php
typo3/sysext/recycler/mod1/index.php
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php
typo3/sysext/rtehtmlarea/mod4/class.tx_rtehtmlarea_select_image.php
typo3/sysext/t3editor/class.tx_t3editor.php
typo3/sysext/t3skin/ext_tables.php
typo3/sysext/taskcenter/task/index.php

index 0a80923..8227023 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-04  Steffen Kamper  <info@sk-typo3.de>
+
+       * Fixed issue #10764: Use new JS-function for loading prototype/scriptaculous/extJS
+
 2009-04-03  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed issue #10837: htmlARea RTE: IE8 reports unknown "complete" attribute on img nodes
index 7c037dc..b27b90f 100644 (file)
@@ -2544,7 +2544,7 @@ class t3lib_TCEforms      {
                                                if ($value['section'])  {
 
                                                                // Load script.aculo.us if flexform sections can be moved by drag'n'drop:
-                                                       $this->loadJavascriptLib('contrib/scriptaculous/scriptaculous.js');
+                                                       $GLOBALS['SOBE']->doc->loadScriptaculous();
                                                                // Render header of section:
                                                        $output.= '<div class="bgColor2"><strong>'.$theTitle.'</strong></div>';
 
@@ -5132,14 +5132,14 @@ class t3lib_TCEforms    {
                                $this->loadJavascriptLib('md5.js');
                        }
 
-                       $this->loadJavascriptLib('contrib/prototype/prototype.js');
+                       $GLOBALS['SOBE']->doc->loadPrototype();
                        $this->loadJavascriptLib('../t3lib/jsfunc.evalfield.js');
                        // @TODO: Change to loadJavascriptLib(), but fix "TS = new typoScript()" issue first - see bug #9494
                        $jsFile[] = '<script type="text/javascript" src="'.$this->backPath.'jsfunc.tbe_editor.js"></script>';
 
                                // if IRRE fields were processed, add the JavaScript functions:
                        if ($this->inline->inlineCount) {
-                               $this->loadJavascriptLib('contrib/scriptaculous/scriptaculous.js');
+                               $GLOBALS['SOBE']->doc->loadScriptaculous();
                                $this->loadJavascriptLib('../t3lib/jsfunc.inline.js');
                                $out .= '
                                inline.setPrependFormFieldNames("'.$this->inline->prependNaming.'");
index 26e6002..5a2ada8 100644 (file)
@@ -157,7 +157,7 @@ class SC_alt_db_navframe {
                        // Adding javascript code for AJAX (prototype), drag&drop and the pagetree as well as the click menu code
                $this->doc->getDragDropCode('pages');
                $this->doc->getContextMenuCode();
-               $this->doc->loadJavascriptLib('contrib/scriptaculous/scriptaculous.js?load=effects');
+               $this->doc->loadScriptaculous('effects');
 
                $this->doc->JScode .= $this->doc->wrapScriptTags(
                ($this->currentSubScript?'top.currentSubScript=unescape("'.rawurlencode($this->currentSubScript).'");':'').'
index 06041ef..bceed0f 100644 (file)
@@ -453,7 +453,7 @@ class SC_alt_doc {
                $this->doc->setModuleTemplate('templates/alt_doc.html');
                $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->loadPrototype();
                $this->doc->JScode = $this->doc->wrapScriptTags('
                        function jumpToUrl(URL,formEl)  {       //
                                if (!TBE_EDITOR.isFormChanged())        {
index 42823bc..9c6eac8 100644 (file)
@@ -794,7 +794,7 @@ class browse_links {
                $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                        // Load the Prototype library and browse_links.js
-               $this->doc->loadJavascriptLib('contrib/prototype/prototype.js');
+               $this->doc->loadPrototype();
                $this->doc->loadJavascriptLib('js/browse_links.js');
 
                        // init hook objects:
index fe64062..61cca14 100755 (executable)
@@ -218,7 +218,7 @@ class SC_mod_web_perm_index {
                $this->doc->setModuleTemplate('templates/perm.html');
                $this->doc->form = '<form action="'.$GLOBALS['BACK_PATH'].'tce_db.php" method="post" name="editform">';
                $this->doc->loadJavascriptLib('../t3lib/jsfunc.updateform.js');
-               $this->doc->loadJavascriptLib('contrib/prototype/prototype.js');
+               $this->doc->loadPrototype();
                $this->doc->loadJavascriptLib(TYPO3_MOD_PATH . 'perm.js');
 
                        // Setting up the context sensitive menu:
index 46309fd..ff0e32a 100644 (file)
@@ -51,7 +51,14 @@ class tx_feedit_adminpanel {
         */
        public function display() {
                $out = '<script type="text/javascript" src="t3lib/js/adminpanel.js"></script>';
-
+               //CSS
+        $GLOBALS['TSFE']->additionalHeaderData['admPanelCSS'] = '<link rel="stylesheet" type="text/css" href="' . t3lib_extMgm::extRelPath('fe_edit') . 'admpanel.css' . '" />';
+        if(!empty($GLOBALS['TBE_STYLES']['stylesheets']['admPanel'])) {
+                               $GLOBALS['TSFE']->additionalHeaderData['admPanelCSS-Skin'] = '
+                       <link rel="stylesheet" type="text/css" href="' . $GLOBALS['TBE_STYLES']['stylesheets']['admPanel'].'" />
+                               ';
+               }
+                       
                if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_top']) {
                        if ($GLOBALS['BE_USER']->frontendEdit->isAdminModuleEnabled('preview')) {
                                $out .= $this->getPreviewModule();
@@ -146,7 +153,7 @@ $query . '
                }
 
                $out = '
-               <div onmousedown="TYPO3AdminPanel.dragStart(this)" onmouseup="TYPO3AdminPanel.savePosition(this)" id="admPanel" style="position:absolute; left:10px; top:100px; width:30px; z-index:5;">
+               <div onmousedown="TYPO3AdminPanel.dragStart(this)" onmouseup="TYPO3AdminPanel.savePosition(this)" id="admPanel">
                ' . $out . '
                <br /></div>
                <script type="text/javascript">
index cafdf28..6579b57 100644 (file)
@@ -137,12 +137,9 @@ class  tx_recycler_module1 extends t3lib_SCbase {
         */
        protected function loadHeaderData() {
                        // Load CSS Stylesheets:
-               $this->loadStylesheet('contrib/extjs/resources/css/ext-all.css');
-               $this->loadStylesheet('contrib/extjs/resources/css/xtheme-gray.css');
                $this->loadStylesheet($this->relativePath . 'res/css/customExtJs.css');
                        // Load Ext JS:
-               $this->doc->loadJavascriptLib('contrib/extjs/adapter/ext/ext-base.js');
-               $this->doc->loadJavascriptLib('contrib/extjs/ext-all.js');
+               $this->doc->loadExtJS();
                        // Integrate dynamic JavaScript such as configuration or lables:
                $this->doc->JScode.= t3lib_div::wrapJS('
                        Ext.namespace("Recycler");
index b2eae64..468e6e6 100644 (file)
@@ -230,7 +230,7 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                        // Loading the Prototype library and browse_links.js
-               $this->doc->loadJavascriptLib('contrib/prototype/prototype.js');
+               $this->doc->loadPrototype();
                $this->doc->loadJavascriptLib('js/browse_links.js');
                        // Adding context menu code
                $this->doc->getContextMenuCode();
index 14c668c..903c694 100644 (file)
@@ -183,7 +183,7 @@ class tx_rtehtmlarea_select_image extends browse_links {
                $this->doc->backPath = $BACK_PATH;
 
                        // Load the Prototype library and browse_links.js
-               $this->doc->loadJavascriptLib('contrib/prototype/prototype.js');
+               $this->doc->loadPrototype();
                $this->doc->loadJavascriptLib('js/browse_links.js');
 
                $this->doc->getContextMenuCode();
index 189d9c4..a2b4f73 100755 (executable)
@@ -125,8 +125,8 @@ class tx_t3editor {
                        $path_t3e = t3lib_extmgm::extRelPath('t3editor');
 
                                // include needed javascript-frameworks
-                       $doc->loadJavascriptLib('contrib/prototype/prototype.js');
-                       $doc->loadJavascriptLib('contrib/scriptaculous/scriptaculous.js');
+                       $doc->loadPrototype();
+                       $doc->loadScriptaculous();
 
                                // include editor-css
                        $code.= '<link href="' .
index 4519214..0428712 100644 (file)
@@ -81,6 +81,7 @@ if (TYPO3_MODE=='BE') {
 #      $TBE_STYLES['inDocStyles_TBEstyle']         = '* {text-align: right;}';                                                 // Additional default in-document styles.
        $TBE_STYLES['stylesheets']['modulemenu']    = $temp_eP.'stylesheets/modulemenu.css';
        $TBE_STYLES['stylesheets']['backend-style'] = $temp_eP.'stylesheets/backend-style.css';
+       $TBE_STYLES['stylesheets']['admPanel'] = $temp_eP.'stylesheets/admPanel.css';
 
                // Alternative dimensions for frameset sizes:
        $TBE_STYLES['dims']['leftMenuFrameW'] = 160;            // Left menu frame width
index 2478ea8..41948f1 100755 (executable)
@@ -93,7 +93,7 @@ class SC_mod_user_task_index extends t3lib_SCbase {
                $this->doc->divClass = '';
                $this->doc->form = '<form action="index.php" method="POST" name="editform">';
                $this->backPath = $this->doc->backPath = $BACK_PATH;
-               $this->doc->loadJavascriptLib('contrib/prototype/prototype.js');
+               $this->doc->loadPrototype();
                $this->doc->JScode = '  <script language="javascript" type="text/javascript">
                        script_ended = 0;
                        function jumpToUrl(URL) {