Updated ExtensionManager to version 4.5.0beta3a.
authorSteffen Kamper <info@sk-typo3.de>
Tue, 28 Dec 2010 15:05:34 +0000 (15:05 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Tue, 28 Dec 2010 15:05:34 +0000 (15:05 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9949 709f56b5-9817-0410-a4d7-c38de5d9e867

55 files changed:
ChangeLog
typo3/sysext/em/classes/class.tx_em_api.php
typo3/sysext/em/classes/class.tx_em_extensionmanager.php
typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectserver.php
typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectsoap.php
typo3/sysext/em/classes/connection/class.tx_em_connection_soap.php
typo3/sysext/em/classes/connection/class.tx_em_connection_ter.php
typo3/sysext/em/classes/database/class.tx_em_database.php
typo3/sysext/em/classes/extensions/class.tx_em_extensions_details.php
typo3/sysext/em/classes/extensions/class.tx_em_extensions_list.php
typo3/sysext/em/classes/import/class.tx_em_import_extensionlistimporter.php
typo3/sysext/em/classes/import/class.tx_em_import_mirrorlistimporter.php
typo3/sysext/em/classes/index.php
typo3/sysext/em/classes/install/class.tx_em_install.php
typo3/sysext/em/classes/parser/class.tx_em_parser_extensionxmlabstractparser.php
typo3/sysext/em/classes/parser/class.tx_em_parser_extensionxmlpullparser.php
typo3/sysext/em/classes/parser/class.tx_em_parser_extensionxmlpushparser.php
typo3/sysext/em/classes/parser/class.tx_em_parser_mirrorxmlabstractparser.php
typo3/sysext/em/classes/parser/class.tx_em_parser_mirrorxmlpullparser.php
typo3/sysext/em/classes/parser/class.tx_em_parser_mirrorxmlpushparser.php
typo3/sysext/em/classes/parser/class.tx_em_parser_xmlabstractparser.php
typo3/sysext/em/classes/parser/class.tx_em_parser_xmlparserfactory.php
typo3/sysext/em/classes/reports/class.tx_em_reports_extensionstatus.php [new file with mode: 0644]
typo3/sysext/em/classes/repository/class.tx_em_repository.php
typo3/sysext/em/classes/repository/class.tx_em_repository_mirrors.php
typo3/sysext/em/classes/repository/class.tx_em_repository_utility.php
typo3/sysext/em/classes/settings/class.tx_em_settings.php
typo3/sysext/em/classes/tasks/class.tx_em_tasks_updateextensionlist.php
typo3/sysext/em/classes/tools/class.tx_em_tools.php
typo3/sysext/em/classes/tools/class.tx_em_tools_unzip.php
typo3/sysext/em/classes/tools/class.tx_em_tools_xmlhandler.php
typo3/sysext/em/classes/translations/class.tx_em_translations.php
typo3/sysext/em/ext_autoload.php
typo3/sysext/em/ext_emconf.php
typo3/sysext/em/ext_tables.php
typo3/sysext/em/language/locallang.xml
typo3/sysext/em/res/css/editor.css [new file with mode: 0644]
typo3/sysext/em/res/css/t3_em.css
typo3/sysext/em/res/icons/arrow_redo.png [new file with mode: 0644]
typo3/sysext/em/res/icons/arrow_undo.png [new file with mode: 0644]
typo3/sysext/em/res/icons/jslint.gif [new file with mode: 0644]
typo3/sysext/em/res/icons/text_indent.png [new file with mode: 0644]
typo3/sysext/em/res/js/em_app.js
typo3/sysext/em/res/js/em_components.js
typo3/sysext/em/res/js/em_files.js
typo3/sysext/em/res/js/em_languages.js
typo3/sysext/em/res/js/em_layouts.js
typo3/sysext/em/res/js/em_locallist.js
typo3/sysext/em/res/js/em_repositorylist.js
typo3/sysext/em/res/js/em_settings.js
typo3/sysext/em/res/js/em_tools.js
typo3/sysext/em/res/js/em_usertools.js
typo3/sysext/em/res/js/ux/GridFilters.js
typo3/sysext/em/res/js/ux/jslint.js [new file with mode: 0644]
typo3/sysext/em/res/js/ux/rowpanelexpander.js

index 8ae904d..a058d53 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,8 @@
 
 2010-12-28  Steffen Kamper  <steffen@typo3.org>
 
+       * Updated ExtensionManager to version 4.5.0beta3a.
+       * Updated Workspaces and Version extension to version 4.5.0beta3b/a. See their ChangeLog for details.
        * Updated Workspaces and Version extension to version 4.5.0beta3. See their ChangeLog for details.
 
 2010-12-27  Ingo Renner  <ingo@typo3.org>
index 2d24a6c..886a1c8 100644 (file)
@@ -71,3 +71,9 @@ class tx_em_API {
 
        }
 }
+
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/class.tx_em_api.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/class.tx_em_api.php']);
+}
+
+?>
\ No newline at end of file
index fc0ab63..6ae0c47 100644 (file)
@@ -79,6 +79,7 @@ class tx_em_ExtensionManager {
         */
        public function __construct(SC_mod_tools_em_index $parentObject) {
                $this->parentObject = $parentObject;
+               $this->parentObject->doc->setExtDirectStateProvider();
                $this->pageRenderer = $this->parentObject->doc->getPageRenderer();
                $this->resPath = $this->parentObject->doc->backPath . t3lib_extMgm::extRelPath('em') . 'res/';
 
@@ -119,6 +120,10 @@ class tx_em_ExtensionManager {
                        .x-btn-save { background-image:url(' . $iconsGfxPath . 'savedok.gif) !important;}
                        .x-btn-upload { background-image:url(' . $iconsGfxPath . 'upload.gif) !important;}
                        .x-btn-download { background-image:url(' . $iconsGfxPath . 'down.gif) !important;}
+                       .x-btn-undo { background-image:url(' . $this->resPath . 'icons/arrow_undo.png) !important;}
+                       .x-btn-redo { background-image:url(' . $this->resPath . 'icons/arrow_redo.png) !important;}
+                       .x-btn-jslint { background-image:url(' . $this->resPath . 'icons/jslint.gif) !important;}
+                       .x-btn-indent { background-image:url(' . $this->resPath . 'icons/text_indent.png) !important;}
                ');
 
                /* load ExtJS */
@@ -146,11 +151,6 @@ class tx_em_ExtensionManager {
 
                /* TODO: new users have no settings */
                $settings = $this->parentObject->MOD_SETTINGS;
-               $settings['siteUrl'] = t3lib_div::getIndpEnv('TYPO3_SITE_URL');
-               $settings['backPath'] = $this->parentObject->doc->backPath;
-               $settings['hasCredentials'] = (isset($settings['fe_u']) && isset($settings['fe_p']) && $settings['fe_u'] !== '' && $settings['fe_p'] !== '');
-               $settings['scriptLink'] = $this->parentObject->script;
-
                // TODO add mirrors to sys_ter record and delete from settings
                // restructure mirror data
                $mirrors = unserialize($settings['extMirrors']);
@@ -163,8 +163,20 @@ class tx_em_ExtensionManager {
                                );
                        }
                }
-               $settings['selectedLanguages'] = unserialize($settings['selectedLanguages']);
-               $settings['selectedLanguagesList'] = implode(',', (array) $settings['selectedLanguages']);
+
+               $additionalSettings = array(
+                       'siteUrl' => t3lib_div::getIndpEnv('TYPO3_SITE_URL'),
+                       'backPath' => $this->parentObject->doc->backPath,
+                       'hasCredentials' => (isset($settings['fe_u']) && isset($settings['fe_p']) && $settings['fe_u'] !== '' && $settings['fe_p'] !== ''),
+                       'scriptLink' => $this->parentObject->script,
+                       'editorCss' => $this->resPath . 'css/editor.css',
+                       'codemirrorCssPath' => $this->parentObject->doc->backPath . 'contrib/codemirror/css/',
+                       'codemirrorJsPath' => $this->parentObject->doc->backPath . 'contrib/codemirror/js/',
+                       'selectedLanguages' => unserialize($settings['selectedLanguages']),
+                       'selectedLanguagesList' => implode(',', (array) $settings['selectedLanguages']),
+                       'state' => $GLOBALS['BE_USER']->uc['moduleData']['tools_em']['States'],
+               );
+               $settings = array_merge($settings, $additionalSettings);
 
                $this->pageRenderer->addInlineSettingArray('EM', $settings);
 
@@ -172,6 +184,7 @@ class tx_em_ExtensionManager {
                // Add JS
                $this->pageRenderer->addJsFile($this->parentObject->doc->backPath . '../t3lib/js/extjs/ux/flashmessages.js');
                $this->pageRenderer->addJsFile($this->parentObject->doc->backPath . 'js/extjs/iframepanel.js');
+               $this->pageRenderer->addJsFile($this->parentObject->doc->backPath . 'contrib/codemirror/js/codemirror.js');
 
                //Plugins
                $this->pageRenderer->addJsFile($this->resPath . 'js/overrides/ext_overrides.js');
@@ -189,6 +202,7 @@ class tx_em_ExtensionManager {
                $this->pageRenderer->addJsFile($this->resPath . 'js/ux/filter/ListFilter.js');
                $this->pageRenderer->addJsFile($this->resPath . 'js/ux/filter/NumericFilter.js');
                $this->pageRenderer->addJsFile($this->resPath . 'js/ux/filter/StringFilter.js');
+               $this->pageRenderer->addJsFile($this->resPath . 'js/ux/jslint.js');
 
                //Scripts
                $this->pageRenderer->addJsFile($this->resPath . 'js/em_layouts.js');
@@ -207,6 +221,8 @@ class tx_em_ExtensionManager {
                //Application
                $this->pageRenderer->addJsFile($this->resPath . 'js/em_app.js');
 
+               // clear flashmessages from php
+               t3lib_FlashMessageQueue::getAllMessagesAndFlush();
 
                //Update from repository - box
                //$content = $this->parentObject->showRepositoryUpdateForm(0);
@@ -233,4 +249,9 @@ class tx_em_ExtensionManager {
                }
        }
 }
+
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/class.tx_em_extensionsmanager.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/class.tx_em_extensionsmanager.php']);
+}
+
 ?>
index 192c1af..e5e0977 100644 (file)
@@ -73,7 +73,7 @@ class tx_em_Connection_ExtDirectServer {
         * @return void
         */
        public function __construct() {
-
+               $this->template = t3lib_div::makeInstance('template');
        }
 
 
@@ -256,7 +256,8 @@ class tx_em_Connection_ExtDirectServer {
                                        'id' => $node . '/' . $dir,
                                        'text' => htmlspecialchars($dir),
                                        'leaf' => false,
-                                       'qtip' => ''
+                                       'qtip' => '',
+                                       'iconCls' => 't3-icon t3-icon-apps t3-icon-apps-filetree t3-icon-filetree-folder-temp'
                                );
                        }
                }
@@ -308,12 +309,22 @@ class tx_em_Connection_ExtDirectServer {
         * @return boolean success
         */
        public function saveExtFile($file, $content) {
-               $path = PATH_site . $path;
+               $path = PATH_site . $file;
+               $error = '';
                if (@file_exists($path)) {
                        //TODO: save only if saving was enabled
-                       return t3lib_div::writeFile($path, $content);
+                       $done = t3lib_div::writeFile($path, $content);
+               } else {
+                       $done = FALSE;
+                       $error = 'File does not exist!';
                }
-               return FALSE;
+               return array(
+                       'success' => $done,
+                       'path' => $path,
+                       'file' => basename($path),
+                       'content' => $content,
+                       'error' => $error
+               );
        }
 
 
@@ -385,8 +396,9 @@ class tx_em_Connection_ExtDirectServer {
                $orderBy = $parameters->sort;
                $orderDir = $parameters->dir;
 
+               $where = '';
                if ($search == '*') {
-                       $where = '';
+                       // show all
                } else {
                        $quotedSearch = $GLOBALS['TYPO3_DB']->escapeStrForLike(
                                $GLOBALS['TYPO3_DB']->quoteStr($search, 'cache_extensions'),
@@ -394,6 +406,15 @@ class tx_em_Connection_ExtDirectServer {
                        );
                        $where = ' AND (extkey LIKE \'%' . $quotedSearch . '%\' OR title LIKE \'%' . $quotedSearch . '%\')';
                }
+               // check for filter
+               $where .= $this->makeFilterQuery(get_object_vars($parameters));
+
+               if (is_array($parameters->filter)) {
+
+                       foreach ($parameters->filter as $filter) {
+
+                       }
+               }
 
                $list = tx_em_Database::getExtensionListFromRepository(
                        $repositoryId,
@@ -410,13 +431,15 @@ class tx_em_Connection_ExtDirectServer {
                        $list['results'][$key]['dependencies'] = unserialize($value['dependencies']);
                        $extPath = t3lib_div::strtolower($value['extkey']);
                        $list['results'][$key]['icon'] = '<img alt="" src="' . $mirrorUrl . $extPath{0} . '/' . $extPath{1} . '/' . $extPath . '_' . $value['version'] . '.gif" />';
+                       $list['results'][$key]['statevalue'] = $value['state'];
                        $list['results'][$key]['state'] = tx_em_Tools::getDefaultState(intval($value['state']));
-
+                       $list['results'][$key]['categoryvalue'] = $value['category'];
                }
 
                return array(
                        'length' => $list['count'],
-                       'data' => $list['results']
+                       'data' => $list['results'],
+                       'where' => $where
                );
 
        }
@@ -522,7 +545,6 @@ class tx_em_Connection_ExtDirectServer {
                        'lastUpdated' => $repository->getLastUpdate(),
                        'extCount' => $repository->getExtensionCount(),
                );
-               //debug($repositoryData);
 
                if ($parameter['rep'] == 0) {
                        // create a new repository
@@ -540,11 +562,29 @@ class tx_em_Connection_ExtDirectServer {
                                'params' => $repositoryData
                        );
                }
+       }
 
 
-
+       /**
+        * Delete repository
+        *
+        * @param  int $uid
+        * @return array
+        */
+       public function deleteRepository($uid) {
+               if (intval($uid) < 2) {
+                       return array(
+                               'success' => FALSE,
+                               'error' => 'Main repository can not be deleted!'
+                       );
+               }
+               $repository = t3lib_div::makeInstance('tx_em_Repository', intval($uid));
+               tx_em_Database::deleteRepository($repository);
+               return array(
+                               'success' => TRUE,
+                               'uid' => intval($uid)
+                       );
        }
-
        /**
         * Update repository
         *
@@ -815,6 +855,17 @@ class tx_em_Connection_ExtDirectServer {
        }
 
        /**
+        * Reset all states for current user
+        *
+        * @return void
+        */
+       public function resetStates() {
+               unset($GLOBALS['BE_USER']->uc['moduleData']['tools_em']['States']);
+               $GLOBALS['BE_USER']->writeUC($GLOBALS['BE_USER']->uc);
+               return array('success' => TRUE);
+       }
+
+       /**
         * Gets the mirror url from selected mirror
         *
         * @param  $repositoryId
@@ -844,6 +895,53 @@ class tx_em_Connection_ExtDirectServer {
                return 'http://' . $mirrorUrl;
        }
 
+       /**
+        * Resolves the filter settings from repository list and makes a whereClause
+        *
+        * @param  array  $parameter
+        * @return string additional whereClause
+        */
+       protected function makeFilterQuery($parameter) {
+               $where = '';
+               $filter = $found = array();
+
+               foreach ($parameter as $key => $value) {
+                       if (substr($key, 0, 6) === 'filter') {
+                               eval('$' . $key . ' = \'' . $value . '\';');
+                       }
+               }
+               //debug(array($parameter,$filter));
+
+               if (count($filter)) {
+                       foreach ($filter as $value) {
+                               switch ($value['data']['type']) {
+                                       case 'list':
+                                               if ($value['field'] === 'statevalue') {
+                                                       $where .= ' AND state IN(' . htmlspecialchars($value['data']['value']) . ')';
+                                               }
+                                               if ($value['field'] === 'categoryvalue') {
+                                                       $where .= ' AND category IN(' . htmlspecialchars($value['data']['value']) . ')';
+                                               }
+                                       break;
+                                       default:
+                                               $quotedSearch = $GLOBALS['TYPO3_DB']->escapeStrForLike(
+                                                       $GLOBALS['TYPO3_DB']->quoteStr($value['data']['value'], 'cache_extensions'),
+                                                       'cache_extensions'
+                                               );
+                                               $where .= ' AND ' . htmlspecialchars($value['field']) . ' LIKE "%' . $quotedSearch . '%"';
+                               }
+                       }
+               }
+               return $where;
+       }
+
+
+
+}
+
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/connection/class.tx_em_connectionextdirectserver.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectserver.php']);
 }
 
 ?>
+
index 1b6e187..23b5d5f 100644 (file)
@@ -420,6 +420,8 @@ class tx_em_Connection_ExtDirectSoap {
        }
 }
 
-
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectsoap.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectsoap.php']);
+}
 
 ?>
\ No newline at end of file
index d4f51ee..a2b6c79 100644 (file)
@@ -276,4 +276,7 @@ class tx_em_Connection_Soap {
        }
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/connection/class.tx_em_connection_soap.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/connection/class.tx_em_connection_soap.php']);
+}
 ?>
\ No newline at end of file
index bef17c5..434f5e9 100644 (file)
@@ -368,4 +368,7 @@ class tx_em_Connection_Ter {
        }
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/connection/class.tx_em_connection_ter.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/connection/class.tx_em_connection_ter.php']);
+}
 ?>
\ No newline at end of file
index 8915cb4..aee97e2 100644 (file)
@@ -173,6 +173,19 @@ final class tx_em_Database {
        }
 
        /**
+        * Deletes given Repository
+        *
+        * @param  tx_em_Repository $repository  repository object
+        * @return void
+        */
+       public function deleteRepository(tx_em_Repository $repository) {
+               $GLOBALS['TYPO3_DB']->exec_DELETEquery(
+                        self::TABLE_REPOSITORY,
+                       'uid=' . $repository->getId()
+                );
+       }
+
+       /**
         * Updates ExtCount and lastUpdated  in Repository eg after import
         * @param  int $extCount
         * @param int $uid
index 996b0f2..f66b9e3 100644 (file)
@@ -792,4 +792,8 @@ $EM_CONF[$_EXTKEY] = ' . tx_em_Tools::arrayToCode($EM_CONF, 0) . ';
        }
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/extensions/class.tx_em_extensions_details.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/extensions/class.tx_em_extensions_details.php']);
+}
+
 ?>
\ No newline at end of file
index b60aa48..725a3ee 100644 (file)
@@ -38,6 +38,7 @@ class tx_em_Extensions_List {
 
        protected $categories;
        protected $types;
+       protected $states;
 
        /**
         * Constructor
@@ -65,6 +66,7 @@ class tx_em_Extensions_List {
                        'G' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:type_global'),
                        'L' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:type_local'),
                );
+               $this->states = tx_em_Tools::getStates();
        }
 
 
@@ -214,7 +216,7 @@ class tx_em_Extensions_List {
 
                                $list[$key]['doc'] = '';
                                if (@is_file($manual)) {
-                                       $list[$key]['doc'] = '<a href="' . htmlspecialchars($relPath . $extKey . '/doc/manual.sxw') . '">'
+                                       $list[$key]['doc'] = '<a href="' . htmlspecialchars($relPath . $extKey . '/doc/manual.sxw') . '" target="_blank">'
                                                . t3lib_iconWorks::getSpriteIcon('actions-system-extension-documentation') . '</a>';
                                }
                                $list[$key]['icon'] = @is_file($path . $extKey . '/ext_icon.gif') ? '<img src="' . $relPath . $extKey . '/ext_icon.gif" alt="" width="16" height="16" />' : '<img src="clear.gif" alt="" width="16" height="16" />';
@@ -538,7 +540,7 @@ EXTENSION KEYS:
                                $cells[] = '<td nowrap="nowrap">' .
                                                (tx_em_Tools::typePath($extInfo['type']) && @is_file($fileP) ?
                                                                '<a href="' . htmlspecialchars(t3lib_div::resolveBackPath($this->parentObject->doc->backPath . '../' .
-                                                                       tx_em_Tools::typePath($extInfo['type']) . $extKey . '/doc/manual.sxw')) . '" target="_blank" title="' . $GLOBALS['LANG']->getLL('listRow_local_manual') . '">' .
+                                                                       tx_em_Tools::typeRelPath($extInfo['type']) . $extKey . '/doc/manual.sxw')) . '" target="_blank" title="' . $GLOBALS['LANG']->getLL('listRow_local_manual') . '">' .
                                                                                t3lib_iconWorks::getSpriteIcon('actions-system-extension-documentation') . '</a>' : '') .
                                                '</td>';
 
@@ -571,7 +573,7 @@ EXTENSION KEYS:
                                        );
                                        $doubleInstall = ' <strong><abbr title="' . $doubleInstallTitle . '">' . tx_em_Tools::rfw($extInfo['doubleInstall']) . '</abbr></strong>';
                                }
-                               $cells[] = '<td nowrap="nowrap">' . $this->api->typeLabels[$extInfo['type']] . $doubleInstall . '</td>';
+                               $cells[] = '<td nowrap="nowrap">' . $this->types[$extInfo['type']] . $doubleInstall . '</td>';
                        } else { // Listing extensions from REMOTE repository:
                                $inst_curVer = $inst_list[$extKey]['EM_CONF']['version'];
                                if (isset($inst_list[$extKey])) {
@@ -585,7 +587,7 @@ EXTENSION KEYS:
                                $cells[] = '<td nowrap="nowrap">' . $this->api->typeLabels[$inst_list[$extKey]['type']] . (strlen($inst_list[$extKey]['doubleInstall']) > 1 ? '<strong> ' . tx_em_Tools::rfw($inst_list[$extKey]['doubleInstall']) . '</strong>' : '') . '</td>';
                                $cells[] = '<td nowrap="nowrap">' . ($extInfo['downloadcounter_all'] ? $extInfo['downloadcounter_all'] : '&nbsp;&nbsp;') . '/' . ($extInfo['downloadcounter'] ? $extInfo['downloadcounter'] : '&nbsp;') . '</td>';
                        }
-                       $cells[] = '<td nowrap="nowrap" class="extstate" style="background-color:' . $stateColors[$extInfo['EM_CONF']['state']] . ';">' . $this->parentObject->states[$extInfo['EM_CONF']['state']] . '</td>';
+                       $cells[] = '<td nowrap="nowrap" class="extstate" style="background-color:' . $stateColors[$extInfo['EM_CONF']['state']] . ';">' . $this->states[$extInfo['EM_CONF']['state']] . '</td>';
                }
 
                // show a different background through a different class for insecure (-1) extensions,
@@ -839,4 +841,8 @@ EXTENSION KEYS:
 
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/extensions/class.tx_em_extensions_list.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/extensions/class.tx_em_extensions_list.php']);
+}
+
 ?>
index 3d7a48f..840d0c8 100644 (file)
@@ -221,4 +221,8 @@ class tx_em_Import_ExtensionListImporter implements SplObserver {
        }
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/import/class.tx_em_import_extensionlistimporter.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/import/class.tx_em_import_extensionlistimporter.php']);
+}
+
 ?>
index d9d51ab..eaac47f 100644 (file)
@@ -113,4 +113,8 @@ class tx_em_Import_MirrorListImporter implements SplObserver {
        }
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/import/class.tx_em_import_mirrorlistimporter.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/import/class.tx_em_import_mirrorlistimporter.php']);
+}
+
 ?>
index 0f92c6c..d17f60a 100644 (file)
@@ -226,15 +226,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                 * Extension States
                 * Content must be redundant with the same internal variable as in class.tx_extrep.php!
                 */
-               $this->states = array(
-                       'alpha' => $GLOBALS['LANG']->getLL('state_alpha'),
-                       'beta' => $GLOBALS['LANG']->getLL('state_beta'),
-                       'stable' => $GLOBALS['LANG']->getLL('state_stable'),
-                       'experimental' => $GLOBALS['LANG']->getLL('state_experimental'),
-                       'test' => $GLOBALS['LANG']->getLL('state_test'),
-                       'obsolete' => $GLOBALS['LANG']->getLL('state_obsolete'),
-                       'excludeFromUpdates' => $GLOBALS['LANG']->getLL('state_exclude_from_updates')
-               );
+               $this->states = tx_em_Tools::getStates();
 
                $this->script = 'mod.php?M=tools_em';
                $this->privacyNotice = $GLOBALS['LANG']->getLL('privacy_notice');
@@ -1629,7 +1621,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                        } elseif ($this->CMD['editFile'] && !in_array($extKey, $this->requiredExt)) {
 
                                // Editing extension file:
-                               $editFile = $this->CMD['editFile'];
+                               $editFile = rawurldecode($this->CMD['editFile']);
                                if (t3lib_div::isAllowedAbsPath($editFile) && t3lib_div::isFirstPartOfStr($editFile, $absPath)) {
 
                                        $fI = t3lib_div::split_fileref($editFile);
@@ -2522,6 +2514,15 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                return tx_em_Tools::importAsType($type, $lockType);
        }
 
+       /**
+        * Returns the list of available (installed) extensions
+        *
+        * @return      array           Array with two arrays, list array (all extensions with info) and category index
+        * @wrapper for compatibility
+        */
+       public function getInstalledExtensions() {
+               return $this->extensionList->getInstalledExtensions();
+       }
 }
 
 // Make instance:
@@ -2535,8 +2536,11 @@ $SOBE->checkExtObj();
 $SOBE->main();
 $SOBE->printContent();
 
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['em/index.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['em/index.php']);
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['em/index.php']) {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['em/index.php']);
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/index.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/index.php']);
+}
 ?>
\ No newline at end of file
index d522090..6c99f7c 100644 (file)
@@ -1417,4 +1417,8 @@ class tx_em_Install {
 
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/install/class.tx_em_install.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/install/class.tx_em_install.php']);
+}
+
 ?>
\ No newline at end of file
index a67a3e4..92780f4 100644 (file)
@@ -428,4 +428,8 @@ abstract class tx_em_Parser_ExtensionXmlAbstractParser extends tx_em_Parser_XmlA
        }
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/parser/class.tx_em_parser_extensionxmlabstractparser.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/parser/class.tx_em_parser_extensionxmlabstractparser.php']);
+}
+
 ?>
\ No newline at end of file
index 17477f5..87de0ae 100644 (file)
@@ -241,4 +241,8 @@ class tx_em_Parser_ExtensionXmlPullParser extends tx_em_Parser_ExtensionXmlAbstr
        }
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/parser/class.tx_em_parser_extensionxmlpullparser.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/parser/class.tx_em_parser_extensionxmlpullparser.php']);
+}
+
 ?>
\ No newline at end of file
index 62253bb..dafd5dd 100644 (file)
@@ -242,4 +242,8 @@ class tx_em_Parser_ExtensionXmlPushParser extends tx_em_Parser_ExtensionXmlAbstr
        }
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/parser/class.tx_em_parser_extensionxmlpushparser.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/parser/class.tx_em_parser_extensionxmlpushparser.php']);
+}
+
 ?>
\ No newline at end of file
index f955dff..bc5e397 100644 (file)
@@ -222,4 +222,8 @@ abstract class tx_em_Parser_MirrorXmlAbstractParser extends tx_em_Parser_XmlAbst
        }
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/parser/class.tx_em_parser_mirrorxmlabstractparser.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/parser/class.tx_em_parser_mirrorxmlabstractparser.php']);
+}
+
 ?>
\ No newline at end of file
index 7d3a78b..fa23623 100644 (file)
@@ -225,4 +225,8 @@ class tx_em_Parser_MirrorXmlPullParser extends tx_em_Parser_MirrorXmlAbstractPar
        }
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/parser/class.tx_em_parser_mirrorxmlpullparser.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/parser/class.tx_em_parser_mirrorxmlpullparser.php']);
+}
+
 ?>
\ No newline at end of file
index a207a6f..d3497fe 100644 (file)
@@ -218,4 +218,8 @@ class tx_em_Parser_MirrorXmlPushParser extends tx_em_Parser_MirrorXmlAbstractPar
        }
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/parser/class.tx_em_parser_mirrorxmlpushparser.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/parser/class.tx_em_parser_mirrorxmlpushparser.php']);
+}
+
 ?>
\ No newline at end of file
index 3c2879f..1975117 100644 (file)
@@ -103,4 +103,7 @@ abstract class tx_em_Parser_XmlAbstractParser {
        abstract protected function throwException($message = "", $code = 0);
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/parser/class.tx_em_parser_xmlabstractparser.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/parser/class.tx_em_parser_xmlabstractparser.php']);
+}
 ?>
index f940c64..b7bd607 100644 (file)
@@ -108,4 +108,8 @@ class tx_em_Parser_XmlParserFactory {
        }
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/parser/class.tx_em_parser_xmlparserfactory.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/parser/class.tx_em_parser_xmlparserfactory.php']);
+}
+
 ?>
diff --git a/typo3/sysext/em/classes/reports/class.tx_em_reports_extensionstatus.php b/typo3/sysext/em/classes/reports/class.tx_em_reports_extensionstatus.php
new file mode 100644 (file)
index 0000000..c7fd7ee
--- /dev/null
@@ -0,0 +1,197 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 Steffen Kamper <steffen@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+class tx_em_reports_ExtensionStatus  implements tx_reports_StatusProvider {
+
+       /**
+        * @var string
+        */
+       protected $ok = '';
+
+       /**
+        * @var string
+        */
+       protected $error = '';
+
+       /**
+        * Determines the status of extension manager
+        *
+        * @return      array   List of statuses
+        * @see typo3/sysext/reports/interfaces/tx_reports_StatusProvider::getStatus()
+        */
+       public function getStatus() {
+               $this->ok = $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:translation_status_ok');
+               $this->error = t3lib_div::strtoupper($GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_error'));
+               $status = $this->getInsecuredExtensionsInSystem();
+
+               $statuses = array(
+                       'mainRepositoryCheck' => $this->checkMainRepositoryCheck(),
+                       'extensionsSecurityStatusNotInstalled' => $status[0],
+                       'extensionsSecurityStatusInstalled' => $status[1],
+               );
+
+               return $statuses;
+       }
+
+       /**
+        * Checks main repository in sys_ter (existance, has extensions / update older tha 7 days
+        *
+        * @return      tx_reports_reports_status_Status        An tx_reports_reports_status_Status object representing whether
+        */
+       protected function checkMainRepositoryCheck() {
+               $value = $this->ok;
+               $severity = tx_reports_reports_status_Status::OK;
+               $message = '';
+
+               $tables = array_keys($GLOBALS{'TYPO3_DB'}->admin_get_tables());
+               if (!in_array('sys_ter', $tables)) {
+                       $value = $this->error;
+                       $severity = tx_reports_reports_status_Status::ERROR;
+                       $message = $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:reports_sysTerNotFound');
+               } else {
+                       $row = $GLOBALS{'TYPO3_DB'}->exec_SELECTgetSingleRow(
+                               '*', 'sys_ter', 'uid=1'
+                       );
+                       if (!is_array($row) || $row['title'] !== 'TYPO3.org Main Repository') {
+                               $value = $this->error;
+                               $severity = tx_reports_reports_status_Status::ERROR;
+                               $message = $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:reports_MainRepositoryNotFound');
+                       } else {
+                               if ($row['extCount'] == 0) {
+                                       $value = $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:reports_NoExtensionsFound');
+                                       $severity = tx_reports_reports_status_Status::WARNING;
+                                       $message = $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:reports_MainRepositoryNoExtensions');
+                               } else {
+                                       if ($row['lastUpdated'] < $GLOBALS['EXEC_TIME'] - (3600*24*7)) {
+                                               $value = $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:reports_ExtensionsNotUpToDate');
+                                               $severity = tx_reports_reports_status_Status::NOTICE;
+                                               $message = $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:reports_MainRepositoryOldList');
+                                       }
+                               }
+                       }
+               }
+
+               return t3lib_div::makeInstance('tx_reports_reports_status_Status',
+                       $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:reports_StatusMainRepository'),
+                       $value,
+                       $message,
+                       $severity
+               );
+       }
+
+
+       /**
+        * Checks if there are insecure extensions in system
+        *
+        * @return      tx_reports_reports_status_Status        An tx_reports_reports_status_Status object representing whether
+        */
+       protected function getInsecuredExtensionsInSystem() {
+               $value    = array(
+                       $this->ok,
+                       $this->ok
+               );
+               $message  = array('', '');
+               $severity = array(tx_reports_reports_status_Status::OK, tx_reports_reports_status_Status::OK);
+          $initialMessage = array(
+                  $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:reports_insecureInstalledExtensions') . '<br><br>',
+                  $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:reports_insecureExistingExtensions') . '<br><br>',
+          );
+               $extensionList = array();
+               $installedExtensionList = array();
+               $extensionCompareList = array();
+               $unsecureList = array();
+
+               /** @var $list tx_em_Extensions_List */
+               $list = t3lib_div::makeInstance('tx_em_Extensions_List');
+               $extList = $list->getInstalledExtensions(TRUE);
+
+               foreach ($extList as $extension) {
+                       $extensionList[] = '"' . $extension['extkey'] . '"';
+                       $extensionCompareList[] = $extension['extkey'] . '|' . $extension['version'];
+                       if ($extension['installed']) {
+                               $installedExtensionList[] = $extension['extkey'];
+                       }
+               }
+
+                       // prepare flat list of extensions for sql
+               $flatList = implode(',', $extensionList);
+                       // get insecure extensions from database
+               $insecureListRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
+                       'extkey, version',
+                       'cache_extensions',
+                       'reviewstate=-1 and extkey IN(' . $flatList . ')'
+               );
+               foreach ($insecureListRows as $row) {
+                       $unsecureList[] = $row['extkey'] . '|' . $row['version'];
+               }
+
+               $resultArray = array_intersect($extensionCompareList, $unsecureList);
+
+               if (count($resultArray) > 0) {
+                       $count = array(0, 0);
+                       foreach ($resultArray as $result) {
+                               $temp = explode('|', $result);
+                               $index = in_array($temp[0], $installedExtensionList) ? 0 : 1;
+                               $severity[$index] = $index === 0 ? tx_reports_reports_status_Status::ERROR : tx_reports_reports_status_Status::WARNING;
+                               $count[$index]++;
+                               if ($message[$index] === '') {
+                                       $message[$index] = $initialMessage[$index];
+                               }
+                               $message[$index] .= '<strong>' . $temp[0] . '</strong> (version ' . $temp[1] . ')<br>';
+                       }
+                       if ($count[0]) {
+                               $value[0] = sprintf($GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:reports_insecureExtensionsFound'), $count[0]);
+                       }
+                       if ($count[1]) {
+                               $value[1] = sprintf($GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:reports_insecureExtensionsFound'), $count[1]);
+                       }
+               }
+
+               $status[0] = t3lib_div::makeInstance('tx_reports_reports_status_Status',
+                       $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:reports_StatusInstalledExtensions'),
+                       $value[0],
+                       $message[0],
+                       $severity[0]
+               );
+
+               $status[1] = t3lib_div::makeInstance('tx_reports_reports_status_Status',
+                       $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:reports_StatusExistingExtensions'),
+                       $value[1],
+                       $message[1],
+                       $severity[1]
+               );
+
+               return $status;
+       }
+
+}
+
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/em/classes/reports/class.tx_em_reports_extensionstatus.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/em/classes/reports/class.tx_em_reports_extensionstatus.php']);
+}
+
+?>
\ No newline at end of file
index 2d9394e..ec99907 100644 (file)
@@ -400,4 +400,8 @@ class tx_em_Repository {
        }
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/repository/class.tx_em_repository.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/repository/class.tx_em_repository.php']);
+}
+
 ?>
\ No newline at end of file
index ba30223..1c0a7aa 100644 (file)
@@ -143,4 +143,8 @@ class tx_em_Repository_Mirrors {
        }
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/repository/class.tx_em_repository_mirrors.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/repository/class.tx_em_repository_mirrors.php']);
+}
+
 ?>
\ No newline at end of file
index 523fb6f..7060944 100644 (file)
@@ -373,4 +373,8 @@ class tx_em_Repository_Utility implements t3lib_Singleton {
        }
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/repository/class.tx_em_repository_utility.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/repository/class.tx_em_repository_utility.php']);
+}
+
 ?>
\ No newline at end of file
index 4409d26..af45e24 100644 (file)
@@ -105,7 +105,7 @@ class tx_em_Settings implements t3lib_Singleton {
                                'translations' => $GLOBALS['LANG']->getLL('menu_translation_handling'),
                                'settings' => $GLOBALS['LANG']->getLL('menu_settings'),
                                'updates' => $GLOBALS['LANG']->getLL('menu_extension_updates'),
-                               'extensionmanager' => 'New Extension manager (beta2)', //$GLOBALS['LANG']->getLL('header'),
+                               'extensionmanager' => 'New Extension manager (beta3)', //$GLOBALS['LANG']->getLL('header'),
                                'develop' => $GLOBALS['LANG']->getLL('menu_extension_develop'),
                        ),
                        'listOrder' => array(
@@ -275,4 +275,8 @@ class tx_em_Settings implements t3lib_Singleton {
 
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/settings/class.tx_em_settings.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/repository/class.tx_em_settings.php']);
+}
+
 ?>
\ No newline at end of file
index 1280465..803fe4b 100644 (file)
@@ -68,8 +68,8 @@ class tx_em_Tasks_UpdateExtensionList extends tx_scheduler_Task {
        }
 }
 
-if (defined('TYPO3_MODE') && $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/em/classes/tasks/class.tx_em_tasks_updateextensionlist.php']) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/em/classes/tasks/class.tx_em_tasks_updateextensionlist.php']);
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/tasks/class.tx_em_tasks_updateextensionlist.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/tasks/class.tx_em_tasks_updateextensionlist.php']);
 }
 
 ?>
\ No newline at end of file
index 8c30af1..bf66c8d 100644 (file)
@@ -51,8 +51,8 @@ final class tx_em_Tools {
                'misc' => 4,
                'services' => 5,
                'templates' => 6,
-               'example' => 9,
                'doc' => 8,
+               'example' => 9,
        );
        /**
         * Keeps default states.
@@ -108,7 +108,7 @@ final class tx_em_Tools {
                if (strlen($GLOBALS['TYPO3_CONF_VARS']['BE']['unzip_path'])) {
                        chdir($path);
                        $cmd = $GLOBALS['TYPO3_CONF_VARS']['BE']['unzip_path'] . ' -o ' . escapeshellarg($file);
-                       t3lib_utility_Command::exec($cmd, $list, $ret);
+                       t3liv_utility_Command::exec($cmd, $list, $ret);
                        return ($ret === 0);
                } else {
                                // we use a pure PHP unzip
@@ -762,6 +762,25 @@ final class tx_em_Tools {
        }
 
        /**
+        * Extension States
+        * Content must be redundant with the same internal variable as in class.tx_extrep.php!
+        *
+        * @static
+        * @return array
+        */
+       public static function getStates() {
+               return array(
+                       'alpha' => $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:state_alpha'),
+                       'beta' => $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:state_beta'),
+                       'stable' => $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:state_stable'),
+                       'experimental' => $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:state_experimental'),
+                       'test' => $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:state_test'),
+                       'obsolete' => $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:state_obsolete'),
+                       'excludeFromUpdates' => $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:state_exclude_from_updates')
+               );
+       }
+
+       /**
         * Reports back if installation in a certain scope is possible.
         *
         * @param       string          Scope: G, L, S
@@ -885,15 +904,14 @@ final class tx_em_Tools {
                                                                }
                                                        }
                                                                // Check for proper XCLASS definition
-                                                               // Match $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS'] with single or doublequotes
+                                                               // Match $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS'] with single or doublequotes
                                                        $XclassSearch = '\$TYPO3_CONF_VARS\[TYPO3_MODE\]\[[\'"]XCLASS[\'"]\]';
                                                        $XclassParts = preg_split('/if \(defined\([\'"]TYPO3_MODE[\'"]\) && ' . $XclassSearch . '/', $fContent, 2);
                                                        if (count($XclassParts) !== 2) {
                                                                        // Match $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS'] with single or doublequotes
                                                                $XclassSearch = '\$GLOBALS\[[\'"]TYPO3_CONF_VARS[\'"]\]\[TYPO3_MODE\]\[[\'"]XCLASS[\'"]\]';
-                                                               $XclassParts = preg_split('/if \(defined\([\'"]TYPO3_MODE[\'"]\) && (isset\()?' . $XclassSearch . '/', $fContent, 2);
+                                                               $XclassParts = preg_split('/if \(defined\([\'"]TYPO3_MODE[\'"]\) && ' . $XclassSearch . '/', $fContent, 2);
                                                        }
-
                                                        if (count($XclassParts) == 2) {
                                                                unset($reg);
                                                                preg_match('/^\[[\'"]([[:alnum:]_\/\.]*)[\'"]\]/', $XclassParts[1], $reg);
@@ -1020,4 +1038,4 @@ final class tx_em_Tools {
        }
 }
 
-?>
+?>
\ No newline at end of file
index a8f207f..4041c08 100644 (file)
@@ -542,11 +542,6 @@ class tx_em_Tools_Unzip {
                        }
                }
 
-                       // added by TYPO3 secteam to check for invalid paths
-               if (!t3lib_div::validPathStr($p_entry['filename'])) {
-                               return $v_result;
-               }
-
                // Add the path
                if ($p_path != '') {
                        $p_entry['filename'] = $p_path . "/" . $p_entry['filename'];
@@ -1387,4 +1382,7 @@ class tx_em_Tools_Unzip {
 
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/tools/class.tx_em_tools_unzip.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/tools/class.tx_em_tools_unzip.php']);
+}
 ?>
\ No newline at end of file
index 4474ac7..88bbab6 100644 (file)
  */
 class tx_em_Tools_XmlHandler {
 
-       /**
-        * Enxtension Manager module
-        *
-        * @var SC_mod_tools_em_index
-        */
-       var $emObj;
 
        /**
         * Holds the parsed XML from extensions.xml.gz
@@ -50,10 +44,62 @@ class tx_em_Tools_XmlHandler {
         *
         * @var array
         */
-       var $extXMLResult = array();
-       var $extensionsXML = array();
-       var $reviewStates = null;
-       var $useObsolete = false;
+       protected $extXMLResult = array();
+
+       /**
+        * @var array
+        */
+       public $extensionsXML = array();
+
+       /**
+        * @var NULL
+        */
+       protected $reviewStates = NULL;
+
+       /**
+        * @var bool
+        */
+       public $useObsolete = FALSE;
+
+       /**
+        * @var array
+        */
+       protected $catArr = array();
+
+       /**
+        * @var array
+        */
+       protected $stateArr = array();
+
+       /**
+        * @var int
+        */
+       public $matchingCount = 0;
+
+       /**
+        * @var array
+        */
+       protected $revCatArr = array();
+
+       /**
+        * @var array
+        */
+       protected $revStateArr = array();
+
+       /**
+        * @var string
+        */
+       protected $currentExt = '';
+
+       /**
+        * @var string
+        */
+       protected $currentVersion = '';
+
+       /**
+        * @var string
+        */
+       protected $currentTag = '';
 
        /**
         * Reduces the entries in $this->extensionsXML to the latest version per extension and removes entries not matching the search parameter
@@ -68,7 +114,7 @@ class tx_em_Tools_XmlHandler {
         * @param       boolean         $exactMatch If set search is done for exact matches of extension keys only
         * @return      void
         */
-       function searchExtensionsXML($search, $owner = '', $order = '', $allExt = false, $allVer = false, $offset = 0, $limit = 500, $exactMatch = false) {
+       function searchExtensionsXML($search, $owner = '', $order = '', $allExt = FALSE, $allVer = FALSE, $offset = 0, $limit = 500, $exactMatch = FALSE) {
                $where = '1=1';
                if ($search && $exactMatch) {
                        $where .= ' AND extkey=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($search, 'cache_extensions');
@@ -95,28 +141,30 @@ class tx_em_Tools_XmlHandler {
                switch ($order) {
                        case 'author_company':
                                $forder = 'authorname, authorcompany';
-                               break;
+                       break;
                        case 'state':
                                $forder = 'state';
-                               break;
+                       break;
                        case 'cat':
                        default:
                                $forder = 'category';
-                               break;
+                       break;
                }
                $order = $forder . ', title';
                if (!$allVer) {
                        $where .= ' AND lastversion > 0';
                }
-               $this->catArr = array();
+
                $idx = 0;
-               foreach ($this->emObj->defaultCategories['cat'] as $catKey => $tmp) {
+               $defaultCategories = tx_em_Tools::getDefaultCategory();
+               foreach ($defaultCategories as $catKey => $tmp) {
                        $this->catArr[$idx] = $catKey;
                        $idx++;
                }
-               $this->stateArr = array();
+
                $idx = 0;
-               foreach ($this->emObj->states as $state => $tmp) {
+               $states = tx_em_Tools::getStates();
+               foreach ($states as $state => $tmp) {
                        $this->stateArr[$idx] = $state;
                        $idx++;
                }
@@ -157,8 +205,8 @@ class tx_em_Tools_XmlHandler {
         * @param       integer         $limit  Maximum number of entries to return (goes into LIMIT clause)
         * @return      void
         */
-       function searchExtensionsXMLExact($search, $owner = '', $order = '', $allExt = false, $allVer = false, $offset = 0, $limit = 500) {
-               $this->searchExtensionsXML($search, $owner, $order, $allExt, $allVer, $offset, $limit, true);
+       function searchExtensionsXMLExact($search, $owner = '', $order = '', $allExt = FALSE, $allVer = FALSE, $offset = 0, $limit = 500) {
+               $this->searchExtensionsXML($search, $owner, $order, $allExt, $allVer, $offset, $limit, TRUE);
        }
 
        function countExtensions() {
@@ -171,10 +219,10 @@ class tx_em_Tools_XmlHandler {
        /**
         * Loads the pre-parsed extension list
         *
-        * @return      boolean         true on success, false on error
+        * @return      boolean         TRUE on success, FALSE on error
         */
        function loadExtensionsXML() {
-               $this->searchExtensionsXML('', '', '', true);
+               $this->searchExtensionsXML('', '', '', TRUE);
        }
 
        /**
@@ -321,15 +369,17 @@ class tx_em_Tools_XmlHandler {
                }
                $string = gzread($fp, 0xffff); // Read 64KB
 
-               $this->revCatArr = array();
+
                $idx = 0;
-               foreach ($this->emObj->defaultCategories['cat'] as $catKey => $tmp) {
+               $defaultCategories = tx_em_Tools::getDefaultCategory();
+               foreach ($defaultCategories['cat'] as $catKey => $tmp) {
                        $this->revCatArr[$catKey] = $idx++;
                }
 
-               $this->revStateArr = array();
+
                $idx = 0;
-               foreach ($this->emObj->states as $state => $tmp) {
+               $states = tx_em_Tools::getStates();
+               foreach ($states as $state => $tmp) {
                        $this->revStateArr[$state] = $idx++;
                }
 
@@ -342,7 +392,7 @@ class tx_em_Tools_XmlHandler {
                                // Parse content:
                                if (!xml_parse($parser, $match[0], 0)) {
                                        $content .= 'Error in XML parser while decoding extensions XML file. Line ' . xml_get_current_line_number($parser) . ': ' . xml_error_string(xml_get_error_code($parser));
-                                       $error = true;
+                                       $error = TRUE;
                                        break;
                                }
                                $this->storeXMLResult();
@@ -358,7 +408,7 @@ class tx_em_Tools_XmlHandler {
                                        4 => 'PREG_BAD_UTF8_ERROR'
                                );
                                $content .= 'Error in regular expression matching, code: ' . $errorcodes[preg_last_error()] . '<br />See <a href="http://www.php.net/manual/en/function.preg-last-error.php" target="_blank">http://www.php.net/manual/en/function.preg-last-error.php</a>';
-                               $error = true;
+                               $error = TRUE;
                                break;
                        } else {
                                if (gzeof($fp)) {
@@ -366,12 +416,13 @@ class tx_em_Tools_XmlHandler {
                                } // Nothing more can be read
                                $string .= gzread($fp, 0xffff); // Read another 64KB
                        }
-               } while (true);
+               } while (TRUE);
 
                xml_parser_free($parser);
                gzclose($fp);
 
                if (!$error) {
+                       /** @var $flashMessage t3lib_FlashMessage */
                        $flashMessage = t3lib_div::makeInstance(
                                't3lib_FlashMessage',
                                sprintf($GLOBALS['LANG']->getLL('ext_import_extlist_updated'), $extcount),
@@ -535,7 +586,7 @@ class tx_em_Tools_XmlHandler {
                                                unset($oldCurrent);
                                                break;
                                        case 'complete': // If "complete", then it's a value. If the attribute "base64" is set, then decode the value, otherwise just set it.
-                                               $current[$tagName] = (string) $val['value']; // Had to cast it as a string - otherwise it would be evaluate false if tested with isset()!!
+                                               $current[$tagName] = (string) $val['value']; // Had to cast it as a string - otherwise it would be evaluate FALSE if tested with isset()!!
                                                break;
                                }
                        }
@@ -600,7 +651,7 @@ class tx_em_Tools_XmlHandler {
                                                unset($oldCurrent);
                                                break;
                                        case 'complete': // If "complete", then it's a value. If the attribute "base64" is set, then decode the value, otherwise just set it.
-                                               $current[$tagName] = (string) $val['value']; // Had to cast it as a string - otherwise it would be evaluate false if tested with isset()!!
+                                               $current[$tagName] = (string) $val['value']; // Had to cast it as a string - otherwise it would be evaluate FALSE if tested with isset()!!
                                                break;
                                }
                        }
@@ -609,4 +660,8 @@ class tx_em_Tools_XmlHandler {
        }
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/tools/class.tx_em_tools_smlhandler.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/tools/class.tx_em_tools_xmlhandler.php']);
+}
+
 ?>
\ No newline at end of file
index 1d463ee..dd1127d 100644 (file)
@@ -398,4 +398,8 @@ class tx_em_Translations {
 
 }
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/translations/class.tx_em_translations.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/translations/class.tx_em_translations.php']);
+}
+
 ?>
\ No newline at end of file
index 8fe9d16..c755269 100644 (file)
@@ -10,6 +10,7 @@ return array(
        'tx_em_connection_ter' => $emClassesPath . 'connection/class.tx_em_connection_ter.php',
        'tx_em_connection_soap' => $emClassesPath . 'connection/class.tx_em_connection_soap.php',
        'tx_em_connection_extdirectserver' => $emClassesPath . 'connection/class.tx_em_connection_extdirectserver.php',
+       'tx_em_connection_extdirectsoap' => $emClassesPath . 'connection/class.tx_em_connection_extdirectsoap.php',
 
        'tx_em_database' => $emClassesPath . 'database/class.tx_em_database.php',
 
@@ -50,6 +51,8 @@ return array(
 
        'tx_em_translations' => $emClassesPath . 'translations/class.tx_em_translations.php',
 
+       'tx_em_reports_extensionstatus' => $emClassesPath . 'reports/class.tx_em_reports_extensionstatus.php',
+
 
        'tx_em_develop' => $emClassesPath . 'class.tx_em_develop.php',
        'tx_em_extensionmanager' => $emClassesPath . 'class.tx_em_extensionmanager.php',
index 2f2d0b3..1b81715 100644 (file)
@@ -3,7 +3,7 @@
 ########################################################################
 # Extension Manager/Repository config file for ext "em".
 #
-# Auto generated 01-12-2010 23:35
+# Auto generated 28-12-2010 15:54
 #
 # Manual updates:
 # Only the data in the array - everything else is removed by next
@@ -33,8 +33,8 @@ $EM_CONF[$_EXTKEY] = array(
        'author_company' => '',
        'CGLcompliance' => '',
        'CGLcompliance_note' => '',
-       'version' => '2.0.2beta2',
-       '_md5_values_when_last_written' => 'a:91:{s:16:"ext_autoload.php";s:4:"55c9";s:12:"ext_icon.gif";s:4:"2cc2";s:17:"ext_localconf.php";s:4:"fd30";s:14:"ext_tables.php";s:4:"4ef6";s:14:"ext_tables.sql";s:4:"5a42";s:25:"ext_tables_static+adt.sql";s:4:"3c1b";s:27:"classes/class.tx_em_api.php";s:4:"7b62";s:31:"classes/class.tx_em_develop.php";s:4:"98bd";s:40:"classes/class.tx_em_extensionmanager.php";s:4:"7ccc";s:16:"classes/conf.php";s:4:"d842";s:17:"classes/index.php";s:4:"7117";s:61:"classes/connection/class.tx_em_connection_extdirectserver.php";s:4:"ac98";s:59:"classes/connection/class.tx_em_connection_extdirectsoap.php";s:4:"daf8";s:50:"classes/connection/class.tx_em_connection_soap.php";s:4:"d1f9";s:49:"classes/connection/class.tx_em_connection_ter.php";s:4:"3d38";s:41:"classes/database/class.tx_em_database.php";s:4:"e6c0";s:54:"classes/exception/class.tx_em_connection_exception.php";s:4:"8b14";s:59:"classes/exception/class.tx_em_extensionimport_exception.php";s:4:"62e2";s:56:"classes/exception/class.tx_em_extensionxml_exception.php";s:4:"fcfe";s:53:"classes/exception/class.tx_em_mirrorxml_exception.php";s:4:"ad05";s:47:"classes/exception/class.tx_em_xml_exception.php";s:4:"3679";s:53:"classes/extensions/class.tx_em_extensions_details.php";s:4:"ae75";s:50:"classes/extensions/class.tx_em_extensions_list.php";s:4:"f74a";s:59:"classes/import/class.tx_em_import_extensionlistimporter.php";s:4:"62c8";s:56:"classes/import/class.tx_em_import_mirrorlistimporter.php";s:4:"3ea7";s:39:"classes/install/class.tx_em_install.php";s:4:"0c5c";s:64:"classes/parser/class.tx_em_parser_extensionxmlabstractparser.php";s:4:"d268";s:60:"classes/parser/class.tx_em_parser_extensionxmlpullparser.php";s:4:"c604";s:60:"classes/parser/class.tx_em_parser_extensionxmlpushparser.php";s:4:"3bcc";s:61:"classes/parser/class.tx_em_parser_mirrorxmlabstractparser.php";s:4:"802b";s:57:"classes/parser/class.tx_em_parser_mirrorxmlpullparser.php";s:4:"1054";s:57:"classes/parser/class.tx_em_parser_mirrorxmlpushparser.php";s:4:"b5f5";s:55:"classes/parser/class.tx_em_parser_xmlabstractparser.php";s:4:"911a";s:54:"classes/parser/class.tx_em_parser_xmlparserfactory.php";s:4:"f56a";s:45:"classes/repository/class.tx_em_repository.php";s:4:"5dbd";s:53:"classes/repository/class.tx_em_repository_mirrors.php";s:4:"dc40";s:53:"classes/repository/class.tx_em_repository_utility.php";s:4:"886d";s:41:"classes/settings/class.tx_em_settings.php";s:4:"68fc";s:55:"classes/tasks/class.tx_em_tasks_updateextensionlist.php";s:4:"7e39";s:35:"classes/tools/class.tx_em_tools.php";s:4:"050f";s:41:"classes/tools/class.tx_em_tools_unzip.php";s:4:"ffe1";s:46:"classes/tools/class.tx_em_tools_xmlhandler.php";s:4:"48bb";s:49:"classes/translations/class.tx_em_translations.php";s:4:"7a8b";s:61:"interfaces/interface.tx_em_index_checkdatabaseupdateshook.php";s:4:"7178";s:22:"language/locallang.xml";s:4:"2732";s:17:"res/css/t3_em.css";s:4:"274a";s:20:"res/icons/cancel.png";s:4:"757a";s:22:"res/icons/download.png";s:4:"c5b2";s:19:"res/icons/drive.png";s:4:"9520";s:25:"res/icons/filebrowser.png";s:4:"25b9";s:18:"res/icons/flag.png";s:4:"8798";s:19:"res/icons/image.png";s:4:"82ab";s:21:"res/icons/install.gif";s:4:"8d57";s:19:"res/icons/oodoc.gif";s:4:"744b";s:20:"res/icons/server.png";s:4:"92ce";s:22:"res/icons/settings.png";s:4:"30a1";s:19:"res/icons/tools.png";s:4:"16d9";s:23:"res/icons/uninstall.gif";s:4:"a77f";s:16:"res/js/em_app.js";s:4:"38e3";s:23:"res/js/em_components.js";s:4:"6517";s:18:"res/js/em_files.js";s:4:"efa9";s:22:"res/js/em_languages.js";s:4:"b9b0";s:20:"res/js/em_layouts.js";s:4:"0c4f";s:22:"res/js/em_locallist.js";s:4:"e321";s:27:"res/js/em_repositorylist.js";s:4:"7096";s:21:"res/js/em_settings.js";s:4:"d657";s:16:"res/js/em_ter.js";s:4:"a237";s:18:"res/js/em_tools.js";s:4:"8b1b";s:22:"res/js/em_usertools.js";s:4:"37ce";s:33:"res/js/overrides/ext_overrides.js";s:4:"3bc1";s:24:"res/js/ux/GridFilters.js";s:4:"b42c";s:27:"res/js/ux/custom_plugins.js";s:4:"a27f";s:28:"res/js/ux/fileuploadfield.js";s:4:"06a5";s:29:"res/js/ux/rowpanelexpander.js";s:4:"fc07";s:24:"res/js/ux/searchfield.js";s:4:"41a1";s:29:"res/js/ux/css/GridFilters.css";s:4:"78fa";s:27:"res/js/ux/css/RangeMenu.css";s:4:"c5f6";s:33:"res/js/ux/filter/BooleanFilter.js";s:4:"d67f";s:30:"res/js/ux/filter/DateFilter.js";s:4:"1d6d";s:26:"res/js/ux/filter/Filter.js";s:4:"5e35";s:30:"res/js/ux/filter/ListFilter.js";s:4:"a9ab";s:33:"res/js/ux/filter/NumericFilter.js";s:4:"abb4";s:32:"res/js/ux/filter/StringFilter.js";s:4:"0923";s:27:"res/js/ux/images/equals.png";s:4:"87b7";s:25:"res/js/ux/images/find.png";s:4:"9f1c";s:33:"res/js/ux/images/greater_than.png";s:4:"746c";s:30:"res/js/ux/images/less_than.png";s:4:"2fb7";s:38:"res/js/ux/images/sort_filtered_asc.gif";s:4:"9e7a";s:39:"res/js/ux/images/sort_filtered_desc.gif";s:4:"6d59";s:26:"res/js/ux/menu/ListMenu.js";s:4:"d6c1";s:27:"res/js/ux/menu/RangeMenu.js";s:4:"cc46";};',
+       'version' => '4.5.0',
+       '_md5_values_when_last_written' => 'a:98:{s:16:"ext_autoload.php";s:4:"a363";s:12:"ext_icon.gif";s:4:"2cc2";s:17:"ext_localconf.php";s:4:"fd30";s:14:"ext_tables.php";s:4:"93ea";s:14:"ext_tables.sql";s:4:"5a42";s:25:"ext_tables_static+adt.sql";s:4:"3c1b";s:27:"classes/class.tx_em_api.php";s:4:"c09b";s:31:"classes/class.tx_em_develop.php";s:4:"98bd";s:40:"classes/class.tx_em_extensionmanager.php";s:4:"4667";s:16:"classes/conf.php";s:4:"d842";s:17:"classes/index.php";s:4:"0753";s:61:"classes/connection/class.tx_em_connection_extdirectserver.php";s:4:"8a8a";s:59:"classes/connection/class.tx_em_connection_extdirectsoap.php";s:4:"b6c6";s:50:"classes/connection/class.tx_em_connection_soap.php";s:4:"decd";s:49:"classes/connection/class.tx_em_connection_ter.php";s:4:"543b";s:41:"classes/database/class.tx_em_database.php";s:4:"6e3b";s:54:"classes/exception/class.tx_em_connection_exception.php";s:4:"8b14";s:59:"classes/exception/class.tx_em_extensionimport_exception.php";s:4:"62e2";s:56:"classes/exception/class.tx_em_extensionxml_exception.php";s:4:"fcfe";s:53:"classes/exception/class.tx_em_mirrorxml_exception.php";s:4:"ad05";s:47:"classes/exception/class.tx_em_xml_exception.php";s:4:"3679";s:53:"classes/extensions/class.tx_em_extensions_details.php";s:4:"50b9";s:50:"classes/extensions/class.tx_em_extensions_list.php";s:4:"8a24";s:59:"classes/import/class.tx_em_import_extensionlistimporter.php";s:4:"25e8";s:56:"classes/import/class.tx_em_import_mirrorlistimporter.php";s:4:"6c5e";s:39:"classes/install/class.tx_em_install.php";s:4:"5350";s:64:"classes/parser/class.tx_em_parser_extensionxmlabstractparser.php";s:4:"469f";s:60:"classes/parser/class.tx_em_parser_extensionxmlpullparser.php";s:4:"6d57";s:60:"classes/parser/class.tx_em_parser_extensionxmlpushparser.php";s:4:"eb30";s:61:"classes/parser/class.tx_em_parser_mirrorxmlabstractparser.php";s:4:"f14d";s:57:"classes/parser/class.tx_em_parser_mirrorxmlpullparser.php";s:4:"8092";s:57:"classes/parser/class.tx_em_parser_mirrorxmlpushparser.php";s:4:"7267";s:55:"classes/parser/class.tx_em_parser_xmlabstractparser.php";s:4:"6d00";s:54:"classes/parser/class.tx_em_parser_xmlparserfactory.php";s:4:"471c";s:55:"classes/reports/class.tx_em_reports_extensionstatus.php";s:4:"f631";s:45:"classes/repository/class.tx_em_repository.php";s:4:"d727";s:53:"classes/repository/class.tx_em_repository_mirrors.php";s:4:"987c";s:53:"classes/repository/class.tx_em_repository_utility.php";s:4:"33ed";s:41:"classes/settings/class.tx_em_settings.php";s:4:"b6d5";s:55:"classes/tasks/class.tx_em_tasks_updateextensionlist.php";s:4:"b634";s:35:"classes/tools/class.tx_em_tools.php";s:4:"86a1";s:41:"classes/tools/class.tx_em_tools_unzip.php";s:4:"e6b9";s:46:"classes/tools/class.tx_em_tools_xmlhandler.php";s:4:"9686";s:49:"classes/translations/class.tx_em_translations.php";s:4:"b1a6";s:61:"interfaces/interface.tx_em_index_checkdatabaseupdateshook.php";s:4:"7178";s:22:"language/locallang.xml";s:4:"c7b2";s:18:"res/css/editor.css";s:4:"d4a2";s:17:"res/css/t3_em.css";s:4:"ddfe";s:24:"res/icons/arrow_redo.png";s:4:"343b";s:24:"res/icons/arrow_undo.png";s:4:"9a4f";s:20:"res/icons/cancel.png";s:4:"757a";s:22:"res/icons/download.png";s:4:"c5b2";s:19:"res/icons/drive.png";s:4:"9520";s:25:"res/icons/filebrowser.png";s:4:"25b9";s:18:"res/icons/flag.png";s:4:"8798";s:19:"res/icons/image.png";s:4:"82ab";s:21:"res/icons/install.gif";s:4:"8d57";s:20:"res/icons/jslint.gif";s:4:"2e24";s:19:"res/icons/oodoc.gif";s:4:"744b";s:20:"res/icons/server.png";s:4:"92ce";s:22:"res/icons/settings.png";s:4:"30a1";s:25:"res/icons/text_indent.png";s:4:"47f0";s:19:"res/icons/tools.png";s:4:"16d9";s:23:"res/icons/uninstall.gif";s:4:"a77f";s:16:"res/js/em_app.js";s:4:"7d34";s:23:"res/js/em_components.js";s:4:"e09b";s:18:"res/js/em_files.js";s:4:"ce62";s:22:"res/js/em_languages.js";s:4:"d086";s:20:"res/js/em_layouts.js";s:4:"90a1";s:22:"res/js/em_locallist.js";s:4:"185d";s:27:"res/js/em_repositorylist.js";s:4:"da7a";s:21:"res/js/em_settings.js";s:4:"08b3";s:16:"res/js/em_ter.js";s:4:"a237";s:18:"res/js/em_tools.js";s:4:"8845";s:22:"res/js/em_usertools.js";s:4:"8935";s:33:"res/js/overrides/ext_overrides.js";s:4:"3bc1";s:24:"res/js/ux/GridFilters.js";s:4:"95db";s:27:"res/js/ux/custom_plugins.js";s:4:"a27f";s:28:"res/js/ux/fileuploadfield.js";s:4:"06a5";s:19:"res/js/ux/jslint.js";s:4:"8c75";s:29:"res/js/ux/rowpanelexpander.js";s:4:"2158";s:24:"res/js/ux/searchfield.js";s:4:"41a1";s:29:"res/js/ux/css/GridFilters.css";s:4:"78fa";s:27:"res/js/ux/css/RangeMenu.css";s:4:"c5f6";s:33:"res/js/ux/filter/BooleanFilter.js";s:4:"d67f";s:30:"res/js/ux/filter/DateFilter.js";s:4:"1d6d";s:26:"res/js/ux/filter/Filter.js";s:4:"5e35";s:30:"res/js/ux/filter/ListFilter.js";s:4:"a9ab";s:33:"res/js/ux/filter/NumericFilter.js";s:4:"abb4";s:32:"res/js/ux/filter/StringFilter.js";s:4:"0923";s:27:"res/js/ux/images/equals.png";s:4:"87b7";s:25:"res/js/ux/images/find.png";s:4:"9f1c";s:33:"res/js/ux/images/greater_than.png";s:4:"746c";s:30:"res/js/ux/images/less_than.png";s:4:"2fb7";s:38:"res/js/ux/images/sort_filtered_asc.gif";s:4:"9e7a";s:39:"res/js/ux/images/sort_filtered_desc.gif";s:4:"6d59";s:26:"res/js/ux/menu/ListMenu.js";s:4:"d6c1";s:27:"res/js/ux/menu/RangeMenu.js";s:4:"cc46";}',
        'constraints' => array(
                'depends' => array(
                        'cms' => '',
index 17b79c7..b1ee13b 100644 (file)
@@ -9,5 +9,7 @@ if (TYPO3_MODE === 'BE') {
        $TYPO3_CONF_VARS['SC_OPTIONS']['ExtDirect']['TYPO3.EM.ExtDirect'] = t3lib_extMgm::extPath($_EXTKEY) . 'classes/connection/class.tx_em_connection_extdirectserver.php:tx_em_Connection_ExtDirectServer';
        $TYPO3_CONF_VARS['SC_OPTIONS']['ExtDirect']['TYPO3.EMSOAP.ExtDirect'] = t3lib_extMgm::extPath($_EXTKEY) . 'classes/connection/class.tx_em_connection_extdirectsoap.php:tx_em_Connection_ExtDirectSoap';
 
+               // register reports check
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['ExtensionManager'][] = 'tx_em_reports_ExtensionStatus';
 }
 ?>
\ No newline at end of file
index 095ef40..f594bbb 100644 (file)
                        <label index="header">Extension Manager</label>
                        <label index="group_by">Group by:</label>
                        <label index="show">Show:</label>
-                       <label index="display_shy">Display shy extensions:</label>
+                       <label index="display_shy">Display shy extensions</label>
+                       <label index="display_obsolete">Display obsolete extensions</label>
+                       <label index="display_installedOnly">Display installed extensions only</label>
                        <label index="only_my_ext">Only my extensions:</label>
                        <label index="show_obsolete">Show obsolete:</label>
+                       <label index="extensions">Extensions:</label>
+                       <label index="localExtensionList">Local Extension List</label>
                        <label index="go_back">Go back</label>
                        <label index="look_up">Look up:</label>
                        <label index="loaded_exts">Loaded Extensions</label>
                        <label index="repository_password_info">This is &lt;em&gt;not&lt;/em&gt; your password to the TYPO3 backend! This user information is what is needed to log in at typo3.org with your account there!</label>
                        <label index="repository_notfound">No repositories found.</label>
                        <label index="repository_update">Update Repository</label>
+                       <label index="repository_creating">Creating Repository ...</label>
+                       <label index="repository_saving">Saving Repository ...</label>
                        <label index="repository_update_not_needed">No update needed!</label>
                        <label index="repository_updated">Repository was updated.</label>
                        <label index="repository_extensions_count">There are {0} extensions now in repository.</label>
+                       <label index="repository_extensions_count">There are {0} extensions now in repository.</label>
                        <label index="mirror_selection">Mirror selection</label>
                        <label index="mirror_list_url">Enter mirror list URL:</label>
                        <label index="mirror_select">Select a mirror from below. This list is built from the online mirror list retrieved from the URL above.</label>
                        <label index="mirror_name">Name</label>
                        <label index="mirror">Mirror</label>
                        <label index="mirror_url">URL</label>
+                       <label index="mirror_url_long">Mirror URL</label>
                        <label index="mirror_country">Country</label>
                        <label index="mirror_sponsored_by">Sponsored by</label>
                        <label index="mirror_logo_link">Logo / Link</label>
                        <label index="enter_repository_url">Enter repository URL:</label>
                        <label index="repository_url_hint">If you set a repository URL, this overrides the use of a mirror. Use this to select a specific (private) repository.</label>
                        <label index="repository_settings">Repository settings</label>
+                       <label index="repository_edit">Edit repository "[0]"</label>
+                       <label index="repository_create">Create new repository</label>
+                       <label index="repository_delete">Delete repository</label>
+                       <label index="repository_deleting">Deleting repository</label>
+                       <label index="repository_deleted">Repository "{0}" was deleted.</label>
+                       <label index="repository_created">Repository "{0}" was created.</label>
+                       <label index="repository_saved">Repository "{0}" was saved.</label>
+                       <label index="repository">Repository</label>
                        <label index="translation_settings">Translation Settings</label>
                        <label index="languages_to_fetch">Languages to fetch:</label>
                        <label index="translation_info">For the selected languages the EM tries to download and install translation files if available, whenever an extension is installed. (This replaces the &lt;code&gt;csh_*&lt;/code&gt; extensions that were used to install core translations before TYPO3 version 4!)</label>
                        <label index="extInfoArray_additional_fields">Additional fields:</label>
                        <label index="extInfoArray_double_installation_infotext">A %s extension with this key is also available on the server, but cannot be loaded, because the "%s" version takes precedence.</label>
                        <label index="repositories">Repositories</label>
+                       <label index="repository_select">Select repository</label>
                        <label index="repository_details">Repository Details</label>
                        <label index="repositoryUploadForm_username">Repository Username</label>
                        <label index="repositoryUploadForm_password">Repository Password</label>
                        <label index="cmd_action">Action</label>
                        <label index="cmd_update">Update</label>
                        <label index="cmd_install">Install</label>
+                       <label index="cmd_cancel">Cancel</label>
+                       <label index="cmd_upload">Upload</label>
+                       <label index="cmd_download">Download</label>
+                       <label index="cmd_openInNewWindow">Open in new window</label>
+                       <label index="cmd_reloadFile">Reload the file</label>
                        <label index="cmd_transferkey">Transfer extension key</label>
                        <label index="cmd_transferkey_to_user">Transfer extension key to user</label>
                        <label index="cmd_transferkey_do">Do the transfer</label>
                        <label index="cmd_terupload">TER upload</label>
                        <label index="cmd_readdoc">Read documentation</label>
                        <label index="cmd_downloadext">Download extension</label>
+                       <label index="cmd_undo">Undo</label>
+                       <label index="cmd_redo">Redo</label>
+                       <label index="cmd_indent">Indent</label>
+                       <label index="cmd_jslint">JS Lint</label>
                        <label index="msg_terupload">Extension was uploaded to TER.</label>
                        <label index="msg_error">Error</label>
                        <label index="msg_invalid">Invalid</label>
+                       <label index="msg_status">Status</label>
                        <label index="msg_longwait">This may take some time, please wait...</label>
                        <label index="msg_finished">Finished!</label>
                        <label index="msg_checking">Checking</label>
                        <label index="msg_updating">Updating</label>
+                       <label index="msg_interrupted">Interrupted!</label>
+                       <label index="msg_info">Info</label>
+                       <label index="msg_debug">Debug</label>
+                       <label index="msg_update">Update</label>
+                       <label index="msg_configuration">Configuration</label>
+                       <label index="msg_congratsNoErrors">Congratulation! No errors found.</label>
+                       <label index="msg_files">Files</label>
+                       <label index="msg_line">Line</label>
+                       <label index="msg_character">Character</label>
+                       <label index="msg_terupload">Upload to TER</label>
+                       <label index="msg_developerinformation">Developer Information</label>
+                       <label index="msg_fileSaved">File "{0}" was saved.</label>
+                       <label index="configurationSaved">Configuration was saved.</label>
                        <label index="action_loading_extlist">Loading Extensionlist ...</label>
+                       <label index="action_loadingRepositoryExtlist">Loading Repository Extensionlist ...</label>
+                       <label index="action_loading">Loading  ...</label>
+                       <label index="action_searching">Searching ...</label>
                        <label index="registerkeys_rules_heading">Extension key format rules</label>
                        <label index="registerkeys_rules_allowedcharacters">Allowed characters are: a-z (lowercase), 0-9 and '_' (underscore)</label>
                        <label index="registerkeys_rules_prefixes">The key must not being with one of the following prefixes: tx,u,user_,pages,tt_,sys_,ts_language_,csh_</label>
                        <label index="transferkeys_fail">Transfer of extension key {0} to user {1} failed.</label>
                        <label index="deletekey_success">Delete of extension key {0} succeded.</label>
                        <label index="deletekey_fail">Delete of extension key {0} failed.</label>
+                       <label index="reports_StatusMainRepository">Integrity of TYPO3 main repository record</label>
+                       <label index="reports_StatusMainRepositoryUpdate">Last update of TYPO3 main repository</label>
+                       <label index="reports_insecureInstalledExtensions">The following extensions are insecure and usage might damage your system. Please update these extensions as soon as possible or remove them from your system:</label>
+                       <label index="reports_insecureExistingExtensions">The following extensions were found on your system, but are currently not installed. Please delete the extension using the extension manager:</label>
+                       <label index="reports_StatusInstalledExtensions">Security status of installed extensions</label>
+                       <label index="reports_StatusExistingExtensions">Security status of existing extensions</label>
+                       <label index="reports_insecureExtensionsFound">%s insecure extension(s) found</label>
+                       <label index="reports_sysTerNotFound">The table "sys_ter" was not found. Please go to install tool and make a database compare!</label>
+                       <label index="reports_MainRepositoryNotFound">The Main Repository entry in table "sys_ter" was not found. Please go to extension manager / em and import static data!</label>
+                       <label index="reports_MainRepositoryNoExtensions">The Main Repository has no extensions. Please update the repository in extension manager or scheduler.</label>
+                       <label index="reports_MainRepositoryOldList">The Main Repository extension list is older than 7 days. Please make an update in extension manager or scheduler.</label>
+                       <label index="reports_NoExtensionsFound">No extensions found!</label>
+                       <label index="reports_ExtensionsNotUpToDate">Extension list is not up to date!</label>
+                       <label index="stateProvider">State provider</label>
+                       <label index="stateProviderDescription">States are saved interface changes like grid sorting, grid filtering, column resize, column reorder etc. All these states are saved in the user session and are restored on next load. To get the initial state of the interface, you can clear save states by clicking on button below.</label>
+                       <label index="stateProviderClear">Clear user states and reset interface to defaults</label>
+                       <label index="stateProviderCleared">User states are cleared, interface is reset to default.</label>
+                       <label index="wsdlUrl">WSDL URL</label>
+                       <label index="msg_items">Items</label>
+                       <label index="msg_item">Item</label>
+                       <label index="cmd_ClearAllFilters">Clear all Filters</label>
+                       <label index="cmd_ClearGrouping">Clear Grouping</label>
+                       <label index="cmd_RetrieveUpdate">Retrieve / Update</label>
+                       <label index="help_remoteFilter">Enter something for search and press Enter. To list all, use "*"</label>
+                       <label index="help_loadFileInEditor">Click on a file to load in editor</label>
 
                </languageKey>
        </data>
diff --git a/typo3/sysext/em/res/css/editor.css b/typo3/sysext/em/res/css/editor.css
new file mode 100644 (file)
index 0000000..a1e200b
--- /dev/null
@@ -0,0 +1,12 @@
+.editbox {
+       line-height: 14px;
+       border-width: 0;
+       margin: 1px 0 0 0.3em;
+       padding: 0;
+       font-family: monospace;
+       font-size: 12px;
+       color: black;
+       background-color: #fff;
+       white-space: nowrap;
+       overflow: auto;
+}
index 6ae76f0..039aa31 100644 (file)
@@ -117,4 +117,18 @@ img.installExtension, img.removeExtension {
        display: inline-block;
        width: 100px;
        font-weight: bold;
+}
+
+#hbox-settings .x-box-inner {
+       overflow-x: hidden;
+       overflow-y: auto;
+}
+
+.CodeMirror-line-numbers {
+       width: 48px;
+       padding: 0 1px;
+       background-color: #ddd;
+       color: #888;
+       font-size: 12px;
+       line-height: 14px;
 }
\ No newline at end of file
diff --git a/typo3/sysext/em/res/icons/arrow_redo.png b/typo3/sysext/em/res/icons/arrow_redo.png
new file mode 100644 (file)
index 0000000..fdc394c
Binary files /dev/null and b/typo3/sysext/em/res/icons/arrow_redo.png differ
diff --git a/typo3/sysext/em/res/icons/arrow_undo.png b/typo3/sysext/em/res/icons/arrow_undo.png
new file mode 100644 (file)
index 0000000..6972c5e
Binary files /dev/null and b/typo3/sysext/em/res/icons/arrow_undo.png differ
diff --git a/typo3/sysext/em/res/icons/jslint.gif b/typo3/sysext/em/res/icons/jslint.gif
new file mode 100644 (file)
index 0000000..627c350
Binary files /dev/null and b/typo3/sysext/em/res/icons/jslint.gif differ
diff --git a/typo3/sysext/em/res/icons/text_indent.png b/typo3/sysext/em/res/icons/text_indent.png
new file mode 100644 (file)
index 0000000..9364532
Binary files /dev/null and b/typo3/sysext/em/res/icons/text_indent.png differ
index 2ad04d2..b79a346 100644 (file)
 Ext.ns('TYPO3.EM', 'TYPO3.EM.ExtDirect');
 
 Ext.onReady(function() {
-               //save states in user cookie, TODO: use ucStateProvider instead
-       Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
+               //save states in BE_USER->uc
+       Ext.state.Manager.setProvider(new TYPO3.state.ExtDirectProvider({
+               key: 'moduleData.tools_em.States'
+       }));
+
+       if (Ext.isObject(TYPO3.settings.EM.States)) {
+               Ext.state.Manager.getProvider().initState(TYPO3.settings.EM.States);
+       }
        Ext.QuickTips.init();
 
+
                // fire app
        var EM = new TYPO3.EM.App.init();
        TYPO3.Flashmessage.display(TYPO3.Severity.information, TYPO3.lang.header, TYPO3.lang.emLoaded, 2);
 
-
+       /*Ext.state.Manager.getProvider().logState();
+       var val = Ext.state.Manager.getProvider().get('mainTab', '');
+       console.log(val);*/
 });
 
 TYPO3.EM.App = {
 
        init : function() {
-               if (!TYPO3.settings.hasCredentials &&  TYPO3.settings.EM.mainTab == '4') {
-                       TYPO3.settings.EM.mainTab = 0;
-               }
                var appPanel = new Ext.TabPanel( {
                        renderTo : 'em-app',
                        id: 'em-main',
-                       activeTab : TYPO3.settings.EM.mainTab ? TYPO3.settings.EM.mainTab : 0,
                        layoutOnTabChange: true,
                        plain: true,
-                       height: 450,
+                       activeTab: 0,
+                       stateful: true,
+                       stateId: 'mainTab',
+                       stateEvents:['tabchange'],
+                       autoScroll: true,
+                       defaults: {
+                               layout: 'fit'
+                       },
+                       getState: function() {
+                               return {
+                                       activeTab: this.items.indexOf(this.getActiveTab())
+                               };
+                       },
                        items : [
                                TYPO3.EM.LocalListTab,
                                TYPO3.EM.RepositoryListTab,
@@ -65,7 +82,6 @@ TYPO3.EM.App = {
                                TYPO3.EM.UserTab
                        ],
                        plugins: [new Ext.ux.plugins.FitToParent()]
-
                });
        }
 };
index c55ef97..893ac4e 100644 (file)
@@ -35,11 +35,18 @@ Ext.ns('TYPO3.EM', 'TYPO3.EM.GridColumns', 'TYPO3.EM.ExtDirect', 'TYPO3.EMSOAP.E
 ///////////////////////////////////////////////////////
 // Grid
 ///////////////////////////////////////////////////////
+
 TYPO3.EM.Filters = new Ext.ux.grid.GridFilters({
        encode: true,
        local: true,
        filters: [{
                type: 'string',
+               dataIndex: 'title'
+               }, {
+               type: 'string',
+               dataIndex: 'extkey'
+               }, {
+               type: 'string',
                dataIndex: 'author'
                }, {
                type: 'string',
@@ -52,6 +59,50 @@ TYPO3.EM.Filters = new Ext.ux.grid.GridFilters({
                }, {
                type: 'boolean',
                dataIndex: 'installed'
+       }],
+       getRecordFilter: function(){
+               var f = [];
+               this.filters.each(function(filter){
+                       if(filter.active) f.push(filter);
+               });
+                       // add custom filter
+               f.push(this.grid.store);
+               var len = f.length, me = this;
+               return function(record){
+                       for(var i=0; i<len; i++)
+                               if(!f[i].validateRecord(record))
+                                       return false;
+
+                       return true;
+               };
+       }
+});
+
+TYPO3.EM.RemoteFilters = new Ext.ux.grid.GridFilters({
+       encode: true,
+       local: false,
+       filters: [{
+               type: 'string',
+               dataIndex: 'title'
+               }, {
+               type: 'string',
+               dataIndex: 'extkey'
+               }, {
+               type: 'string',
+               dataIndex: 'author'
+               }, {
+               type: 'list',
+               dataIndex: 'statevalue',
+               options: [[0, 'alpha'], [1, 'beta'], [2, 'stable'], [3, 'experimental'], [4, 'test'], [5, 'obsolete'], [6, 'excludeFromUpdates'], [999, 'n/a']],
+               phpMode: true
+               }, {
+               type: 'list',
+               dataIndex: 'categoryvalue',
+               options: [[0, 'be'], [1, 'module'], [2, 'fe'], [3, 'plugin'], [4, 'misc'], [5, 'services'], [6, 'templates'], [8, 'doc'], [9, 'example']],
+               phpMode: true
+               }, {
+               type: 'boolean',
+               dataIndex: 'installed'
        }]
 });
 
@@ -59,9 +110,9 @@ TYPO3.EM.GridColumns.InstallExtension = {
        header: '',
        width: 30,
        sortable: false,
+       hideable: false,
        fixed: true,
        groupable: false,
-       hideable: false,
        menuDisabled: true,
        xtype: 'actioncolumn',
        items: [
@@ -83,7 +134,12 @@ TYPO3.EM.GridColumns.InstallExtension = {
                                                + '&CMD[' + (record.installed ? 'remove' : 'load') + ']=1&CMD[clrCmd]=1&SET[singleDetails]=info';
 
                                var w = new TYPO3.EM.InstallWindow({
-                                       title: action + ': ' + record.title + ' (' + record.extkey + ') version ' + record.version
+                                       title: action + ': ' + record.title + ' (' + record.extkey + ') version ' + record.version,
+                                       listeners: {
+                                               close: function() {
+                                                       grid.store.reload();
+                                               }
+                                       }
                                }).show(true, function(){
                                        Ext.getCmp('emInstallIframeWindow').setUrl(link);
                                });
@@ -109,6 +165,48 @@ TYPO3.EM.GridColumns.ImportExtension = {
                                        return 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-extension-install';
                                } else {
                                        this.items[0].tooltip = TYPO3.lang.ext_details_remove_ext;
+                                       return 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-extension-uninstall';
+                               }
+                       },
+                       handler: function(grid, rowIndex, colIndex) {
+                               var record = grid.store.getAt(rowIndex).data;
+                               var action = record.installed ? TYPO3.lang.ext_details_remove_ext : TYPO3.lang.menu_install_extensions;
+                               var link = TYPO3.settings.EM.scriptLink
+                                               + '&nodoc=1&view=import&ter_connect=1&CMD[importExt]=' + record.extkey
+                                               + '&CMD[extVersion]=' + record.version + ''
+                                               + '&CMD[loc]=L';
+
+                               var w = new TYPO3.EM.ImportWindow({
+                                       title: action + ': ' + record.title + ' (' + record.extkey + ') version ' + record.version,
+                                       listeners: {
+                                               close: function() {
+                                                       grid.store.reload();
+                                               }
+                                       }
+                               }).show(true, function(){
+                                       Ext.getCmp('emInstallIframeWindow').setUrl(link);
+                               });
+                       }
+               }
+       ]
+}
+
+TYPO3.EM.GridColumns.ImportExtension = {
+       header: '',
+       width: 30,
+       sortable: false,
+       fixed: true,
+       groupable: false,
+       menuDisabled: true,
+       xtype: 'actioncolumn',
+       items: [
+               {
+                       getClass: function(value, meta, record) {
+                               if (record.get('installed') == 0) {
+                                       this.items[0].tooltip = TYPO3.lang.menu_install_extensions;
+                                       return 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-extension-install';
+                               } else {
+                                       this.items[0].tooltip = TYPO3.lang.ext_details_remove_ext;
                                        return 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-extension-import';
                                }
                        },
@@ -135,6 +233,8 @@ TYPO3.EM.GridColumns.ExtensionTitle = {
        width: 150,
        sortable: true,
        dataIndex: 'title',
+       filterable: true,
+       hideable: true,
        renderer:function(value, metaData, record, rowIndex, colIndex, store) {
                if (value == '') {
                        value = '[no title]';
@@ -150,6 +250,8 @@ TYPO3.EM.GridColumns.ExtensionKey = {
        header: TYPO3.lang.tab_mod_key,
        width: 80,
        sortable: true,
+       filterable: true,
+       hideable: true,
        dataIndex: 'extkey'
 }
 
@@ -159,6 +261,7 @@ TYPO3.EM.GridColumns.ExtensionCategory = {
        sortable: true,
        dataIndex: 'category',
        filterable: true,
+       hideable: true,
        hidden: true
 }
 
@@ -166,9 +269,10 @@ TYPO3.EM.GridColumns.ExtensionCategoryRemote = {
        header: TYPO3.lang.list_order_category,
        width: 70,
        sortable: true,
-       dataIndex: 'category',
+       hideable: true,
+       dataIndex: 'categoryvalue',
        renderer: function(value, metaData, record, rowIndex, colIndex, store) {
-               var cats = ['be','module','fe','plugin','misc','services','templates','example','doc'];
+               var cats = ['be', 'module', 'fe', 'plugin', 'misc', 'services', 'templates', '', 'doc', 'example'];
                return cats[value];
        }
 }
@@ -178,6 +282,7 @@ TYPO3.EM.GridColumns.ExtensionAuthor = {
        width: 120,
        sortable: true,
        hidden: true,
+       hideable: true,
        dataIndex:'author',
        renderer: function(value, metaData, record, rowIndex, colIndex, store) {
                metaData.attr='ext:qtip="'+value+'"';
@@ -195,6 +300,7 @@ TYPO3.EM.GridColumns.ExtensionType = {
        width:50,
        sortable:true,
        dataIndex:'type',
+       hideable: true,
        hidden: true
 }
 
@@ -205,6 +311,7 @@ TYPO3.EM.GridColumns.ExtensionState = {
        sortable: true,
        resizable: false,
        fixed: true,
+       hideable: true,
        dataIndex:'state',
        renderer: function(value, metaData, record, rowIndex, colIndex, store){
                metaData.css += 'state-' + value + ' ';
@@ -213,10 +320,27 @@ TYPO3.EM.GridColumns.ExtensionState = {
        filterable: true
 }
 
+TYPO3.EM.GridColumns.ExtensionStateValue = {
+       header: TYPO3.lang.list_order_state,
+       align: 'center',
+       width: 100,
+       sortable: true,
+       resizable: false,
+       fixed: true,
+       hideable: true,
+       dataIndex:'statevalue',
+       renderer: function(value, metaData, record, rowIndex, colIndex, store){
+               metaData.css += 'state-' + record.data.state + ' ';
+               return record.data.state;
+       },
+       filterable: true
+}
+
 TYPO3.EM.GridColumns.ExtensionDownloads = {
        header: TYPO3.lang.list_order_downloads,
        width: 40,
        sortable: true,
+       hideable: true,
        dataIndex:'alldownloadcounter'
 }
 
@@ -224,6 +348,7 @@ TYPO3.EM.GridColumns.ExtensionVersion = {
        header: TYPO3.lang.extInfoArray_version,
        width:40,
        sortable: true,
+       hideable: true,
        dataIndex:'version'
 }
 
@@ -247,23 +372,11 @@ TYPO3.EM.LocationStore = new Ext.data.JsonStore({
 TYPO3.EM.LocalListTab = {
        title : TYPO3.lang.localExtensions,
        xtype: 'TYPO3.EM.LocalList',
-       //iconCls: 'x-btn-drive',
-       id: 'em-local-extensions',
-       listeners: {
-               activate: function(panel) {
-                       TYPO3.EM.ExtDirect.saveSetting('mainTab', 0);
-                       var store = Ext.StoreMgr.get('localstore');
-                       if (!store.getCount()) {
-                               store.load();
-                       }
-
-               },
-               scope: this
-       }
+       id: 'em-local-extensions'
 };
+
 TYPO3.EM.RepositoryListTab = {
        title : TYPO3.lang.remoteRepository,
-       //iconCls: 'x-btn-server',
        layout: 'fit',
        items: [/*{
                xtype: 'repository',
@@ -277,7 +390,6 @@ TYPO3.EM.RepositoryListTab = {
        id: 'em-remote-extensions',
        listeners: {
                activate: function(panel) {
-                       TYPO3.EM.ExtDirect.saveSetting('mainTab', 1);
                        var store = Ext.StoreMgr.get('repositoryliststore');
                        if (!store.getCount()) {
                                store.load();
@@ -286,14 +398,13 @@ TYPO3.EM.RepositoryListTab = {
                scope: this
        }
 };
+
 TYPO3.EM.LanguageTab = {
        title: TYPO3.lang.menu_translation_handling,
        xtype: 'extlanguages',
        id: 'em-translations',
-       //iconCls: 'x-btn-flag',
        listeners: {
                activate: function(panel) {
-                       TYPO3.EM.ExtDirect.saveSetting('mainTab', 2);
                        var store = Ext.StoreMgr.get('em-language-store');
                        if (!store.getCount()) {
                                store.load();
@@ -305,23 +416,16 @@ TYPO3.EM.LanguageTab = {
                scope: this
        }
 };
+
 TYPO3.EM.SettingsTab = {
        title: TYPO3.lang.menu_settings,
-       xtype: 'extsettings',
-       //iconCls: 'x-btn-settings',
-       listeners: {
-               activate: function(panel) {
-                       TYPO3.EM.ExtDirect.saveSetting('mainTab', 3);
-               },
-               scope: this
-       }
+       xtype: 'extsettings'
 };
 
 TYPO3.EM.UserTab = {
        title: TYPO3.lang.myExtensions,
        xtype: 'TYPO3.EM.UserTools',
-       //disabled: !TYPO3.settings.EM.hasCredentials,
-       //iconCls: 'x-btn-tools',
+       disabled: !TYPO3.settings.EM.hasCredentials,
        listeners: {
                activate: function(panel) {
                        var store = Ext.StoreMgr.get('em-userext');
@@ -330,7 +434,6 @@ TYPO3.EM.UserTab = {
                                store.removeAll();
                                Ext.getCmp('extvalidformbutton').disable();
                        } else {
-                               TYPO3.EM.ExtDirect.saveSetting('mainTab', 4);
                                store.load();
                        }
                },
@@ -418,6 +521,31 @@ TYPO3.EM.InstallWindow = Ext.extend(Ext.Window, {
                TYPO3.EM.InstallWindow.superclass.constructor.call(this, config);
        }
 });
+
+TYPO3.EM.ImportWindow = Ext.extend(Ext.Window, {
+       width: 800,
+       height: 600,
+       closable: true,
+       resizable: true,
+       plain: true,
+       border: false,
+       modal: true,
+       draggable: true,
+       layout: 'anchor',
+       constructor: function(config) {
+               config = config || {};
+               Ext.apply(this, config, {
+                       items: [{
+                               xtype: 'iframePanel',
+                               anchor: '100% 100%',
+                               border: false,
+                               id: 'emImportIframeWindow'
+                       }]
+               });
+               TYPO3.EM.InstallWindow.superclass.constructor.call(this, config);
+       }
+});
+
 TYPO3.EM.TerUpload = Ext.extend(Ext.form.FormPanel, {
        border:false,
        recordData: null,
@@ -525,3 +653,88 @@ TYPO3.EM.TerUpload = Ext.extend(Ext.form.FormPanel, {
 });
 
 Ext.reg('terupload', TYPO3.EM.TerUpload);
+
+TYPO3.EM.ExtensionUploadWindowInstance = null;
+TYPO3.EM.ExtensionUploadWindow = Ext.extend(Ext.Window, {
+       title: 'Upload extension file directly (.t3x)',
+       modal: true,
+       closable: true,
+       closeAction: 'hide',
+       plain: true,
+       width: 400,
+       height: 160,
+       layout: 'fit',
+
+       constructor: function(config) {
+               config = config || {};
+               Ext.apply(this, config, {
+                       items: [
+                               {
+                                       xtype: 'form',
+                                       itemId: 'uploadForm',
+                                       fileUpload: true,
+                                       api: {
+                                               submit: TYPO3.EM.ExtDirect.uploadExtension
+                                       },
+                                       items: [
+                                               {
+                                                       xtype: 'fileuploadfield',
+                                                       id: 'form-file',
+                                                       emptyText: 'Select Extension (*.t3x)',
+                                                       fieldLabel: 'Extension',
+                                                       name: 'extupload-path',
+                                                       buttonText: '...',
+                                                       width: 250,
+                                                       validator: function(value) {
+                                                               if (value) {
+                                                                       return value.split('.').pop().toLowerCase() === 't3x';
+                                                               }
+                                                               return false;
+                                                       }
+                                               },
+                                               TYPO3.EM.UploadLocationCombo,
+                                               {
+                                                       xtype: 'checkbox',
+                                                       fieldLabel: 'Overwrite any existing extension!',
+                                                       name: 'uploadOverwrite',
+                                                       labelWidth: 250
+                                               },
+                                               {
+                                                       xtype: 'button',
+                                                       text: 'Upload extension from your computer',
+                                                       id: 'uploadSubmitButton',
+                                                       width: 420,
+                                                       scope: this,
+                                                       handler: function() {
+                                                               var form = this.getComponent('uploadForm').getForm();
+                                                               if (form.isValid()) {
+                                                                       form.submit({
+                                                                               waitMsg : 'Sending data...',
+                                                                               success: function(form, action) {
+                                                                                       form.reset();
+                                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.information, 'Extension Upload', 'Extension "' + action.result.extKey + '" was uploaded.', 5);
+                                                                                       TYPO3.EM.ExtensionUploadWindowInstance.hide();
+                                                                                       TYPO3.EM.Tools.displayLocalExtension(action.result.extKey, true);
+                                                                               },
+                                                                               failure: function(form, action) {console.log(action);
+                                                                                       if (action.failureType === Ext.form.Action.CONNECT_FAILURE) {
+                                                                                               TYPO3.Flashmessage.display(TYPO3.Severity.error, 'Error',
+                                                                                                               'Status:' + action.response.status + ': ' +
+                                                                                                                               action.response.statusText, 15);
+                                                                                       }
+                                                                                       if (action.failureType === Ext.form.Action.SERVER_INVALID) {
+                                                                                               // server responded with success = false
+                                                                                               TYPO3.Flashmessage.display(TYPO3.Severity.error, 'Invalid', action.result.error, 5);
+                                                                                       }
+                                                                               }
+                                                                       });
+                                                               }
+                                                       }
+                                               }
+                                       ]
+                               }
+                       ]
+               });
+               TYPO3.EM.ExtensionUploadWindow.superclass.constructor.call(this, config);
+       }
+});
\ No newline at end of file
index d8720c3..f94aae8 100644 (file)
@@ -19,26 +19,16 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
 
        initComponent:function() {
 
-               var editArea = new Ext.form.TextArea({
-                       itemId: 'editarea',
-                       ctCls: 'editareapanel',
-                       enableKeyEvents: true,
-                       listeners: {
-                               change: function() {
-                                       //Ext.getComponent('editarea-save').enable();
-                               },
-                               keypress: function(textfield, event) {
-                                       event.stopPropagation();
-                               },
-                               specialkey: function(textfield, event) {
-                                       event.stopPropagation();
-                               },
-                               scope: this
-                       }
-
+               var hlEditor = new TYPO3.EM.CodeMirror({
+                       parser: 'mixed',
+                       itemId: 'hlEditor',
+                       stylesheet: TYPO3.settings.EM.editorCss,
+                       editFile: null
                });
 
 
+
+
                var fileTree = new Ext.tree.TreePanel ({
                        //directFn: TYPO3.EM.ExtDirect.getExtFileTree,
                        itemId: 'extfiletree',
@@ -49,9 +39,10 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
                        //useArrows: true,
 
                        root: {
-                               text: 'Extension Files',
+                               text: TYPO3.lang.ext_details_ext_files,
                                itemId: 'fileroot',
-                               expanded: true
+                               expanded: true,
+                               icon: 'sysext/t3skin/icons/module_tools_em.png'
                        },
                        loader: {
                                directFn: TYPO3.EM.ExtDirect.getExtFileTree,
@@ -63,16 +54,20 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
                                paramsAsHash: true
                        },
                        listeners: {
-                               click: function(node) {  console.log(node.attributes.fileType);
-                                       var p = this.getComponent('editarea');
+                               click: function(node) {
                                        if (node.attributes.fileType === 'text') {
                                                this.layout.center.panel.reloadButton.show().disable();
                                                TYPO3.EM.ExtDirect.readExtFile(node.attributes.id , function(response) {
                                                        // load in textarea
-                                                       editArea.setValue(response);
+                                                       hlEditor.openText(response, node.attributes.ext);
+                                                       hlEditor.editFile = node.attributes.id;
                                                        this.layout.center.panel.reloadButton.enable();
-                                                       this.layout.center.panel.fileLabel.setText('File: ' + node.attributes.text);
+                                                       this.layout.center.panel.fileLabel.setText('File: ' + hlEditor.editFile);
                                                        this.layout.center.panel.saveButton.disable();
+                                                       this.layout.center.panel.undoButton.enable();
+                                                       this.layout.center.panel.redoButton.enable();
+                                                       this.layout.center.panel.indentButton.enable();
+
                                                }, this);
                                        }
                                        if (node.attributes.fileType === 'image') {
@@ -115,12 +110,14 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
                                                fileTree.getRootNode().reload();
                                        },
                                        scope: this
-                               }, '-', {
+                               }, {
                                        iconCls: 'x-btn-upload',
-                                       tooltip: 'upload'
+                                       tooltip: TYPO3.lang.cmd_upload,
+                                       hidden: true
                                }, {
                                        iconCls: 'x-btn-download',
-                                       tooltip: 'download'
+                                       tooltip: TYPO3.lang.cmd_download,
+                                       hidden: true
                                }]
                        }, {
 
@@ -130,10 +127,10 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
                                 margins: '0 0 0 0',
                                 cmargins: '0 0 0 0',
                                 border: false,
-                                items: [editArea],
+                                items: [hlEditor],
                                 tbar: [{
                                        iconCls: 'x-btn-filebrowser',
-                                       tooltip: 'open in new window',
+                                       tooltip: TYPO3.lang.cmd_openInNewWindow,
                                        ref: '../openWindowButton',
                                        scope: this,
                                        hidden: this.isWindow,
@@ -159,38 +156,113 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
                                         hidden: this.isWindow
                                 }, {
                                        iconCls: 'x-tbar-loading',
-                                       tooltip: 'reload the file',
+                                       tooltip: TYPO3.lang.cmd_reloadFile,
                                        ref: '../reloadButton',
                                        scope: this,
                                        hidden: true,
                                        handler: function() {
-                                               this.layout.center.panel.reloadButton.disable();
-                                               TYPO3.EM.ExtDirect.readExtFile(fileTree.getSelectionModel().getSelectedNode().attributes.id , function(response) {
-                                                       editArea.setValue(response);
-                                                       this.layout.center.panel.reloadButton.enable();
-                                               }, this);
+                                               if (hlEditor.editFile) {
+                                                       this.layout.center.panel.reloadButton.disable();
+                                                       TYPO3.EM.ExtDirect.readExtFile(hlEditor.editFile , function(response) {
+                                                               hlEditor.setValue(response);
+                                                               this.layout.center.panel.reloadButton.enable();
+                                                       }, this);
+                                               }
                                        }
                                }, {
                                        iconCls: 'x-btn-save',
-                                       tooltip: 'save',
+                                       tooltip: TYPO3.lang.cmd_save,
                                        ref: '../saveButton',
                                        disabled: true,
                                        scope: this,
                                        handler: function() {
                                                this.layout.center.panel.reloadButton.disable();
+                                               var file = this.layout.west.items[0].getSelectionModel().getSelectedNode().attributes.id;
                                                TYPO3.EM.ExtDirect.saveExtFile(
-                                                       Ext.getComponent('extfiletree').getSelectionModel().getSelectedNode().attributes.id,
-                                                       Ext.getComponent('editarea').getValue(),
+                                                       file,
+                                                       hlEditor.getValue(),
                                                        function(response) {
-                                                               this.layout.center.panel.saveButton.disable();
-                                                               this.layout.center.panel.reloadButton.enable();
+                                                               if (response.success) {
+                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.ok, TYPO3.lang.cmd_save, String.format(TYPO3.lang.msg_fileSaved, response.file), 5);
+                                                                       this.layout.center.panel.saveButton.disable();
+                                                                       this.layout.center.panel.reloadButton.enable();
+                                                               } else {
+                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.error, TYPO3.lang.cmd_save, response.error, 5);
+                                                               }
                                                }, this);
                                        }
-                               }, '->', {
+                               },
+                               {
+                                       iconCls: 'x-btn-undo',
+                                       tooltip: TYPO3.lang.cmd_undo,
+                                       ref: '../undoButton',
+                                       disabled: true,
+                                       scope: this,
+                                       handler: function() {
+                                               hlEditor.codeMirrorEditor.undo();
+                                       }
+                               },
+                               {
+                                       iconCls: 'x-btn-redo',
+                                       tooltip: TYPO3.lang.cmd_redo,
+                                       ref: '../redoButton',
+                                       disabled: true,
+                                       scope: this,
+                                       handler: function() {
+                                               hlEditor.codeMirrorEditor.redo();
+                                       }
+                               },
+                               {
+                                       iconCls: 'x-btn-indent',
+                                       tooltip: TYPO3.lang.cmd_indent,
+                                       ref: '../indentButton',
+                                       disabled: true,
+                                       scope: this,
+                                       handler: function() {
+                                               hlEditor.codeMirrorEditor.reindent();
+                                       }
+                               },
+                               {
+                                       iconCls: 'x-btn-jslint',
+                                       tooltip: TYPO3.lang.cmd_jslint,
+                                       ref: '../jslintButton',
+                                       disabled: true,
+                                       scope: this,
+                                       handler: function() {
+                                               try {
+                                                       var bValidates = JSLINT(this.findByType('textarea')[0].getValue());
+
+                                                       var oStore = hlEditor.debugWindow.findByType('grid')[0].getStore();
+                                                       if (!bValidates) {
+                                                               var aErrorData = [];
+
+                                                               for (var err in JSLINT.errors) {
+                                                                       if (JSLINT.errors.hasOwnProperty(err) && (JSLINT.errors[err] !== null)) {
+                                                                               aErrorData.push([JSLINT.errors[err].line, JSLINT.errors[err].character, JSLINT.errors[err].reason]);
+                                                                       }
+                                                               }
+
+                                                               oStore.loadData(aErrorData, false);
+                                                               hlEditor.debugWindow.show();
+
+                                                       }
+                                                       else {
+
+                                                               oStore.loadData([
+                                                                       [1, 1, TYPO3.lang.msg_congratsNoErrors]
+                                                               ], false);
+                                                               hlEditor.debugWindow.show();
+                                                       }
+                                               } catch(e) {
+                                               }
+                                       }
+                               },
+                               '->',
+                               {
                                        xtype: 'tbtext',
                                        ref: '../fileLabel',
                                        itemId: 'editarea-filename',
-                                       text: 'click on a file to load in editor ...'
+                                       text: TYPO3.lang.help_loadFileInEditor
                                }]
                        }]
                });
@@ -199,10 +271,6 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
 
        },
 
-       fileClick: function(response) {
-               Ext.getComponent('editarea').setValue(response);
-       },
-
        onRender: function() {
                TYPO3.EM.ExtFilelist.superclass.onRender.apply(this, arguments);
        }
@@ -213,3 +281,232 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
 
 // register xtype
 Ext.reg('extfilelist', TYPO3.EM.ExtFilelist);
+
+
+TYPO3.EM.CodeMirrorConfig = {
+       cssPath: TYPO3.settings.EM.codemirrorCssPath,
+       jsPath: TYPO3.settings.EM.codemirrorJsPath,
+       parser: {
+               defo: { // js code
+                       parserfile: ["tokenizejavascript.js", "parsejavascript.js"],
+                       stylesheet: [TYPO3.settings.EM.codemirrorCssPath + "jscolors.css"]
+               },
+               css: {
+                       parserfile: ["parsecss.js"],
+                       stylesheet: [TYPO3.settings.EM.codemirrorCssPath + "csscolors.css"]
+               },
+               js: {
+                       parserfile: ["tokenizejavascript.js", "parsejavascript.js"],
+                       stylesheet: [TYPO3.settings.EM.codemirrorCssPath + "jscolors.css"]
+               },
+               php: {
+                       parserfile: ["tokenizephp.js", "parsephp.js"],
+                       stylesheet: [TYPO3.settings.EM.codemirrorCssPath + "phpcolors.css"]
+               },
+               html: {
+                       parserfile: ["parsexml.js", "parsecss.js", "tokenizejavascript.js", "parsejavascript.js", "tokenizephp.js", "parsephp.js", "parsephphtmlmixed.js"],
+                       stylesheet: [
+                               TYPO3.settings.EM.codemirrorCssPath + "xmlcolors.css",
+                               TYPO3.settings.EM.codemirrorCssPath + "jscolors.css",
+                               TYPO3.settings.EM.codemirrorCssPath + "csscolors.css",
+                               TYPO3.settings.EM.codemirrorCssPath + "phpcolors.css"]
+
+               },
+               mixed: {
+                       parserfile: ["parsexml.js", "parsecss.js", "tokenizejavascript.js", "parsejavascript.js", "tokenizephp.js", "parsephp.js", "parsephphtmlmixed.js"],
+                       stylesheet: [
+                               TYPO3.settings.EM.codemirrorCssPath + "xmlcolors.css",
+                               TYPO3.settings.EM.codemirrorCssPath + "jscolors.css",
+                               TYPO3.settings.EM.codemirrorCssPath + "csscolors.css",
+                               TYPO3.settings.EM.codemirrorCssPath + "phpcolors.css"
+                       ]
+               }
+       }
+};
+
+
+TYPO3.EM.CodeMirror = Ext.extend(Ext.Panel, {
+       layout: 'fit',
+       //bodyStyle: 'background:green;',
+       sourceCode: '',
+       stylesheet: null,
+       initComponent: function() {
+                       // add custom stylesheet to all parser
+               if (this.stylesheet) {
+                       Ext.iterate(TYPO3.EM.CodeMirrorConfig.parser, function(key, value) {
+                               value.stylesheet.push(this.stylesheet);
+                       }, this);
+               }
+
+               this.contentChanged = false;
+               var me = this;
+               this.debugWindow = new Ext.Window({
+                       title: TYPO3.lang.msg_debug,
+                       width: 500,
+                       layout: 'border',
+                       closeAction: 'hide',
+                       height: 160,
+                       items: [new Ext.grid.GridPanel({
+                               layout: 'fit',
+                               region: 'center',
+                               border: false,
+                               listeners: {
+                                       rowclick: function(grid) {
+                                               var oData = grid.getSelectionModel().getSelected().data;
+                                               me.codeMirrorEditor.jumpToLine(oData.line);
+                                       }
+                               },
+                               store: new Ext.data.ArrayStore({
+                                       fields: [
+                                               {name: 'line'},
+                                               {name: 'character'},
+                                               {name: 'reason'}
+                                       ]
+                               }),
+                               columns: [
+                                       {
+                                               id: 'line',
+                                               header: TYPO3.lang.msg_line,
+                                               width: 60,
+                                               sortable: true,
+                                               dataIndex: 'line'
+                                       },
+                                       {
+                                               id: 'character',
+                                               header: TYPO3.lang.msg_character,
+                                               width: 60,
+                                               sortable: true,
+                                               dataIndex: 'character'
+                                       },
+                                       {
+                                               header: TYPO3.lang.show_description,
+                                               width: 240,
+                                               sortable: true,
+                                               dataIndex: 'reason'
+                                       }
+                               ],
+                               stripeRows: true
+                       })]
+               });
+
+               Ext.apply(this, {
+                       items: [
+                               {
+                                       xtype: 'textarea',
+                                       readOnly: false,
+                                       hidden: true,
+                                       value: this.sourceCode
+                               }
+                       ]
+               });
+
+               TYPO3.EM.CodeMirror.superclass.initComponent.apply(this, arguments);
+       },
+
+       triggerOnSave: function() {
+               this.changeAction();
+               var sNewCode = this.codeMirrorEditor.getCode();
+               this.oldSourceCode = sNewCode;
+               this.onSave(arguments[0] || false);
+       },
+
+       onRender: function() {
+               this.oldSourceCode = this.sourceCode;
+               TYPO3.EM.CodeMirror.superclass.onRender.apply(this, arguments);
+                       // trigger editor on afterlayout
+               this.on('afterlayout', this.triggerCodeEditor, this, {
+                       single: true
+               });
+               this.on('resize', this.resizeCodeEditor, this);
+
+       },
+
+       /** @private */
+       resizeCodeEditor: function(component, width, height, origWidth, origHeight) {
+               var el = Ext.fly(this.codeMirrorEditor.frame);
+               el.setSize(width - 50, height);
+               el.next().setHeight(height);
+               this.doLayout();
+       },
+
+       /** @private */
+       triggerCodeEditor: function() {
+               var me = this;
+               var oCmp = this.findByType('textarea')[0];
+               this.editorConfig = Ext.applyIf(this.codeMirror || {}, {
+                       lineNumbers: true,
+                       textWrapping: false,
+                       content: oCmp.getValue(),
+                       indentUnit: 4,
+                       tabMode: 'shift',
+                       readOnly: oCmp.readOnly,
+                       path: TYPO3.EM.CodeMirrorConfig.jsPath,
+                       autoMatchParens: true,
+                       initCallback: function(editor) {
+                               editor.win.document.body.lastChild.scrollIntoView();
+                               try {
+                                       var iLineNmbr = ((Ext.state.Manager.get("edcmr_" + me.itemId + '_lnmbr') !== undefined) ? Ext.state.Manager.get("edcmr_" + me.itemId + '_lnmbr') : 1);
+                                       editor.jumpToLine(iLineNmbr);
+                               } catch(e) {
+                               }
+                       },
+                       onChange: function() {
+                               var sCode = me.codeMirrorEditor.getCode();
+                               oCmp.setValue(sCode);
+
+                               if (me.oldSourceCode == sCode) {
+                                       me.changeAction(false);
+                               } else {
+                                       me.changeAction(true);
+                               }
+
+                       }
+               });
+
+               var sParserType = me.parser || 'defo';
+               this.editorConfig = Ext.applyIf(this.editorConfig, TYPO3.EM.CodeMirrorConfig.parser[sParserType]);
+               this.codeMirrorEditor = new CodeMirror.fromTextArea(Ext.getDom(oCmp.id).id, this.editorConfig);
+
+               // Disable spell check button for non-js content
+               if (sParserType == 'js' || sParserType == 'css') {
+                       this.ownerCt.jslintButton.enable();
+               } else {
+                       this.ownerCt.jslintButton.disable();
+               }
+       },
+
+       changeAction: function(changed) {
+               if (!changed) {
+                       this.ownerCt.saveButton.disable();
+                       this.contentChanged = false;
+               } else {
+                       this.ownerCt.saveButton.enable();
+                       this.contentChanged = true;
+               }
+       },
+
+       getValue: function() {
+               return this.codeMirrorEditor.getCode();
+       },
+
+       setValue: function(text) {
+               //console.log(this.codeMirrorEditor);
+               this.codeMirrorEditor.setCode(text);
+       },
+
+       setValueAtCursor: function(text) {
+               var cursorPosition = this.codeMirrorEditor.cursorPosition();
+               var handleForCursorLine = this.codeMirrorEditor.cursorLine();
+               this.codeMirrorEditor.insertIntoLine(handleForCursorLine, cursorPosition.character, text);
+       },
+
+       openText: function(text, parser) {
+               /*this.parser = parser;
+               this.editorConfig = Ext.applyIf(this.editorConfig, TYPO3.EM.CodeMirrorConfig.parser[parser]);
+               console.log(this.editorConfig);
+               this.codeMirrorEditor.setParser(parser, this.editorConfig);*/
+               this.codeMirrorEditor.setCode(text);
+       }
+
+});
+Ext.reg('TYPO3.EM.CodeMirror', TYPO3.EM.CodeMirror);
\ No newline at end of file
index 8e0f3ff..eedf67d 100644 (file)
 
 Ext.ns('TYPO3.EM');
 
+/** override mousedown for grid to select checkbox respecting singleSelect */
+Ext.override(Ext.grid.CheckboxSelectionModel, {
+       handleMouseDown: function(g, rowIndex, e) {
+               e.stopEvent();
+               if (this.isSelected(rowIndex)) {
+                       this.deselectRow(rowIndex);
+               } else {
+                       this.selectRow(rowIndex, true);
+                       this.grid.getView().focusRow(rowIndex);
+               }
+       }
+});
+
 TYPO3.EM.LanguagesSelectionModel  = new Ext.grid.CheckboxSelectionModel({
        singleSelect: false,
        header: '',
-       dataIndex: 'selected'
+       dataIndex: 'selected',
+       checkOnly: false
+
 });
 
 TYPO3.EM.LanguagesColumnModel = new Ext.grid.ColumnModel([
@@ -120,6 +135,7 @@ TYPO3.EM.Languages = Ext.extend(Ext.FormPanel, {
                Ext.apply(this, {
                        languagesLoaded: false,
                        layout:'hbox',
+                       bodyStyle: 'padding: 10px 5px 0 5px;',
                        layoutConfig: {
                                align: 'stretch'
                        },
@@ -146,7 +162,8 @@ TYPO3.EM.Languages = Ext.extend(Ext.FormPanel, {
                                                cm: TYPO3.EM.LanguagesColumnModel,
                                                sm: TYPO3.EM.LanguagesSelectionModel,
                                                enableColumnMove: false,
-                                               anchor: '100% 100%'
+                                               anchor: '100% 100%',
+                                               onRowClick: Ext.emptyFn
                                        }]
                                }]
                        }, {
@@ -184,31 +201,40 @@ TYPO3.EM.Languages = Ext.extend(Ext.FormPanel, {
                Ext.getCmp('lang-checkbutton').handler = this.langActionHandler.createDelegate(this);
                Ext.getCmp('lang-updatebutton').handler = this.langActionHandler.createDelegate(this);
 
+
        } ,
 
        langActionHandler: function(button, event) {
+               var lg = Ext.getCmp('em-languagegrid');
                var bp = Ext.getCmp('LanguagesActionPanel');
                var pp = Ext.getCmp('langpb');
                bp.hide();
                pp.show();
+           lg.disable();
 
                if (button.id === 'lang-checkbutton') {
-                       // check languages
+                               // check languages
                        this.startFetchLanguages(0, Ext.StoreMgr.get('em-languageext-store'), function(){
-                               TYPO3.EM.LanguagesProgressBar.updateText(TYPO3.lang.msg_finished);
+                               TYPO3.EM.LanguagesProgressBar.updateText(this.interruptProcess ? TYPO3.lang.msg_interrupted : TYPO3.lang.msg_finished);
                                (function() {
                                        pp.hide();
                                        bp.show();
+                                       lg.enable();
                                }).defer(5000, this);
-                               TYPO3.Flashmessage.display(TYPO3.Severity.information, TYPO3.lang.translation_checking_extension, TYPO3.lang.translation_check_done,3);
+                               if (!this.interruptProcess) {
+                                       TYPO3.Flashmessage.display(TYPO3.Severity.information, TYPO3.lang.translation_checking_extension, TYPO3.lang.translation_check_done, 3);
+                               }
                        });
                } else {
-                       // update languages
+                               // update languages
                        this.startFetchLanguages(1, Ext.StoreMgr.get('em-languageext-store'), function(){
-                               TYPO3.EM.LanguagesProgressBar.updateText(TYPO3.lang.msg_finished);
-                               TYPO3.Flashmessage.display(TYPO3.Severity.information, TYPO3.langtranslation_update_extension, TYPO3.langtranslation_update_done, 3);
+                               TYPO3.EM.LanguagesProgressBar.updateText(this.interruptProcess ? TYPO3.lang.msg_interrupted : TYPO3.lang.msg_finished);
+                               if (!this.interruptProcess) {
+                                       TYPO3.Flashmessage.display(TYPO3.Severity.information, TYPO3.lang.translation_update_extension, TYPO3.lang.translation_update_done, 3);
+                               }
                                pp.hide();
                                bp.show();
+                               lg.enable();
                        });
                }
        },
@@ -245,13 +271,14 @@ TYPO3.EM.Languages = Ext.extend(Ext.FormPanel, {
 
 
                // fill arrays
-               for(var i = 0; i < this.extCount; i++) {
+               for (var i = 0; i < this.extCount; i++) {
                        this.extkeyArray.push(store.data.items[i].data.extkey);
                }
                if (!this.selectedLanguages.length) {
                        this.getSelectedLanguages();
                }
                // start process
+               this.interruptProcess = false;
                this.fetchLanguage();
        },
 
@@ -261,6 +288,7 @@ TYPO3.EM.Languages = Ext.extend(Ext.FormPanel, {
                var record = grid.store.getAt(row);
                var i;
 
+
                // res is response from request
                // array selectedLanguage key => grid html
 
@@ -275,7 +303,7 @@ TYPO3.EM.Languages = Ext.extend(Ext.FormPanel, {
                fetchedRecord.commit();
                }
 
-               if(this.extkeyArray.length > 0) {
+               if(this.extkeyArray.length > 0 && !this.interruptProcess) {
                        var ext = this.extkeyArray.shift();
 
 
@@ -300,7 +328,7 @@ TYPO3.EM.Languages = Ext.extend(Ext.FormPanel, {
                                this.fetchLanguage(response);
                        }, this);
                } else {
-                       // finished
+                               // finished
                        Ext.getCmp('lang-checkbutton').enable();
                        Ext.getCmp('lang-updatebutton').enable();
                        // call callback
@@ -364,11 +392,23 @@ TYPO3.EM.Languages = Ext.extend(Ext.FormPanel, {
 
        onRender:function() {
 
-
-
                // call parent
                TYPO3.EM.Languages.superclass.onRender.apply(this, arguments);
 
+       },
+
+       afterRender:function() {
+                       // call parent
+               TYPO3.EM.Languages.superclass.afterRender.apply(this, arguments);
+                       //The following are all of the possible keys that can be implemented: enter, left, right, up, down, tab, esc, pageUp, pageDown, del, home, end
+               this.progressNavigation = new Ext.KeyNav(this.getEl(),{
+                       'esc': function() {
+                               this.interruptProcess = true;
+                       },
+                       scope: this
+               });
+
+
        }
 });
 Ext.reg('extlanguages', TYPO3.EM.Languages);
index 3c9b513..eb82617 100644 (file)
@@ -41,8 +41,8 @@ TYPO3.EM.Layouts = {
                                '<h2>{icon} {title}</h2>',
                                '<p class="desc">{description}</p>',
                                '<h3>' + TYPO3.lang.show_links + '</h3>',
-                               '<p><label>' + TYPO3.lang.cmd_downloadext + ':</label> {download} ',
-                               '<tpl if="this.doc"><label>' + TYPO3.lang.cmd_readdoc + ':</label> {doc}</tpl></p>',
+                               '<p><label>' + TYPO3.lang.cmd_downloadext + ':</label> {download}</p> ',
+                               '<tpl if="doc"><p><label>' + TYPO3.lang.cmd_readdoc + ':</label> {doc}</p></tpl>',
                                '<h3>' + TYPO3.lang.show_details + '</h3>',
                                '<p><label>' + TYPO3.lang.extInfoArray_author + ':</label> {author}<br />',
                                '<label>' + TYPO3.lang.extInfoArray_version + ':</label> {version}<br />',
index bf22a5f..4677a58 100644 (file)
@@ -35,8 +35,11 @@ Ext.ns('TYPO3.EM', 'TYPO3.EM.GridColumns');
 TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
        border:false,
        stripeRows: true,
+       stateful: true,
+       stateId: 'LocalList',
+       stateEvents: ['columnmove', 'columnresize', 'sortchange', 'groupchange'],
 
-       expander: new Ext.ux.grid.RowPanelExpander({
+       rowExpander: new Ext.ux.grid.RowPanelExpander({
                hideable: false,
                createExpandingRowPanelItems: function(record, rowIndex){
                        var panelItems = [
@@ -50,7 +53,7 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                                        record: record,
                                        items:[
                                                {
-                                                       title: 'Info',
+                                                       title: TYPO3.lang.msg_info,
                                                        autoHeight: true,
                                                        listeners: {
                                                                activate: function(panel) {
@@ -59,7 +62,7 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                                                        }
                                                },
                                                {
-                                                       title:'Update',
+                                                       title: TYPO3.lang.msg_update,
                                                        html: '<div class="loading-indicator">Loading...</div>',
                                                        disabled: record.data.installed === 0,
                                                        listeners: {
@@ -71,7 +74,7 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                                                        }
                                                },
                                                {
-                                                       title: 'Configuration',
+                                                       title: TYPO3.lang.msg_configuration,
                                                        xtype: 'form',
                                                        disabled: record.data.installed === 0,
                                                        autoHeight: true,
@@ -99,17 +102,17 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                                                                                this.form.submit({
                                                                                        waitMsg : 'Saving Settings...',
                                                                                        success: function(form, action) {
-                                                                                               TYPO3.Flashmessage.display(TYPO3.Severity.information, 'Configuration', 'Configuration was saved', 5);
+                                                                                               TYPO3.Flashmessage.display(TYPO3.Severity.information, TYPO3.lang.msg_configuration, TYPO3.lang.configurationSaved, 5);
                                                                                        },
                                                                                        failure: function(form, action) {
                                                                                                if (action.failureType === Ext.form.Action.CONNECT_FAILURE) {
-                                                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.error, 'Error',
-                                                                                                                                                       'Status:' + action.response.status + ': ' +
+                                                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.error, TYPO3.lang.msg_error,
+                                                                                                                                                       TYPO3.lang.msg_error + ':' + action.response.status + ': ' +
                                                                                                                                                        action.response.statusText, 5);
                                                                                        }
                                                                                        if (action.failureType === Ext.form.Action.SERVER_INVALID) {
                                                                                                        // server responded with success = false
-                                                                                               TYPO3.Flashmessage.display(TYPO3.Severity.error, 'Invalid', action.result.errormsg, 5);
+                                                                                               TYPO3.Flashmessage.display(TYPO3.Severity.error, TYPO3.lang.invalid, action.result.errormsg, 5);
                                                                                        }
                                                                                 }
                                                                         });
@@ -118,21 +121,21 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                                                        }
                                                },
                                                {
-                                                       title: 'Files',
+                                                       title: TYPO3.lang.msg_files,
                                                        xtype: 'extfilelist',
                                                        recordData: record.data
 
                                                },
                                                {
                                                        xtype: 'terupload',
-                                                       title:'Upload to TER',
+                                                       title: TYPO3.lang.msg_terupload,
                                                        recordData: record.data,
                                                        disabled: !TYPO3.settings.EM.hasCredentials
                                                },
                                                {
-                                                       title:'Developer Information',
+                                                       title: TYPO3.lang.msg_developerinformation,
                                                        autoHeight: true,
-                                                       html: '<div class="loading-indicator">Loading...</div>',
+                                                       html: '<div class="loading-indicator">' + TYPO3.lang.action_loading+ '</div>',
                                                        listeners: {
                                                                activate: function(panel) {
                                                                        TYPO3.EM.ExtDirect.getExtensionDevelopInfo(record.data.extkey, function(response) {
@@ -142,7 +145,7 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                                                        }
                                                },
                                                {
-                                                       title:'Backup/Delete',
+                                                       title: TYPO3.lang.details_backup_delete,
                                                        disabled: true //record.data.installed === 0
                                                }
                                        ]
@@ -196,15 +199,8 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                                beforeload: function() {
                                        this.reloadButton.disable();
                                },
-                               load: function(store, records) {
-                                       store.filterBy(store.storeFilter);
-                                       this.reloadButton.enable();
-                                       if (store.showAction) {
-                                               this.showExtension.defer(500, this);
-                                       }
-                               },
                                datachanged: function(store){
-                                       Ext.getCmp('displayExtensionLabel').setText('Extensions: ' + store.data.length);
+                                       Ext.getCmp('displayExtensionLabel').setText(TYPO3.lang.extensions + ' ' + store.data.length);
                                        var hasFilters = false;
                                        TYPO3.EM.Filters.filters.each(function (filter) {
                                                if (filter.active) {
@@ -217,31 +213,39 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                                                this.doClearFilters.hide();
                                        }
                                },
+                               load: function(store) {
+                                       this.reloadButton.enable();
+                                       if (store.showAction) {
+                                               this.showExtension.defer(500, this);
+                                       }
+                               },
+
                                scope: this
                        },
-                       storeFilter: function(record,id){
-                               var shy = Ext.getCmp('shyFlag').getValue() ? 1 : 0;
-                               var installed = Ext.getCmp('installedFlag').getValue() ? 1 : 0;
-                               var obsolete = Ext.getCmp('obsoleteFlag').getValue() ? 1 : 0;
-                               var filtertext = Ext.getCmp('localSearchField').getRawValue();
-                               if (filtertext) {
-                                       //filter by search string
-                                       var re = new RegExp(Ext.escapeRe(filtertext));
-                                       var isMatched = record.data.extkey.match(re) || record.data.title.match(re);
-                                       if (!isMatched) {
-                                               return false;
+                       validateRecord: function(record){
+                               //return false; //testcase
+                               var control = Ext.getCmp('localSearchField');
+                               if (control) {
+                                       var filtertext = control.getRawValue();
+                                       if (filtertext) {
+                                                       //filter by search string
+                                               var re = new RegExp(Ext.escapeRe(filtertext));
+                                               var isMatched = record.data.extkey.match(re) || record.data.title.match(re);
+                                               if (!isMatched) {
+                                                       return false;
+                                               }
                                        }
                                }
-                               if (obsolete && record.data.state === 'obsolete'){
+                               if (TYPO3.settings.EM.display_obsolete === '0' && record.data.state === 'obsolete'){
                                        return false;
                                }
-                               var isShy = record.data.shy == 1 || '';
-                               if (shy && isShy) {
+                               if (TYPO3.settings.EM.display_shy === '0' && record.data.shy == 1){
                                        return false;
                                }
-                               if (installed && record.data.installed === 0) {
+                               if (TYPO3.settings.EM.display_installed === '1' && record.data.installed == 0) {
                                        return false;
                                }
+
                                return true;
                        }
                });
@@ -254,7 +258,7 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
 
                var cm = new Ext.grid.ColumnModel({
                        columns: [
-                               this.expander,
+                               this.rowExpander,
                                TYPO3.EM.GridColumns.InstallExtension,
                                TYPO3.EM.GridColumns.ExtensionTitle,
                                TYPO3.EM.GridColumns.ExtensionKey,
@@ -263,7 +267,9 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                                TYPO3.EM.GridColumns.ExtensionType,
                                TYPO3.EM.GridColumns.ExtensionState
                        ],
-                       defaultSortable: true
+                       defaults: {
+                               sortable: true
+                       }
 
                });
 
@@ -271,39 +277,37 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
 
                Ext.apply(this, {
                        itemId: 'em-localLocalExtensionlist',
-                       title: 'Local Extension List',
-                       loadMask: {msg: 'Loading Extensionlist ...'},
+                       title: TYPO3.lang.localExtensionList,
+                       loadMask: {msg: TYPO3.lang.action_loading_extlist},
                        layout: 'fit',
                        store: localstore,
                        cm: cm,
-                       plugins: [this.expander, TYPO3.EM.Filters],
+                       plugins: [this.rowExpander, TYPO3.EM.Filters],
                        view : new Ext.grid.GroupingView({
                                forceFit : true,
-                               groupTextTpl : '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})',
+                               groupTextTpl : '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "' + TYPO3.lang.msg_items + '" : "' + TYPO3.lang.msg_item + '"]})',
                                enableRowBody: true,
                                showPreview: true,
                                getRowClass: this.applyRowClass,
                                iconCls: 'icon-grid',
                                hideGroupedColumn: true
                        }),
-                       sm: new Ext.grid.CellSelectionModel({
-                               select: Ext.emptyFn
-                       }),
+
                        tbar: [
                                {
                                        xtype: 'tbtext',
-                                       text: 'Filter:'
+                                       text: TYPO3.lang.cmd_filter
                                },
                                searchField,
                                {
                                        iconCls: 'x-tbar-loading',
                                        ref: '../reloadButton',
                                        handler: function() {
-                                               this.store.load();
+                                               this.store.reload();
                                        },
                                        scope: this
                                }, '-', {
-                                       text: 'Clear all Filters',
+                                       text: TYPO3.lang.cmd_ClearAllFilters,
                                        ref: '../doClearFilters',
                                        handler: function() {
                                                TYPO3.EM.Filters.clearFilters();
@@ -315,50 +319,59 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                                {
                                        id: 'installedFlag',
                                        xtype: 'checkbox',
-                                       checked: false,
-                                       boxLabel: 'show installed only' + '&nbsp;',
+                                       checked: TYPO3.settings.EM.display_installed === '1' ? true : false,
+                                       boxLabel: TYPO3.lang.display_installedOnly + '&nbsp;',
                                        listeners: {
                                                check: function(checkbox, checked) {
-                                                       localstore.filterBy(localstore.storeFilter);
-                                               }
+                                                       TYPO3.settings.EM.display_installed =  checked ? '1' : '0';
+                                                       TYPO3.EM.ExtDirect.saveSetting('display_installed', TYPO3.settings.EM.display_installed);
+                                                       localstore.filterBy(localstore.validateRecord, this);
+                                               },
+                                               scope: this
                                        }
                                }, {
                                        id: 'shyFlag',
                                        xtype: 'checkbox',
-                                       checked: true,
-                                       boxLabel: 'show shy extensions' + '&nbsp;',
+                                       checked: TYPO3.settings.EM.display_shy === '1' ? true : false,
+                                       boxLabel: TYPO3.lang.display_shy + '&nbsp;',
                                        listeners: {
                                                check: function(checkbox, checked) {
-                                                       localstore.filterBy(localstore.storeFilter);
-                                               }
+                                                       TYPO3.settings.EM.display_shy =  checked ? '1' : '0';
+                                                       TYPO3.EM.ExtDirect.saveSetting('display_shy', TYPO3.settings.EM.display_shy);
+                                                       localstore.filterBy(localstore.validateRecord, this);
+                                               },
+                                               scope: this
                                        }
                                },{
                                        id: 'obsoleteFlag',
                                        xtype: 'checkbox',
-                                       checked: true,
-                                       boxLabel: 'show obsolete extensions' + '&nbsp;',
+                                       checked: TYPO3.settings.EM.display_obsolete === '1' ? true : false,
+                                       boxLabel: TYPO3.lang.display_obsolete + '&nbsp;',
                                        listeners: {
                                                check: function(checkbox, checked) {
-                                                       localstore.filterBy(localstore.storeFilter);
-                                               }
+                                                       TYPO3.settings.EM.display_obsolete =  checked ? '1' : '0';
+                                                       TYPO3.EM.ExtDirect.saveSetting('display_obsolete', TYPO3.settings.EM.display_obsolete);
+                                                       localstore.filterBy(localstore.validateRecord, this);
+                                               } ,
+                                               scope: this
                                        }
                                }
                        ],
                        bbar:[
                                {
                                        xtype: 'tbtext',
-                                       text: 'loading Extension list ...',
+                                       text: TYPO3.lang.action_loading_extlist,
                                        id: 'displayExtensionLabel',
                                        style: {fontWeight: 'bold'}
                                },
                                '->',
                                {
-                                       text:'Upload Extension',
+                                       text: TYPO3.lang.repositoryUploadForm_upload,
                                        handler : function(){
                                                TYPO3.EM.Tools.uploadExtension();
                                        }
                                }, ' ', {
-                                       text:'Clear Grouping',
+                                       text: TYPO3.lang.cmd_ClearGrouping,
                                        handler : function(){
                                                localstore.clearGrouping();
                                        }
@@ -382,19 +395,21 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                        }
                }, this);
 
+               /*this.on('staterestore', function() {
+                       this.store.filterBy(this.store.storeFilter, this);
+               }, this);   */
+               localstore.load();
        },
 
 
        showExtension: function() {
-               var store = Ext.StoreMgr.lookup('localextensionstore');
-               var row = store.find('extkey', store.showAction);
-
+               var row = this.store.find('extkey', this.store.showAction);
                if (row) {
-                       this.expander.expandRow(row);
+                       this.rowExpander.expandRow(row);
                        this.getSelectionModel().selectRow(row);
                        this.getView().focusRow(row);
                }
-               store.showAction = false;
+               this.store.showAction = false;
        },
 
        onRender: function() {
index b6d8a62..9974ffe 100644 (file)
@@ -35,6 +35,9 @@ Ext.ns('TYPO3.EM', 'TYPO3.EM.GridColumns', 'TYPO3.EM.ExtDirect');
 TYPO3.EM.RepositoryList = Ext.extend(Ext.grid.GridPanel, {
        border:false,
        stripeRows: true,
+       stateful: true,
+       stateId: 'RepositoryList',
+       stateEvents: ['columnmove', 'columnresize', 'sortchange', 'groupchange', 'expand', 'collapse'],
 
        expander: new Ext.ux.grid.RowPanelExpander({
                createExpandingRowPanelItems: function(record, rowIndex){
@@ -62,6 +65,20 @@ TYPO3.EM.RepositoryList = Ext.extend(Ext.grid.GridPanel, {
                }
        }),
 
+       listeners: { /*
+               beforestaterestore: function(grid, state) {
+                       console.log('restore:', state);
+                       return true;
+               },
+               statesave: function(grid, state) {
+                       console.log('save:', state);
+               },
+               beforestatesave: function(grid, state) {
+                       console.log('beforesave:', state);
+                       return true;
+               }  */
+       },
+
        initComponent:function() {
                this.repositoryListStore = new Ext.data.DirectStore({
                        storeId: 'repositoryliststore',
@@ -74,15 +91,16 @@ TYPO3.EM.RepositoryList = Ext.extend(Ext.grid.GridPanel, {
                                {name:'install'},
                                {name:'title'},
                                {name:'extkey'},
-                               {name:'category'},
+                               {name:'categoryvalue'},
                                {name:'version'},
                                {name:'alldownloadcounter', type: 'int'},
+                               {name:'statevalue'},
                                {name:'state'},
                                {name:'icon'},
                                {name:'description'},
                                {name:'lastuploaddate'},
-                               {name:'authorname'},
-                               {name:'authoremail'},
+                               {name:'author', mapping: 'authorname'},
+                               {name:'author_email', mapping: 'authoremail'},
                                {name:'versions', type: 'int'}
                        ],
                        paramNames: {
@@ -109,16 +127,21 @@ TYPO3.EM.RepositoryList = Ext.extend(Ext.grid.GridPanel, {
                                        store.setBaseParam('rep', Ext.getCmp('repCombo').getValue());
                                },
                                load: function(store, records){
-                                       this.filterBy(this.storeFilter);
+                                       var hasFilters = false;
+                                       TYPO3.EM.RemoteFilters.filters.each(function (filter) {
+                                               if (filter.active) {
+                                                       hasFilters = true;
+                                               }
+                                       });
+                                       if (hasFilters) {
+                                               this.doClearFilters.show();
+                                       } else {
+                                               this.doClearFilters.hide();
+                                       }
                                },
-                               datachanged: function(store){
-                                       //Ext.getCmp('rdisplayExtensionLabel').setText('Extensions found: ' + store.data.length);
-                               }
-                       },
-                       storeFilter: function(record,id){
-
-                               return true;
+                               scope: this
                        }
+
                });
 
                this.repositoryStore = new Ext.data.DirectStore({
@@ -137,22 +160,29 @@ TYPO3.EM.RepositoryList = Ext.extend(Ext.grid.GridPanel, {
                        width: 200
                });
 
-               Ext.apply(this, {
-                       loadMask: {msg: 'Loading Repository Extensionlist ...'},
-                       store: this.repositoryListStore,
+               var cm = new Ext.grid.ColumnModel({
                        columns: [
-                               //sm,
                                this.expander,
                                TYPO3.EM.GridColumns.ImportExtension,
                                TYPO3.EM.GridColumns.ExtensionTitle,
                                TYPO3.EM.GridColumns.ExtensionKey,
                                TYPO3.EM.GridColumns.ExtensionCategoryRemote,
-                               TYPO3.EM.GridColumns.ExtensionDownloads,
                                TYPO3.EM.GridColumns.ExtensionAuthor,
                                TYPO3.EM.GridColumns.ExtensionType,
-                               TYPO3.EM.GridColumns.ExtensionState
+                               TYPO3.EM.GridColumns.ExtensionStateValue
                        ],
-                       plugins: [this.expander],
+                       defaults: {
+                               sortable: true,
+                               hideable:false
+                       }
+
+               });
+
+               Ext.apply(this, {
+                       loadMask: {msg: TYPO3.lang.action_loadingRepositoryExtlist},
+                       store: this.repositoryListStore,
+                       cm: cm,
+                       plugins: [this.expander, TYPO3.EM.RemoteFilters],
                        viewConfig: {
                                forceFit: true,
                                enableRowBody: true,
@@ -166,14 +196,22 @@ TYPO3.EM.RepositoryList = Ext.extend(Ext.grid.GridPanel, {
                        tbar: [
                                {
                                        xtype: 'tbtext',
-                                       text: 'Filter:',
-                                       qTip: 'Enter something for search and press Enter. To list all, use "*"'
+                                       text: TYPO3.lang.cmd_filter + ':',
+                                       qTip: TYPO3.lang.help_remoteFilter
                                },
-                               searchField,
-                               ' ',
+                               searchField, ' ', {
+                                       text: TYPO3.lang.cmd_ClearAllFilters,
+                                       ref: '../doClearFilters',
+                                       handler: function() {
+                                               TYPO3.EM.RemoteFilters.clearFilters();
+                                       },
+                                       scope: this,
+                                       hidden: true
+                               },
+                               ' ', '-',
                                {
                                        xtype: 'tbtext',
-                                       text: 'Repository:'
+                                       text: TYPO3.lang.repository + ': '
                                },
                                TYPO3.EM.RepositoryCombo,
                                {
@@ -184,7 +222,7 @@ TYPO3.EM.RepositoryList = Ext.extend(Ext.grid.GridPanel, {
                                ' ',
                                {
                                        xtype: 'button',
-                                       text: 'Retrieve / Update',
+                                       text: TYPO3.lang.cmd_RetrieveUpdate,
                                        scope: this,
                                        handler: this.repositoryUpdate
                                }
@@ -197,7 +235,7 @@ TYPO3.EM.RepositoryList = Ext.extend(Ext.grid.GridPanel, {
                                        store: this.repositoryListStore,
                                        pageSize: 50,
                                        displayInfo: true,
-                                       emptyMsg: 'start searching ...'
+                                       emptyMsg: TYPO3.lang.action_searching
                                }
                        ]
                });
index e36dda9..618d749 100644 (file)
@@ -15,7 +15,6 @@ TYPO3.EM.Settings = Ext.extend(Ext.FormPanel, {
        labelWidth: 240,
        bodyStyle: 'padding:5px 5px 0',
 
-
        initComponent: function() {
 
                this.repositoryStore = new Ext.data.DirectStore({
@@ -49,7 +48,7 @@ TYPO3.EM.Settings = Ext.extend(Ext.FormPanel, {
                        displayField: 'title',
                        valueField: 'uid',
                        store: this.repositoryStore,
-                       fieldLabel: 'Select Repository',
+                       fieldLabel: TYPO3.lang.repository_select,
                        listeners: {
                                scope: this,
                                select: function(comboBox, newValue, oldValue) {
@@ -163,12 +162,20 @@ TYPO3.EM.Settings = Ext.extend(Ext.FormPanel, {
                                layout: 'hbox',
                                align: 'stretchmax',
                                border: false,
+                               id: 'hbox-settings',
+                               bodyStyle: 'padding-top: 10px;',
+                               defaults: {
+                                       height: 800
+                               },
                                items: [{
                                        width: 450,
                                        border: false,
                                        labelWidth: 100,
                                        items: [{
                                                        xtype:'fieldset',
+                                                       stateId: 'fsUserSettings',
+                                                       stateful: true,
+                                                       stateEvents: ['collapse', 'expand'],
                                                        title: TYPO3.lang.user_settings,
                                                        collapsible: true,
                                                        defaults: {},
@@ -197,12 +204,24 @@ TYPO3.EM.Settings = Ext.extend(Ext.FormPanel, {
                                                                        },
                                                                        scope: this
                                                                }
-                                                       ]
+                                                       ],
+                                                       listeners: {
+                                                               beforestaterestore: function() {
+                                                                       console.log('beforestaterestore', arguments);
+                                                               },
+                                                               beforestateresave: function() {
+                                                                       console.log('beforestateresave', arguments);
+                                                               }
+                                                       }
                                                }, {
                                                        xtype:'fieldset',
+                                                       stateId: 'fsRepositories',
+                                                       stateful: true,
+                                                       stateEvents: ['collapse', 'expand'],
                                                        title: TYPO3.lang.repositories,
                                                        collapsible: true,
                                                        defaultType: 'textfield',
+                                                       height: 246,
                                                        items :[
                                                                this.repSettingsCombo,
                                                        {
@@ -221,7 +240,7 @@ TYPO3.EM.Settings = Ext.extend(Ext.FormPanel, {
                                                                        handler: function() {
                                                                                var record = this.repositoryStore.getById(this.repSettingsCombo.getValue());
                                                                                var win = new TYPO3.EM.EditRepository({
-                                                                                       title: 'Edit Repository "' + record.data.title + '"'
+                                                                                       title: String.format(TYPO3.lang.repository_edit, record.data.title)
                                                                                });
                                                                                win.getComponent('repForm').getForm().setValues({
                                                                                        'title': record.data.title,
@@ -240,17 +259,59 @@ TYPO3.EM.Settings = Ext.extend(Ext.FormPanel, {
                                                                        handler: function() {
                                                                                var win = new TYPO3.EM.EditRepository({
                                                                                        isCreate: true,
-                                                                                       title: 'Create new Repository'
+                                                                                       title: TYPO3.lang.repository_create
                                                                                }).show();
                                                                        },
                                                                        scope: this
                                                                }, ' ', {
                                                                        text: TYPO3.lang.cmd_delete,
                                                                        iconCls: 'x-btn-delete',
-                                                                       ref: '../deleteRep'
+                                                                       ref: '../deleteRep',
+                                                                       handler: function() {
+                                                                               var record = this.repositoryStore.getById(this.repSettingsCombo.getValue());
+                                                                               var wait = Ext.MessageBox.wait(TYPO3.lang.repository_deleting, record.data.title);
+                                                                               TYPO3.EM.ExtDirect.deleteRepository(record.data.uid, function(response) {
+                                                                                       if (response.success !== true) {
+                                                                                               TYPO3.Flashmessage.display(TYPO3.Severity.error, 'Invalid', action.result.error, 5);
+                                                                                       } else {
+                                                                                               TYPO3.Flashmessage.display(TYPO3.Severity.ok, TYPO3.lang.repository_delete, String.format(TYPO3.lang.repository_deleted, record.data.title), 5);
+                                                                                               this.repSettingsCombo.setValue(1);
+                                                                                               this.repositoryStore.load({
+                                                                                                       callback: function() {
+                                                                                                               this.repSettingsCombo.fireEvent('select', this.repSettingsCombo, this.repositoryStore.getById(1), 0);
+                                                                                                       },
+                                                                                                       scope: this
+                                                                                               });
+
+                                                                                       }
+                                                                                       wait.hide();
+                                                                               }, this);
+                                                                       },
+                                                                       scope: this
                                                                }]
                                                        }]
-                                               }]
+                                               }, {
+                                                       title: TYPO3.lang.stateProvider,
+                                                       stateId: 'fsStateProvider',
+                                                       stateful: true,
+                                                       stateEvents: ['collapse', 'expand'],
+                                                       xtype:'fieldset',
+                                                       collapsible: true,
+                                                       labelWidth: 1,
+                                                       items: {
+                                                               xtype: 'displayfield',
+                                                               layout: 'container',
+                                                               html: TYPO3.lang.stateProviderDescription
+                                                       },
+                                                       buttons: [{
+                                               text: TYPO3.lang.stateProviderClear,
+                                                               handler: function() {
+                                                                       TYPO3.EM.ExtDirect.resetStates(function(response) {
+                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.information, TYPO3.lang.stateProvider, TYPO3.lang.stateProviderCleared, 5);
+                                                                       });
+                                                               }
+                                                       }]
+                                       }]
                                        }, {
                                                flex: 1,
                                                border: false,
@@ -269,7 +330,7 @@ TYPO3.EM.Settings = Ext.extend(Ext.FormPanel, {
                                                                viewConfig: {
                                                                        forceFit: true
                                                                },
-                                                               height: 450
+                                                               height: 750
                                                        },{
                                                                xtype: 'hidden',
                                                                name: 'selectedMirror'
@@ -310,10 +371,10 @@ TYPO3.EM.Settings = Ext.extend(Ext.FormPanel, {
        repositoryInfo: function(record) {
                var panel = Ext.getCmp('repDescriptionDisplay');
                panel.update([
-                       '<h1 class="h1Panel">',record.title, '</h1>',
+                       '<h1 class="h1Panel">', record.title, '</h1>',
                        '<p class="panelDescription">', record.description, '</p>',
-                       '<p><b>', 'Mirror URL: ', '</b>', record.mirror_url, '<br />',
-                       '<b>', 'WSDL URL: ', '</b>', record.wsdl_url, '</p>'
+                       '<p><b>', TYPO3.lang.mirror_url_long, ': ', '</b>', record.mirror_url, '<br />',
+                       '<b>', TYPO3.lang.wsdlUrl, ': ', '</b>', record.wsdl_url, '</p>'
                ].join(''));
                if (record.uid == 1) {
                        panel.editRep.disable();
@@ -354,12 +415,16 @@ TYPO3.EM.Settings = Ext.extend(Ext.FormPanel, {
                        paramsAsHash: false
                });
 
-               this.repositoryStore.load();
-               this.getForm().load({
-                       success: function(form, response) {
-                               record = this.repositoryStore.getById(this.repSettingsCombo.getValue()).data;
-                               this.repositoryInfo(record);
-                               this.isLoaded = true;
+               this.repositoryStore.load({
+                       callback: function() {
+                               this.getForm().load({
+                                       success: function(form, response) {
+                                               record = this.repositoryStore.getById(this.repSettingsCombo.getValue()).data;
+                                               this.repositoryInfo(record);
+                                               this.isLoaded = true;
+                                       },
+                                       scope: this
+                               });
                        },
                        scope: this
                });
@@ -400,21 +465,21 @@ TYPO3.EM.EditRepository = Ext.extend(Ext.Window, {
                        paramsAsHash: false,
                        items: [{
                                itemId: 'title',
-                               fieldLabel: 'Title',
+                               fieldLabel: TYPO3.lang.extInfoArray_title,
                                name: 'title'
                        }, {
                                itemId: 'description',
-                               fieldLabel: 'Description',
+                               fieldLabel: TYPO3.lang.extInfoArray_description,
                                xtype: 'textarea',
                                name: 'description',
                                height: 100
                        }, {
                                itemId: 'mirror_url',
-                               fieldLabel: 'Mirror URL',
+                               fieldLabel: TYPO3.lang.mirror_url_long,
                                name: 'mirror_url'
                        }, {
                                itemId: 'wsdl_url',
-                               fieldLabel: 'WSDL URL',
+                               fieldLabel: TYPO3.lang.wsdlUrl,
                                name: 'wsdl_url'
                        }, {
                                xtype: 'hidden',
@@ -430,7 +495,7 @@ TYPO3.EM.EditRepository = Ext.extend(Ext.Window, {
                Ext.apply(this, {
                        items: form,
                        buttons : [{
-                               text: 'Create',
+                               text: TYPO3.lang.cmd_create,
                                iconCls: 'x-btn-save',
                                handler: function() {
                                        this.repositoryUpdate(form, 1);
@@ -438,7 +503,7 @@ TYPO3.EM.EditRepository = Ext.extend(Ext.Window, {
                                hidden: !this.isCreate,
                                scope: this
                        }, {
-                               text: 'Update',
+                               text: TYPO3.lang.cmd_update,
                                iconCls: 'x-btn-save',
                                handler: function() {
                                  this.repositoryUpdate(form, 0);
@@ -446,7 +511,7 @@ TYPO3.EM.EditRepository = Ext.extend(Ext.Window, {
                                hidden: this.isCreate,
                                scope: this
                        }, {
-                               text: 'Cancel',
+                               text: TYPO3.lang.cmd_cancel,
                                iconCls: 'x-btn-cancel',
                                handler: function() {
                                        this.close();
@@ -460,21 +525,24 @@ TYPO3.EM.EditRepository = Ext.extend(Ext.Window, {
        repositoryUpdate: function(form, type) {
 
                form.getForm().submit({
-                       waitMsg : type === 0 ? 'Saving Repository...' : 'Creating Repository ...',
+                       waitMsg : type === 0 ? TYPO3.lang.repository_saving : TYPO3.lang.repository_creating,
                        success: function(form, action) {
-                               TYPO3.Flashmessage.display(TYPO3.Severity.information,'Repository', 'Repository was ' + (type == 0 ? 'saved.' : 'created.'), 5);
+                               TYPO3.Flashmessage.display(TYPO3.Severity.information, TYPO3.lang.repository, type == 0
+                                               ? String.format(TYPO3.lang.repository_created, action.response.params.title)
+                                               : String.format(TYPO3.lang.repository_created, action.response.params.title)
+                                               , 5);
                                Ext.StoreMgr.get('repositoriessettings').load();
                                this.close();
                        },
                        failure: function(form, action) {
                                if (action.failureType === Ext.form.Action.CONNECT_FAILURE) {
-                                       TYPO3.Flashmessage.display(TYPO3.Severity.error, 'Error',
-                                                       'Status:'+action.response.status+': '+
+                                       TYPO3.Flashmessage.display(TYPO3.Severity.error, TYPO3.lang.msg_error,
+                                                       TYPO3.lang.msg_status + ':' + action.response.status + ': ' +
                                                        action.response.statusText, 5);
                                }
                                if (action.failureType === Ext.form.Action.SERVER_INVALID){
                                        // server responded with success = false
-                                       TYPO3.Flashmessage.display(TYPO3.Severity.error, 'Invalid', action.result.errormsg, 15);
+                                       TYPO3.Flashmessage.display(TYPO3.Severity.error, TYPO3.lang.msg_invalid, action.result.errormsg, 15);
                                }
                        },
                        scope: this
index 2d3de87..2c24efd 100644 (file)
@@ -35,8 +35,8 @@ Ext.ns('TYPO3.EM');
 TYPO3.EM.Tools = function() {\r
        return {\r
                displayLocalExtension: function(extKey, reload) {\r
-                       localStore = Ext.StoreMgr.get('localextensionstore');\r
-                       // select local extension list\r
+                       localStore = Ext.StoreMgr.get('localstore');\r
+                               // select local extension list\r
                        Ext.getCmp('em-main').setActiveTab(0);\r
                        if (reload === true) {\r
                                localStore.showAction = extKey;\r
@@ -53,72 +53,11 @@ TYPO3.EM.Tools = function() {
                },\r
 \r
                uploadExtension: function() {\r
-                       w = new Ext.Window({\r
-                               title: 'Upload extension file directly (.t3x)',\r
-                               modal: true,\r
-                               closable: true,\r
-                               plain: true,\r
-                               width: 400,\r
-                               height: 160,\r
-                               layout: 'form',\r
-                               fileUpload: true,\r
-                               items: [\r
-                                       {\r
-                                               xtype: 'fileuploadfield',\r
-                                               id: 'form-file',\r
-                                               emptyText: 'Select Extension (*.t3x)',\r
-                                               fieldLabel: 'Extension',\r
-                                               name: 'extupload-path',\r
-                                               buttonText: '...',\r
-                                               width: 250,\r
-                                               validator: function(value) {\r
-                                                       if (value) {\r
-                                                               return value.split('.').pop().toLowerCase() === 't3x';\r
-                                                       }\r
-                                                       return false;\r
-                                               }\r
-                                       },\r
-                                       TYPO3.EM.UploadLocationCombo,\r
-                                       {\r
-                                               xtype: 'checkbox',\r
-                                               fieldLabel: 'Overwrite any existing extension!',\r
-                                               name: 'uploadOverwrite',\r
-                                               labelWidth: 250\r
-                                       },\r
-                                       {\r
-                                               xtype: 'button',\r
-                                               text: 'Upload extension from your computer',\r
-                                               id: 'uploadSubmitButton',\r
-                                               width: 420,\r
-                                               scope: this,\r
-                                               handler: function() {\r
-                                                       if (this.form.isValid()) {\r
-                                                               this.form.submit({\r
-                                                                       waitMsg : 'Sending data...',\r
-                                                                       success: function(form, action) {\r
-                                                                               form.reset();\r
-                                                                               TYPO3.Flashmessage.display(TYPO3.Severity.information, 'Extension Upload', 'Extension "' + action.result.extKey + '" was uploaded.', 5);\r
-                                                                               w.close();\r
-                                                                               TYPO3.EM.Tools.displayLocalExtension(action.result.extKey, true);\r
-                                                                       },\r
-                                                                       failure: function(form, action) {\r
-                                                                               if (action.failureType === Ext.form.Action.CONNECT_FAILURE) {\r
-                                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.error, 'Error',\r
-                                                                                                       'Status:' + action.response.status + ': ' +\r
-                                                                                                                       action.response.statusText, 15);\r
-                                                                               }\r
-                                                                               if (action.failureType === Ext.form.Action.SERVER_INVALID) {\r
-                                                                                       // server responded with success = false\r
-                                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.error, 'Invalid', action.result.errormsg, 5);\r
-                                                                               }\r
-                                                                               w.close();\r
-                                                                       }\r
-                                                               });\r
-                                                       }\r
-                                               }\r
-                                       }\r
-                               ]\r
-                       }).show();\r
+                       if (Ext.isObject(TYPO3.EM.ExtensionUploadWindowInstance)) {\r
+                               TYPO3.EM.ExtensionUploadWindowInstance.show();\r
+                       } else {\r
+                               TYPO3.EM.ExtensionUploadWindowInstance = new TYPO3.EM.ExtensionUploadWindow().show();\r
+                       }\r
                }\r
        };\r
 }();
\ No newline at end of file
index dbe9236..eca9ba2 100644 (file)
@@ -165,6 +165,7 @@ listeners: {
                        itemId: 'UserTools',
                        layout: 'hbox',
                        align: 'stretchmax',
+                       bodyStyle: 'padding-top: 10px;',
                        border: false,
                        items: [
                                {
index decea25..dc2c96f 100644 (file)
@@ -3,15 +3,15 @@
  **/\r
 \r
 Ext.namespace("Ext.ux.grid");\r
-Ext.ux.grid.GridFilters = function(config){            \r
+Ext.ux.grid.GridFilters = function(config){\r
        this.filters = new Ext.util.MixedCollection();\r
        this.filters.getKey = function(o){return o ? o.dataIndex : null};\r
-       \r
+\r
        for(var i=0, len=config.filters.length; i<len; i++)\r
                this.addFilter(config.filters[i]);\r
-       \r
+\r
        this.deferredUpdate = new Ext.util.DelayedTask(this.reload, this);\r
-       \r
+\r
        delete config.filters;\r
        Ext.apply(this, config);\r
 };\r
@@ -57,7 +57,7 @@ Ext.extend(Ext.ux.grid.GridFilters, Ext.util.Observable, {
        init: function(grid){\r
                if(grid instanceof Ext.grid.GridPanel){\r
                        this.grid  = grid;\r
-                 \r
+\r
                        this.store = this.grid.getStore();\r
                        if(this.local){\r
                                this.store.on('load', function(store){\r
@@ -66,21 +66,21 @@ Ext.extend(Ext.ux.grid.GridFilters, Ext.util.Observable, {
                        } else {\r
                          this.store.on('beforeload', this.onBeforeLoad, this);\r
                        }\r
-                         \r
+\r
                        this.grid.filters = this;\r
-                        \r
+\r
                        this.grid.addEvents({"filterupdate": true});\r
-                         \r
+\r
                        grid.on("render", this.onRender, this);\r
-                         \r
+\r
                        grid.on("beforestaterestore", this.applyState, this);\r
                        grid.on("beforestatesave", this.saveState, this);\r
-                                         \r
+\r
                } else if(grid instanceof Ext.PagingToolbar){\r
                  this.toolbar = grid;\r
                }\r
        },\r
-               \r
+\r
        /** private **/\r
        applyState: function(grid, state){\r
                this.suspendStateStore = true;\r
@@ -93,14 +93,14 @@ Ext.extend(Ext.ux.grid.GridFilters, Ext.util.Observable, {
                                        filter.setActive(true);\r
                                }\r
                        }\r
-                       \r
+\r
                this.deferredUpdate.cancel();\r
                if(this.local)\r
                        this.reload();\r
-                       \r
+\r
                this.suspendStateStore = false;\r
        },\r
-       \r
+\r
        /** private **/\r
        saveState: function(grid, state){\r
                var filters = {};\r
@@ -110,14 +110,14 @@ Ext.extend(Ext.ux.grid.GridFilters, Ext.util.Observable, {
                });\r
                return state.filters = filters;\r
        },\r
-       \r
+\r
        /** private **/\r
        onRender: function(){\r
                var hmenu;\r
-               \r
+\r
                if(this.showMenu){\r
                        hmenu = this.grid.getView().hmenu;\r
-                       \r
+\r
                        this.sep  = hmenu.addSeparator();\r
                        this.menu = hmenu.add(new Ext.menu.CheckItem({\r
                                        text: this.menuFilterText,\r
@@ -125,14 +125,14 @@ Ext.extend(Ext.ux.grid.GridFilters, Ext.util.Observable, {
                                }));\r
                        this.menu.on('checkchange', this.onCheckChange, this);\r
                        this.menu.on('beforecheckchange', this.onBeforeCheck, this);\r
-                               \r
+\r
                        hmenu.on('beforeshow', this.onMenu, this);\r
                }\r
-               \r
+\r
                this.grid.getView().on("refresh", this.onRefresh, this);\r
                this.updateColumnHeadings(this.grid.getView());\r
        },\r
-       \r
+\r
        /** private **/\r
        onMenu: function(filterMenu){\r
                var filter = this.getMenuFilter();\r
@@ -140,66 +140,66 @@ Ext.extend(Ext.ux.grid.GridFilters, Ext.util.Observable, {
                        this.menu.menu = filter.menu;\r
                        this.menu.setChecked(filter.active, false);\r
                }\r
-               \r
+\r
                this.menu.setVisible(filter !== undefined);\r
                this.sep.setVisible(filter !== undefined);\r
        },\r
-       \r
+\r
        /** private **/\r
        onCheckChange: function(item, value){\r
                this.getMenuFilter().setActive(value);\r
        },\r
-       \r
+\r
        /** private **/\r
        onBeforeCheck: function(check, value){\r
                return !value || this.getMenuFilter().isActivatable();\r
        },\r
-       \r
+\r
        /** private **/\r
        onStateChange: function(event, filter){\r
     if(event == "serialize") return;\r
-    \r
+\r
                if(filter == this.getMenuFilter())\r
                        this.menu.setChecked(filter.active, false);\r
-                       \r
+\r
                if(this.autoReload || this.local)\r
                        this.deferredUpdate.delay(this.updateBuffer);\r
-               \r
+\r
                var view = this.grid.getView();\r
                this.updateColumnHeadings(view);\r
-                       \r
+\r
                this.grid.saveState();\r
-                       \r
+\r
                this.grid.fireEvent('filterupdate', this, filter);\r
        },\r
-       \r
+\r
        /** private **/\r
        onBeforeLoad: function(store, options){\r
     options.params = options.params || {};\r
-               this.cleanParams(options.params);               \r
+               this.cleanParams(options.params);\r
                var params = this.buildQuery(this.getFilterData());\r
                Ext.apply(options.params, params);\r
        },\r
-       \r
+\r
        /** private **/\r
        onRefresh: function(view){\r
                this.updateColumnHeadings(view);\r
        },\r
-       \r
+\r
        /** private **/\r
        getMenuFilter: function(){\r
                var view = this.grid.getView();\r
                if(!view || view.hdCtxIndex === undefined)\r
                        return null;\r
-               \r
+\r
                return this.filters.get(\r
                        view.cm.config[view.hdCtxIndex].dataIndex);\r
        },\r
-       \r
+\r
        /** private **/\r
        updateColumnHeadings: function(view){\r
                if(!view || !view.mainHd) return;\r
-               \r
+\r
                var hds = view.mainHd.select('td').removeClass(this.filterCls);\r
                for(var i=0, len=view.cm.config.length; i<len; i++){\r
                        var filter = this.getFilter(view.cm.config[i].dataIndex);\r
@@ -207,7 +207,7 @@ Ext.extend(Ext.ux.grid.GridFilters, Ext.util.Observable, {
                                hds.item(i).addClass(this.filterCls);\r
                }\r
        },\r
-       \r
+\r
        /** private **/\r
        reload: function(){\r
                if(this.local){\r
@@ -224,11 +224,11 @@ Ext.extend(Ext.ux.grid.GridFilters, Ext.util.Observable, {
                        store.reload();\r
                }\r
        },\r
-       \r
+\r
        /**\r
         * Method factory that generates a record validator for the filters active at the time\r
         * of invokation.\r
-        * \r
+        *\r
         * @private\r
         */\r
        getRecordFilter: function(){\r
@@ -236,38 +236,39 @@ Ext.extend(Ext.ux.grid.GridFilters, Ext.util.Observable, {
                this.filters.each(function(filter){\r
                        if(filter.active) f.push(filter);\r
                });\r
-               \r
-               var len = f.length;\r
+               var len = f.length, me = this;\r
                return function(record){\r
-                       for(var i=0; i<len; i++)\r
-                               if(!f[i].validateRecord(record))\r
+                       for(var i=0; i<len; i++) {\r
+                               if(!f[i].validateRecord(record)) {\r
                                        return false;\r
-                               \r
+                               }\r
+                       }\r
+\r
                        return true;\r
                };\r
        },\r
-       \r
+\r
        /**\r
         * Adds a filter to the collection.\r
-        * \r
+        *\r
         * @param {Object/Ext.ux.grid.filter.Filter} config A filter configuration or a filter object.\r
-        * \r
+        *\r
         * @return {Ext.ux.grid.filter.Filter} The existing or newly created filter object.\r
         */\r
        addFilter: function(config){\r
-               var filter = config.menu ? config : \r
+               var filter = config.menu ? config :\r
                                new (this.getFilterClass(config.type))(config);\r
                this.filters.add(filter);\r
-               \r
+\r
                Ext.util.Observable.capture(filter, this.onStateChange, this);\r
                return filter;\r
        },\r
-       \r
+\r
        /**\r
         * Returns a filter for the given dataIndex, if on exists.\r
-        * \r
+        *\r
         * @param {String} dataIndex The dataIndex of the desired filter object.\r
-        * \r
+        *\r
         * @return {Ext.ux.grid.filter.Filter}\r
         */\r
        getFilter: function(dataIndex){\r
@@ -287,7 +288,7 @@ Ext.extend(Ext.ux.grid.GridFilters, Ext.util.Observable, {
        getFilterData: function(){\r
                var filters = [],\r
                        fields  = this.grid.getStore().fields;\r
-               \r
+\r
                this.filters.each(function(f){\r
                        if(f.active){\r
                                var d = [].concat(f.serialize());\r
@@ -298,19 +299,19 @@ Ext.extend(Ext.ux.grid.GridFilters, Ext.util.Observable, {
                                        });\r
                        }\r
                });\r
-               \r
+\r
                return filters;\r
        },\r
-       \r
+\r
        /**\r
         * Function to take structured filter data and 'flatten' it into query parameteres. The default function\r
         * will produce a query string of the form:\r
         *              filters[0][field]=dataIndex&filters[0][data][param1]=param&filters[0][data][param2]=param...\r
-        * \r
+        *\r
         * @param {Array} filters A collection of objects representing active filters and their configuration.\r
         *        Each element will take the form of {field: dataIndex, data: filterConf}. dataIndex is not assured\r
         *    to be unique as any one filter may be a composite of more basic filters for the same dataIndex.\r
-        * \r
+        *\r
         * @return {Object} Query keys and values\r
         */\r
        buildQuery: function(filters){\r
@@ -319,18 +320,18 @@ Ext.extend(Ext.ux.grid.GridFilters, Ext.util.Observable, {
                        var f    = filters[i];\r
                        var root = [this.paramPrefix, '[', i, ']'].join('');\r
                        p[root + '[field]'] = f.field;\r
-                       \r
+\r
                        var dataPrefix = root + '[data]';\r
                        for(var key in f.data)\r
                                p[[dataPrefix, '[', key, ']'].join('')] = f.data[key];\r
                }\r
-               \r
+\r
                return p;\r
        },\r
-       \r
+\r
        /**\r
         * Removes filter related query parameters from the provided object.\r
-        * \r
+        *\r
         * @param {Object} p Query parameters that may contain filter related fields.\r
         */\r
        cleanParams: function(p){\r
@@ -339,13 +340,13 @@ Ext.extend(Ext.ux.grid.GridFilters, Ext.util.Observable, {
                        if(regex.test(key))\r
                                delete p[key];\r
        },\r
-       \r
+\r
        /**\r
         * Function for locating filter classes, overwrite this with your favorite\r
         * loader to provide dynamic filter loading.\r
-        * \r
+        *\r
         * @param {String} type The type of filter to load.\r
-        * \r
+        *\r
         * @return {Class}\r
         */\r
        getFilterClass: function(type){\r
diff --git a/typo3/sysext/em/res/js/ux/jslint.js b/typo3/sysext/em/res/js/ux/jslint.js
new file mode 100644 (file)
index 0000000..15576ab
--- /dev/null
@@ -0,0 +1,5368 @@
+// jslint.js
+// 2009-08-31
+
+/*
+Copyright (c) 2002 Douglas Crockford  (www.JSLint.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+/*
+    JSLINT is a global function. It takes two parameters.
+
+        var myResult = JSLINT(source, option);
+
+    The first parameter is either a string or an array of strings. If it is a
+    string, it will be split on '\n' or '\r'. If it is an array of strings, it
+    is assumed that each string represents one line. The source can be a
+    JavaScript text, or HTML text, or a Konfabulator text.
+
+    The second parameter is an optional object of options which control the
+    operation of JSLINT. Most of the options are booleans: They are all are
+    optional and have a default value of false.
+
+    If it checks out, JSLINT returns true. Otherwise, it returns false.
+
+    If false, you can inspect JSLINT.errors to find out the problems.
+    JSLINT.errors is an array of objects containing these members:
+
+    {
+        line      : The line (relative to 0) at which the lint was found
+        character : The character (relative to 0) at which the lint was found
+        reason    : The problem
+        evidence  : The text line in which the problem occurred
+        raw       : The raw message before the details were inserted
+        a         : The first detail
+        b         : The second detail
+        c         : The third detail
+        d         : The fourth detail
+    }
+
+    If a fatal error was found, a null will be the last element of the
+    JSLINT.errors array.
+
+    You can request a Function Report, which shows all of the functions
+    and the parameters and vars that they use. This can be used to find
+    implied global variables and other problems. The report is in HTML and
+    can be inserted in an HTML <body>.
+
+        var myReport = JSLINT.report(limited);
+
+    If limited is true, then the report will be limited to only errors.
+
+    You can request a data structure which contains JSLint's results.
+
+        var myData = JSLINT.data();
+
+    It returns a structure with this form:
+
+    {
+        errors: [
+            {
+                line: NUMBER,
+                character: NUMBER,
+                reason: STRING,
+                evidence: STRING
+            }
+        ],
+        functions: [
+            name: STRING,
+            line: NUMBER,
+            last: NUMBER,
+            param: [
+                STRING
+            ],
+            closure: [
+                STRING
+            ],
+            var: [
+                STRING
+            ],
+            exception: [
+                STRING
+            ],
+            outer: [
+                STRING
+            ],
+            unused: [
+                STRING
+            ],
+            global: [
+                STRING
+            ],
+            label: [
+                STRING
+            ]
+        ],
+        globals: [
+            STRING
+        ],
+        member: {
+            STRING: NUMBER
+        },
+        unuseds: [
+            {
+                name: STRING,
+                line: NUMBER
+            }
+        ],
+        implieds: [
+            {
+                name: STRING,
+                line: NUMBER
+            }
+        ],
+        urls: [
+            STRING
+        ],
+        json: BOOLEAN
+    }
+
+    Empty arrays will not be included.
+
+*/
+
+/*jslint
+    evil: true, nomen: false, onevar: false, regexp: false, strict: true
+*/
+
+/*members "\b", "\t", "\n", "\f", "\r", "\"", "%", "(begin)",
+    "(breakage)", "(context)", "(error)", "(global)", "(identifier)",
+    "(last)", "(line)", "(loopage)", "(name)", "(onevar)", "(params)",
+    "(scope)", "(verb)", "++", "--", "\/", ADSAFE, Array, Boolean, COM,
+    Canvas, CustomAnimation, Date, Debug, E, Error, EvalError,
+    FadeAnimation, Flash, FormField, Frame, Function, HotKey, Image, JSON,
+    LN10, LN2, LOG10E, LOG2E, MAX_VALUE, MIN_VALUE, Math, MenuItem,
+    MoveAnimation, NEGATIVE_INFINITY, Number, Object, Option, PI,
+    POSITIVE_INFINITY, Point, RangeError, Rectangle, ReferenceError, RegExp,
+    ResizeAnimation, RotateAnimation, SQRT1_2, SQRT2, ScrollBar, String,
+    Style, SyntaxError, System, Text, TextArea, Timer, TypeError, URIError,
+    URL, Web, Window, XMLDOM, XMLHttpRequest, "\\", a, abbr, acronym,
+    addEventListener, address, adsafe, alert, aliceblue, animator,
+    antiquewhite, appleScript, applet, apply, approved, aqua, aquamarine,
+    area, arguments, arity, autocomplete, azure, b, background,
+    "background-attachment", "background-color", "background-image",
+    "background-position", "background-repeat", base, bdo, beep, beige, big,
+    bisque, bitwise, black, blanchedalmond, block, blockquote, blue,
+    blueviolet, blur, body, border, "border-bottom", "border-bottom-color",
+    "border-bottom-style", "border-bottom-width", "border-collapse",
+    "border-color", "border-left", "border-left-color", "border-left-style",
+    "border-left-width", "border-right", "border-right-color",
+    "border-right-style", "border-right-width", "border-spacing",
+    "border-style", "border-top", "border-top-color", "border-top-style",
+    "border-top-width", "border-width", bottom, br, brown, browser,
+    burlywood, button, bytesToUIString, c, cadetblue, call, callee, caller,
+    canvas, cap, caption, "caption-side", cases, center, charAt, charCodeAt,
+    character, chartreuse, chocolate, chooseColor, chooseFile, chooseFolder,
+    cite, clear, clearInterval, clearTimeout, clip, close, closeWidget,
+    closed, closure, cm, code, col, colgroup, color, comment, condition,
+    confirm, console, constructor, content, convertPathToHFS,
+    convertPathToPlatform, coral, cornflowerblue, cornsilk,
+    "counter-increment", "counter-reset", create, crimson, css, cursor,
+    cyan, d, darkblue, darkcyan, darkgoldenrod, darkgray, darkgreen,
+    darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred,
+    darksalmon, darkseagreen, darkslateblue, darkslategray, darkturquoise,
+    darkviolet, data, dd, debug, decodeURI, decodeURIComponent, deeppink,
+    deepskyblue, defaultStatus, defineClass, del, deserialize, dfn,
+    dimension, dimgray, dir, direction, display, div, dl, document,
+    dodgerblue, dt, edition, else, em, embed, empty, "empty-cells",
+    encodeURI, encodeURIComponent, entityify, eqeqeq, errors, escape, eval,
+    event, evidence, evil, ex, exception, exec, exps, fieldset, filesystem,
+    firebrick, first, float, floor, floralwhite, focus, focusWidget, font,
+    "font-face", "font-family", "font-size", "font-size-adjust",
+    "font-stretch", "font-style", "font-variant", "font-weight",
+    forestgreen, forin, form, fragment, frame, frames, frameset, from,
+    fromCharCode, fuchsia, fud, funct, function, functions, g, gainsboro,
+    gc, getComputedStyle, ghostwhite, global, globals, gold, goldenrod,
+    gray, green, greenyellow, h1, h2, h3, h4, h5, h6, hasOwnProperty, head,
+    height, help, history, honeydew, hotpink, hr, html, i, iTunes, id,
+    identifier, iframe, img, immed, implieds, import, in, include, indent,
+    indexOf, indianred, indigo, init, input, ins, isAlpha,
+    isApplicationRunning, isDigit, isFinite, isNaN, ivory, join, jslint,
+    json, kbd, khaki, konfabulatorVersion, label, labelled, lang, last,
+    lavender, lavenderblush, lawngreen, laxbreak, lbp, led, left, legend,
+    lemonchiffon, length, "letter-spacing", li, lib, lightblue, lightcoral,
+    lightcyan, lightgoldenrodyellow, lightgreen, lightpink, lightsalmon,
+    lightseagreen, lightskyblue, lightslategray, lightsteelblue,
+    lightyellow, lime, limegreen, line, "line-height", linen, link,
+    "list-style", "list-style-image", "list-style-position",
+    "list-style-type", load, loadClass, location, log, m, magenta, map,
+    margin, "margin-bottom", "margin-left", "margin-right", "margin-top",
+    "marker-offset", maroon, match, "max-height", "max-width", maxerr, md5,
+    media, mediumaquamarine, mediumblue, mediumorchid, mediumpurple,
+    mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise,
+    mediumvioletred, member, menu, message, meta, midnightblue,
+    "min-height", "min-width", mintcream, mistyrose, mm, moccasin, moveBy,
+    moveTo, name, navajowhite, navigator, navy, new, newcap, noframes,
+    nomen, noscript, nud, object, ol, oldlace, olive, olivedrab, on,
+    onbeforeunload, onblur, onerror, onevar, onfocus, onload, onresize,
+    onunload, opacity, open, openURL, opener, opera, optgroup, option,
+    orange, orangered, orchid, outer, outline, "outline-color",
+    "outline-style", "outline-width", overflow, "overflow-x", "overflow-y",
+    p, padding, "padding-bottom", "padding-left", "padding-right",
+    "padding-top", page, "page-break-after", "page-break-before",
+    palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip,
+    param, parent, parseFloat, parseInt, passfail, pc, peachpuff, peru,
+    pink, play, plum, plusplus, pop, popupMenu, position, powderblue, pre,
+    predef, preferenceGroups, preferences, print, prompt, prototype, pt,
+    purple, push, px, q, quit, quotes, random, range, raw, reach, readFile,
+    readUrl, reason, red, regexp, reloadWidget, removeEventListener,
+    replace, report, reserved, resizeBy, resizeTo, resolvePath,
+    resumeUpdates, rhino, right, rosybrown, royalblue, runCommand,
+    runCommandInBg, saddlebrown, safe, salmon, samp, sandybrown, saveAs,
+    savePreferences, screen, script, scroll, scrollBy, scrollTo, seagreen,
+    seal, search, seashell, select, serialize, setInterval, setTimeout,
+    shift, showWidgetPreferences, sidebar, sienna, silver, skyblue,
+    slateblue, slategray, sleep, slice, small, snow, sort, span, spawn,
+    speak, split, springgreen, src, status, steelblue, strict, strong,
+    style, styleproperty, sub, substr, sup, supplant, suppressUpdates, sync,
+    system, table, "table-layout", tan, tbody, td, teal, tellWidget, test,
+    "text-align", "text-decoration", "text-indent", "text-shadow",
+    "text-transform", textarea, tfoot, th, thead, thistle, title,
+    toLowerCase, toString, toUpperCase, toint32, token, tomato, top, tr, tt,
+    turquoise, type, u, ul, undef, unescape, "unicode-bidi", unused,
+    unwatch, updateNow, urls, value, valueOf, var, version,
+    "vertical-align", violet, visibility, watch, wheat, white,
+    "white-space", whitesmoke, widget, width, "word-spacing", "word-wrap",
+    yahooCheckLogin, yahooLogin, yahooLogout, yellow, yellowgreen,
+    "z-index"
+*/
+
+
+
+// We build the application inside a function so that we produce only a single
+// global variable. The function will be invoked, its return value is the JSLINT
+// application itself.
+
+"use strict";
+
+var JSLINT = (function () {
+    var adsafe_id,      // The widget's ADsafe id.
+        adsafe_may,     // The widget may load approved scripts.
+        adsafe_went,    // ADSAFE.go has been called.
+        anonname,       // The guessed name for anonymous functions.
+        approved,       // ADsafe approved urls.
+
+        atrule = {
+            media      : true,
+            'font-face': true,
+            page       : true
+        },
+
+// These are members that should not be permitted in the safe subset.
+
+        banned = {              // the member names that ADsafe prohibits.
+            'arguments'     : true,
+            callee          : true,
+            caller          : true,
+            constructor     : true,
+            'eval'          : true,
+            prototype       : true,
+            unwatch         : true,
+            valueOf         : true,
+            watch           : true
+        },
+
+
+// These are the JSLint boolean options.
+
+        boolOptions = {
+            adsafe     : true, // if ADsafe should be enforced
+            bitwise    : true, // if bitwise operators should not be allowed
+            browser    : true, // if the standard browser globals should be predefined
+            cap        : true, // if upper case HTML should be allowed
+            css        : true, // if CSS workarounds should be tolerated
+            debug      : true, // if debugger statements should be allowed
+            eqeqeq     : true, // if === should be required
+            evil       : true, // if eval should be allowed
+            forin      : true, // if for in statements must filter
+            fragment   : true, // if HTML fragments should be allowed
+            immed      : true, // if immediate invocations must be wrapped in parens
+            laxbreak   : true, // if line breaks should not be checked
+            newcap     : true, // if constructor names must be capitalized
+            nomen      : true, // if names should be checked
+            on         : true, // if HTML event handlers should be allowed
+            onevar     : true, // if only one var statement per function should be allowed
+            passfail   : true, // if the scan should stop on first error
+            plusplus   : true, // if increment/decrement should not be allowed
+            regexp     : true, // if the . should not be allowed in regexp literals
+            rhino      : true, // if the Rhino environment globals should be predefined
+            undef      : true, // if variables should be declared before used
+            safe       : true, // if use of some browser features should be restricted
+            sidebar    : true, // if the System object should be predefined
+            strict     : true, // require the "use strict"; pragma
+            sub        : true, // if all forms of subscript notation are tolerated
+            white      : true, // if strict whitespace rules apply
+            widget     : true  // if the Yahoo Widgets globals should be predefined
+        },
+
+// browser contains a set of global names which are commonly provided by a
+// web browser environment.
+
+        browser = {
+            addEventListener: false,
+            alert           : false,
+            blur            : false,
+            clearInterval   : false,
+            clearTimeout    : false,
+            close           : false,
+            closed          : false,
+            confirm         : false,
+            console         : false,
+            Debug           : false,
+            defaultStatus   : false,
+            document        : false,
+            event           : false,
+            focus           : false,
+            frames          : false,
+            getComputedStyle: false,
+            history         : false,
+            Image           : false,
+            length          : false,
+            location        : false,
+            moveBy          : false,
+            moveTo          : false,
+            name            : false,
+            navigator       : false,
+            onbeforeunload  : true,
+            onblur          : true,
+            onerror         : true,
+            onfocus         : true,
+            onload          : true,
+            onresize        : true,
+            onunload        : true,
+            open            : false,
+            opener          : false,
+            opera           : false,
+            Option          : false,
+            parent          : false,
+            print           : false,
+            prompt          : false,
+            removeEventListener: false,
+            resizeBy        : false,
+            resizeTo        : false,
+            screen          : false,
+            scroll          : false,
+            scrollBy        : false,
+            scrollTo        : false,
+            setInterval     : false,
+            setTimeout      : false,
+            status          : false,
+            top             : false,
+            XMLHttpRequest  : false
+        },
+
+        cssAttributeData,
+        cssAny,
+
+        cssColorData = {
+            "aliceblue"             : true,
+            "antiquewhite"          : true,
+            "aqua"                  : true,
+            "aquamarine"            : true,
+            "azure"                 : true,
+            "beige"                 : true,
+            "bisque"                : true,
+            "black"                 : true,
+            "blanchedalmond"        : true,
+            "blue"                  : true,
+            "blueviolet"            : true,
+            "brown"                 : true,
+            "burlywood"             : true,
+            "cadetblue"             : true,
+            "chartreuse"            : true,
+            "chocolate"             : true,
+            "coral"                 : true,
+            "cornflowerblue"        : true,
+            "cornsilk"              : true,
+            "crimson"               : true,
+            "cyan"                  : true,
+            "darkblue"              : true,
+            "darkcyan"              : true,
+            "darkgoldenrod"         : true,
+            "darkgray"              : true,
+            "darkgreen"             : true,
+            "darkkhaki"             : true,
+            "darkmagenta"           : true,
+            "darkolivegreen"        : true,
+            "darkorange"            : true,
+            "darkorchid"            : true,
+            "darkred"               : true,
+            "darksalmon"            : true,
+            "darkseagreen"          : true,
+            "darkslateblue"         : true,
+            "darkslategray"         : true,
+            "darkturquoise"         : true,
+            "darkviolet"            : true,
+            "deeppink"              : true,
+            "deepskyblue"           : true,
+            "dimgray"               : true,
+            "dodgerblue"            : true,
+            "firebrick"             : true,
+            "floralwhite"           : true,
+            "forestgreen"           : true,
+            "fuchsia"               : true,
+            "gainsboro"             : true,
+            "ghostwhite"            : true,
+            "gold"                  : true,
+            "goldenrod"             : true,
+            "gray"                  : true,
+            "green"                 : true,
+            "greenyellow"           : true,
+            "honeydew"              : true,
+            "hotpink"               : true,
+            "indianred"             : true,
+            "indigo"                : true,
+            "ivory"                 : true,
+            "khaki"                 : true,
+            "lavender"              : true,
+            "lavenderblush"         : true,
+            "lawngreen"             : true,
+            "lemonchiffon"          : true,
+            "lightblue"             : true,
+            "lightcoral"            : true,
+            "lightcyan"             : true,
+            "lightgoldenrodyellow"  : true,
+            "lightgreen"            : true,
+            "lightpink"             : true,
+            "lightsalmon"           : true,
+            "lightseagreen"         : true,
+            "lightskyblue"          : true,
+            "lightslategray"        : true,
+            "lightsteelblue"        : true,
+            "lightyellow"           : true,
+            "lime"                  : true,
+            "limegreen"             : true,
+            "linen"                 : true,
+            "magenta"               : true,
+            "maroon"                : true,
+            "mediumaquamarine"      : true,
+            "mediumblue"            : true,
+            "mediumorchid"          : true,
+            "mediumpurple"          : true,
+            "mediumseagreen"        : true,
+            "mediumslateblue"       : true,
+            "mediumspringgreen"     : true,
+            "mediumturquoise"       : true,
+            "mediumvioletred"       : true,
+            "midnightblue"          : true,
+            "mintcream"             : true,
+            "mistyrose"             : true,
+            "moccasin"              : true,
+            "navajowhite"           : true,
+            "navy"                  : true,
+            "oldlace"               : true,
+            "olive"                 : true,
+            "olivedrab"             : true,
+            "orange"                : true,
+            "orangered"             : true,
+            "orchid"                : true,
+            "palegoldenrod"         : true,
+            "palegreen"             : true,
+            "paleturquoise"         : true,
+            "palevioletred"         : true,
+            "papayawhip"            : true,
+            "peachpuff"             : true,
+            "peru"                  : true,
+            "pink"                  : true,
+            "plum"                  : true,
+            "powderblue"            : true,
+            "purple"                : true,
+            "red"                   : true,
+            "rosybrown"             : true,
+            "royalblue"             : true,
+            "saddlebrown"           : true,
+            "salmon"                : true,
+            "sandybrown"            : true,
+            "seagreen"              : true,
+            "seashell"              : true,
+            "sienna"                : true,
+            "silver"                : true,
+            "skyblue"               : true,
+            "slateblue"             : true,
+            "slategray"             : true,
+            "snow"                  : true,
+            "springgreen"           : true,
+            "steelblue"             : true,
+            "tan"                   : true,
+            "teal"                  : true,
+            "thistle"               : true,
+            "tomato"                : true,
+            "turquoise"             : true,
+            "violet"                : true,
+            "wheat"                 : true,
+            "white"                 : true,
+            "whitesmoke"            : true,
+            "yellow"                : true,
+            "yellowgreen"           : true
+        },
+
+        cssBorderSty