Merge of extension manager for RC1
authorSteffen Kamper <info@sk-typo3.de>
Tue, 25 Jan 2011 02:11:12 +0000 (02:11 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Tue, 25 Jan 2011 02:11:12 +0000 (02:11 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10293 709f56b5-9817-0410-a4d7-c38de5d9e867

16 files changed:
ChangeLog
typo3/sysext/em/classes/class.tx_em_extensionmanager.php
typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectserver.php
typo3/sysext/em/classes/extensions/class.tx_em_extensions_list.php
typo3/sysext/em/classes/index.php
typo3/sysext/em/classes/install/class.tx_em_install.php
typo3/sysext/em/ext_emconf.php
typo3/sysext/em/language/locallang.xml
typo3/sysext/em/res/css/t3_em.css
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_locallist.js
typo3/sysext/em/res/js/em_repositorylist.js
typo3/sysext/em/res/js/em_tools.js
typo3/sysext/em/res/js/ux/searchfield.js

index 3b9fbe4..3d5edad 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,7 @@
 
 2011-01-24  Steffen Kamper  <steffen@typo3.org>
 
+       * Merge of extension manager for RC1
        * Fixed bug #17275: Pagetree preloads huge amount of pages with initial load / refresh
        * Follow-up to #17222: in case of render outside the BE set default value
        * Fixed bug #17222: fitToParent calculates wrong height
index 5a0e65c..3e1e321 100644 (file)
@@ -179,6 +179,7 @@ class tx_em_ExtensionManager {
                        'inlineToWindow' => $globalSettings['inlineToWindow'],
                        'allowRepositoryUpdate' => $allowRepositoryUpdate,
                        'displayMyExtensions' => $globalSettings['displayMyExtensions'],
+                       'fileSaveAllowed' => $GLOBALS['TYPO3_CONF_VARS']['EXT']['noEdit'] == 0
                );
                $settings = array_merge($settings, $additionalSettings);
 
index 357c260..2377330 100644 (file)
@@ -293,7 +293,7 @@ class tx_em_Connection_ExtDirectServer {
                $install->INSTALL = $parameter['TYPO3_INSTALL'];
                $install->checkDBupdates($extKey, $list[$extKey]);
 
-
+               $html = '';
                if ($noSave) {
                        $html = $install->updatesForm($extKey, $list[$extKey], 1);
                } else {
@@ -331,6 +331,41 @@ class tx_em_Connection_ExtDirectServer {
        }
 
        /**
+        * Delete extension
+        *
+        * @param  $extKey
+        * @return array
+        */
+       public function deleteExtension($extKey) {
+
+               /** @var $extensionList tx_em_Extensions_List */
+               $extensionList = t3lib_div::makeInstance('tx_em_Extensions_List', $this);
+               list($list,) = $extensionList->getInstalledExtensions();
+               $type = $list[$extKey]['type'];
+               $absPath = tx_em_Tools::getExtPath($extKey, $type);
+
+               /** @var $extensionDetails tx_em_Install */
+               $install = t3lib_div::makeInstance('tx_em_Install');
+               $install->setSilentMode(TRUE);
+
+               $res = $install->removeExtDirectory($absPath);
+               $error = '';
+               $success = TRUE;
+
+               if ($res) {
+                       $res = nl2br($res);
+                       $error = sprintf($GLOBALS['LANG']->getLL('extDelete_remove_dir_failed'), $absPath);
+                       $success = FALSE;
+               }
+               return array(
+                       'success' => $success,
+                       'extkey' => $extKey,
+                       'result' => $res,
+                       'error' => $error
+               );
+       }
+
+       /**
         * genereates a file tree
         *
         * @param object $parameter
@@ -367,22 +402,44 @@ class tx_em_Connection_ExtDirectServer {
                        }
                }
 
-
+               $unknownType = $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_file_unknownType');
+               $imageType = $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_file_imageType');
+               $textType = $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_file_textType');
+               $extType = $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_file_extType');
                foreach ($files as $key => $file) {
-                       $fileExt = strtolower(substr($file, strrpos($file, '.') + 1));
-                       if (in_array($fileExt, $imageTypes) || in_array($fileExt, $editTypes)) {
+                       $fileExt = '';
+                       $type = '';
+                       $cls = t3lib_iconWorks::mapFileExtensionToSpriteIconClass('');
+                       if (strrpos($file, '.') !== FALSE) {
+                               $fileExt = strtolower(substr($file, strrpos($file, '.') + 1));
+                       }
+
+                       if ($fileExt && in_array($fileExt, $imageTypes) || in_array($fileExt, $editTypes)) {
                                $cls = t3lib_iconWorks::mapFileExtensionToSpriteIconClass($fileExt);
                                $type = in_array($fileExt, $imageTypes) ? 'image' : 'text';
-                       } else {
-                               $cls = t3lib_iconWorks::mapFileExtensionToSpriteIconClass('');
+                       }
 
+                       if (t3lib_div::strtolower($file) === 'changelog') {
+                               $cls = t3lib_iconWorks::mapFileExtensionToSpriteIconClass('txt');
+                               $type = 'text';
+                       }
+
+                       switch($type) {
+                               CASE 'image':
+                                       $label = $imageType;
+                               break;
+                               CASE 'text':
+                                       $label = $textType;
+                               break;
+                               default:
+                                       $label = $fileExt ? sprintf($extType, $fileExt) : $unknownType;
                        }
 
                        $fileArray[] = array(
                                'id' => $node . '/' . $file,
                                'text' => htmlspecialchars($file),
                                'leaf' => true,
-                               'qtip' => $fileExt . ' - file',
+                               'qtip' => $label,
                                'iconCls' => $cls,
                                'fileType' => $type,
                                'ext' => $fileExt
@@ -417,15 +474,23 @@ class tx_em_Connection_ExtDirectServer {
        public function saveExtFile($file, $content) {
                $path = PATH_site . $file;
                $error = '';
-               if (@file_exists($path)) {
-                       //TODO: save only if saving was enabled
-                       $done = t3lib_div::writeFile($path, $content);
+               $fileSaveAllowed = $GLOBALS['TYPO3_CONF_VARS']['EXT']['noEdit'] == 0;
+               $fileExists = @file_exists($path);
+               $fileSaveable = is_writable($path);
+
+               if ($fileExists && $fileSaveable && $fileSaveAllowed) {
+                       $success = t3lib_div::writeFile($path, $content);
                } else {
-                       $done = FALSE;
-                       $error = 'File does not exist!';
+                       $success = FALSE;
+                       $error = $fileSaveAllowed
+                                       ? ($fileSaveable
+                                                       ? $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_fileNotExists', TRUE)
+                                                       : $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_fileWriteProtected', TRUE)
+                                       )
+                                       : $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_saving_disabled', TRUE);
                }
                return array(
-                       'success' => $done,
+                       'success' => $success,
                        'path' => $path,
                        'file' => basename($path),
                        'content' => $content,
@@ -583,10 +648,14 @@ class tx_em_Connection_ExtDirectServer {
                        }
 
                        // Delete
-                       $lines[] = '<tr class="t3-row-header"><td colspan="2">' .
-                                       $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_delete') . '</td></tr>';
-                       $lines[] = '<tr class="bgColor4"><td colspan="2">' . $install->extDelete($extKey, $list[$extKey], '') . '</td></tr>';
-
+                       if (!t3lib_extMgm::isLoaded($extKey)) {
+                                       // check ext scope
+                               if (tx_em_Tools::deleteAsType($list[$extKey]['type']) && t3lib_div::inList('G,L', $list[$extKey]['type'])) {
+                                       $lines[] = '<tr class="t3-row-header"><td colspan="2">' .
+                                                       $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_delete') . '</td></tr>';
+                                       $lines[] = '<tr class="bgColor4"><td colspan="2">' . $install->extDelete($extKey, $list[$extKey], '') . '</td></tr>';
+                               }
+                       }
                        // EM_CONF
                        $lines[] = '<tr class="t3-row-header"><td colspan="2">' .
                                        $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_update_em_conf') . '</td></tr>';
@@ -737,11 +806,13 @@ class tx_em_Connection_ExtDirectServer {
                        $list['results'][$key]['exists'] = 0;
                        $list['results'][$key]['installed'] = 0;
                        $list['results'][$key]['versionislower'] = 0;
+                       $list['results'][$key]['existingVersion'] = '';
                        if (isset($localList[$value['extkey']])) {
                                $isUpdatable = ($localList[$value['extkey']]['intversion'] < $value['maxintversion']);
                                $list['results'][$key]['exists'] = 1;
                                $list['results'][$key]['installed'] = $localList[$value['extkey']]['installed'];
                                $list['results'][$key]['versionislower'] = $isUpdatable;
+                               $list['results'][$key]['existingVersion'] =  $localList[$value['extkey']]['version'];
                                if ($isUpdatable) {
                                        $updateKeys[] = $key;
                                }
index 54cc53e..af85ad4 100644 (file)
@@ -636,7 +636,7 @@ EXTENSION KEYS:
                global $LANG;
                $extList = $this->getInstalledExtensions();
 
-               $content = '<table cellspacing="1" class="t3-em-extension-list t3-em-extension-list-to-update">>' .
+               $content = '<table cellspacing="1" class="t3-em-extension-list t3-em-extension-list-to-update">' .
                                '<tr class="t3-row-header">' .
                                '<td></td>' .
                                '<td>' . $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:tab_mod_name') . '</td>' .
index a5492d5..b122d1c 100644 (file)
@@ -185,6 +185,8 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
        var $lookUpStr; // Search string when listing local extensions
 
 
+       protected $noDocHeader = 0;
+
        /*********************************
         *
         * Standard module initialization
@@ -250,7 +252,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                $this->settings = t3lib_div::makeInstance('tx_em_Settings');
                $this->install = t3lib_div::makeInstance('tx_em_Install', $this);
 
-               if (t3lib_div::_GP('silentMode')) {
+               if (t3lib_div::_GP('silentMode') || $this->noDocHeader) {
                        $this->CMD['silentMode'] = 1;
                        $this->noDocHeader = 1;
                }
@@ -1470,6 +1472,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                                if (t3lib_extMgm::isLocalconfWritable()) {
                                        // Check dependencies:
                                        $depStatus = $this->install->checkDependencies($extKey, $list[$extKey]['EM_CONF'], $list);
+
                                        if (!$this->CMD['remove'] && !$depStatus['returnCode']) {
                                                $this->content .= $depStatus['html'];
                                                $newExtList = -1;
@@ -1532,7 +1535,8 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                                                        }
                                                } elseif ($this->CMD['remove']) {
                                                        $updates .= $this->install->checkClearCache($list[$extKey]);
-                                                       if ($updates) {
+
+                                                       if ($updates && !$this->noDocHeader) {
                                                                $updates = '
                                                                <form action="' . $this->script . '" method="post">' . $updates . '
                                                                <br /><input type="submit" name="write" value="' .
@@ -1541,7 +1545,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                                                                <input type="hidden" name="_clrCmd" value="' . $this->CMD['clrCmd'] . '" />
                                                                <input type="hidden" name="standAlone" value="' . $this->CMD['standAlone'] . '" />
                                                                <input type="hidden" name="silentMode" value="' . $this->CMD['silentMode'] . '" />
-
+                                                               ' . ($this->noDocHeader ? '<input type="hidden" name="nodoc" value="1" />' : '') . '
                                                                </form>';
                                                                $labelDBUpdate = $GLOBALS['LANG']->csConvObj->conv_case(
                                                                        $GLOBALS['LANG']->charSet,
@@ -1557,7 +1561,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                                                                );
                                                        }
                                                }
-                                               if (!$updates || t3lib_div::_GP('_do_install')) {
+                                               if (!$updates || t3lib_div::_GP('_do_install') || ($this->noDocHeader && $this->CMD['remove'])) {
                                                        $this->install->writeNewExtensionList($newExtList);
                                                        $action = $this->CMD['load'] ? 'installed' : 'removed';
                                                        $GLOBALS['BE_USER']->writelog(5, 1, 0, 0, 'Extension list has been changed, extension %s has been %s', array($extKey, $action));
@@ -1582,6 +1586,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                                                        } else {
                                                                $vA = array('CMD' => array('showExt' => $extKey));
                                                        }
+
                                                        if ($this->CMD['standAlone'] || t3lib_div::_GP('standAlone')) {
                                                                $this->content .= sprintf($GLOBALS['LANG']->getLL('ext_details_ext_installed_removed'),
                                                                        ($this->CMD['load'] ?
@@ -1772,7 +1777,6 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
 
                                                if (t3lib_extMgm::isLoaded($extKey)) {
                                                        $updates = $this->install->updatesForm($extKey, $list[$extKey]);
-                                                       debug(array($extKey, $list[$extKey]));
                                                        if ($updates) {
                                                                $this->content .= $this->doc->spacer(10);
                                                                $this->content .= $this->doc->section(
@@ -2501,7 +2505,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
         * @return string
         */
        protected function getSubmitAndOpenerCloseLink() {
-               if (!$this->CMD['standAlone'] && ($this->CMD['standAlone'] || t3lib_div::_GP('standAlone'))) {
+               if (!$this->CMD['standAlone'] && !$this->noDocHeader && ($this->CMD['standAlone'] || t3lib_div::_GP('standAlone'))) {
                        $link = '<a href="javascript:opener.top.list.iframe.document.forms[0].submit();window.close();">' .
                                $GLOBALS['LANG']->getLL('ext_import_close_check') . '</a>';
                        return $link;
index 4689e17..313ab78 100644 (file)
@@ -276,7 +276,7 @@ class tx_em_Install {
                                                                                        } else {
                                                                                                $content = $GLOBALS['LANG']->getLL('ext_import_imported') .
                                                                                                                '<br /><br />';
-                                                                                               if ($this->silentMode) {
+                                                                                               if ($this->silentMode || t3lib_div::_GP('nodoc')) {
                                                                                                        $content .= '<a id="closewindow" href="javascript:parent.TYPO3.EM.Tools.closeImportWindow();">' . $GLOBALS['LANG']->getLL('ext_import_close') . '</a>';
                                                                                                } else {
                                                                                                        $content .= '<a href="javascript:opener.top.list.iframe.document.forms[0].submit();window.close();">' .
@@ -548,6 +548,10 @@ class tx_em_Install {
                        }
                        $content .= '<br /><br /><input type="submit" value="' . $GLOBALS['LANG']->getLL('checkDependencies_try_again') . '" />';
 
+                       if (t3lib_div::_GP('nodoc')) {
+                               $content .= '<input type="hidden" name="nodoc" value="1" />';
+                       }
+
                        return array(
                                'returnCode' => FALSE,
                                'html' => '<form action="' . $this->parentObject->script . '" method="post" name="depform">' . $content . '</form>');
@@ -608,7 +612,7 @@ class tx_em_Install {
                                        'CMD[doDelete]' => 1,
                                        'CMD[absPath]' => rawurlencode($absPath)
                                )) . "';}";
-                               $content .= '<a class="t3-link" href="#" onclick="' . htmlspecialchars($onClick) .
+                               $content .= '<a class="t3-link deleteLink" href="#" onclick="' . htmlspecialchars($onClick) .
                                                ' return false;"><strong>' . $deleteFromServer . '</strong> ' .
                                                sprintf($GLOBALS['LANG']->getLL('extDelete_from_location'),
                                                        $this->api->typeLabels[$extInfo['type']],
@@ -1239,6 +1243,7 @@ class tx_em_Install {
                                        t3lib_FlashMessage::INFO
                                );
                        }
+
                        $form = '
                                <table border="0" cellpadding="0" cellspacing="0" width="600">
                                        <tr>
@@ -1246,6 +1251,7 @@ class tx_em_Install {
                                                        <form action="' . htmlspecialchars($script) . '" method="post">' .
                                        $addFields .
                                        ($this->silentMode ? '' : $flashMessage->render()) .
+                                       (t3lib_div::_GP('nodoc') ? '<input type="hidden" name="nodoc" value="1" />' : '') .
                                        '<br /><input type="submit" id="configuration-submit-' . $extKey . '" name="write" value="' . $GLOBALS['LANG']->getLL('updatesForm_make_updates') . '" />
                                                        </form>
                                                </td>
@@ -1253,12 +1259,8 @@ class tx_em_Install {
                                </table>';
                }
 
-               #if ($output) {
-               return $form;
-               #} else {
-               #       $this->content.=$this->doc->section('', $form);
-               #}
 
+               return $form;
 
        }
 
index 2088b5c..ff8c9ec 100644 (file)
@@ -3,7 +3,7 @@
 ########################################################################
 # Extension Manager/Repository config file for ext "em".
 #
-# Auto generated 22-01-2011 21:44
+# Auto generated 25-01-2011 03:05
 #
 # Manual updates:
 # Only the data in the array - everything else is removed by next
@@ -34,7 +34,7 @@ $EM_CONF[$_EXTKEY] = array(
        'CGLcompliance' => '',
        'CGLcompliance_note' => '',
        'version' => '4.5.0',
-       '_md5_values_when_last_written' => 'a:101:{s:16:"ext_autoload.php";s:4:"5d4e";s:21:"ext_conf_template.txt";s:4:"582d";s:12:"ext_icon.gif";s:4:"2cc2";s:17:"ext_localconf.php";s:4:"fd30";s:14:"ext_tables.php";s:4:"3d63";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:40:"classes/class.tx_em_extensionmanager.php";s:4:"9f41";s:16:"classes/conf.php";s:4:"d842";s:17:"classes/index.php";s:4:"afdb";s:61:"classes/connection/class.tx_em_connection_extdirectserver.php";s:4:"8e05";s:59:"classes/connection/class.tx_em_connection_extdirectsoap.php";s:4:"fda8";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:"1f3c";s:41:"classes/database/class.tx_em_database.php";s:4:"e5a0";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:"7b5a";s:50:"classes/extensions/class.tx_em_extensions_list.php";s:4:"f28c";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:"1642";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:"8f3c";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:"efb5";s:45:"classes/repository/class.tx_em_repository.php";s:4:"a953";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:"9c1d";s:55:"classes/tasks/class.tx_em_tasks_updateextensionlist.php";s:4:"b634";s:35:"classes/tools/class.tx_em_tools.php";s:4:"aacf";s:41:"classes/tools/class.tx_em_tools_unzip.php";s:4:"d183";s:46:"classes/tools/class.tx_em_tools_xmlhandler.php";s:4:"1bbd";s:49:"classes/translations/class.tx_em_translations.php";s:4:"935d";s:61:"interfaces/interface.tx_em_index_checkdatabaseupdateshook.php";s:4:"7178";s:22:"language/locallang.xml";s:4:"27ce";s:18:"res/css/editor.css";s:4:"d4a2";s:17:"res/css/t3_em.css";s:4:"0cb2";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:19:"res/icons/email.png";s:4:"af58";s:32:"res/icons/extension-required.png";s:4:"5619";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:23:"res/icons/repupdate.png";s:4:"eaa5";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:"53ec";s:23:"res/js/em_components.js";s:4:"608b";s:18:"res/js/em_files.js";s:4:"236b";s:22:"res/js/em_languages.js";s:4:"4b2f";s:20:"res/js/em_layouts.js";s:4:"6539";s:22:"res/js/em_locallist.js";s:4:"bc7c";s:27:"res/js/em_repositorylist.js";s:4:"2f2a";s:21:"res/js/em_settings.js";s:4:"0264";s:16:"res/js/em_ter.js";s:4:"b7bf";s:18:"res/js/em_tools.js";s:4:"b9b8";s:22:"res/js/em_usertools.js";s:4:"694b";s:33:"res/js/overrides/ext_overrides.js";s:4:"2a8d";s:24:"res/js/ux/GridFilters.js";s:4:"95db";s:29:"res/js/ux/RowPanelExpander.js";s:4:"d4dd";s:27:"res/js/ux/custom_plugins.js";s:4:"d761";s:28:"res/js/ux/fileuploadfield.js";s:4:"06a5";s:19:"res/js/ux/jslint.js";s:4:"8c75";s:24:"res/js/ux/searchfield.js";s:4:"1d2e";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";}',
+       '_md5_values_when_last_written' => 'a:101:{s:16:"ext_autoload.php";s:4:"5d4e";s:21:"ext_conf_template.txt";s:4:"582d";s:12:"ext_icon.gif";s:4:"2cc2";s:17:"ext_localconf.php";s:4:"fd30";s:14:"ext_tables.php";s:4:"3d63";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:40:"classes/class.tx_em_extensionmanager.php";s:4:"5dde";s:16:"classes/conf.php";s:4:"d842";s:17:"classes/index.php";s:4:"b36a";s:61:"classes/connection/class.tx_em_connection_extdirectserver.php";s:4:"5d3f";s:59:"classes/connection/class.tx_em_connection_extdirectsoap.php";s:4:"fda8";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:"1f3c";s:41:"classes/database/class.tx_em_database.php";s:4:"e5a0";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:"7b5a";s:50:"classes/extensions/class.tx_em_extensions_list.php";s:4:"294c";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:"a670";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:"8f3c";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:"efb5";s:45:"classes/repository/class.tx_em_repository.php";s:4:"a953";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:"9c1d";s:55:"classes/tasks/class.tx_em_tasks_updateextensionlist.php";s:4:"b634";s:35:"classes/tools/class.tx_em_tools.php";s:4:"aacf";s:41:"classes/tools/class.tx_em_tools_unzip.php";s:4:"d183";s:46:"classes/tools/class.tx_em_tools_xmlhandler.php";s:4:"1bbd";s:49:"classes/translations/class.tx_em_translations.php";s:4:"935d";s:61:"interfaces/interface.tx_em_index_checkdatabaseupdateshook.php";s:4:"7178";s:22:"language/locallang.xml";s:4:"f60c";s:18:"res/css/editor.css";s:4:"d4a2";s:17:"res/css/t3_em.css";s:4:"7897";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:19:"res/icons/email.png";s:4:"af58";s:32:"res/icons/extension-required.png";s:4:"5619";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:23:"res/icons/repupdate.png";s:4:"eaa5";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:"53ec";s:23:"res/js/em_components.js";s:4:"4b6a";s:18:"res/js/em_files.js";s:4:"0208";s:22:"res/js/em_languages.js";s:4:"be1f";s:20:"res/js/em_layouts.js";s:4:"6539";s:22:"res/js/em_locallist.js";s:4:"59bb";s:27:"res/js/em_repositorylist.js";s:4:"986c";s:21:"res/js/em_settings.js";s:4:"0264";s:16:"res/js/em_ter.js";s:4:"b7bf";s:18:"res/js/em_tools.js";s:4:"a420";s:22:"res/js/em_usertools.js";s:4:"694b";s:33:"res/js/overrides/ext_overrides.js";s:4:"2a8d";s:24:"res/js/ux/GridFilters.js";s:4:"95db";s:29:"res/js/ux/RowPanelExpander.js";s:4:"d4dd";s:27:"res/js/ux/custom_plugins.js";s:4:"d761";s:28:"res/js/ux/fileuploadfield.js";s:4:"06a5";s:19:"res/js/ux/jslint.js";s:4:"8c75";s:24:"res/js/ux/searchfield.js";s:4:"2f55";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 233c686..2baf037 100644 (file)
@@ -41,6 +41,7 @@
                        <label index="menu_install_extensions">Install extensions</label>
                        <label index="menu_import_extensions">Import extensions</label>
                        <label index="menu_update_extensions">Update extensions</label>
+                       <label index="menu_update_extension">Update extension from version {0} to version {1}</label>
                        <label index="menu_translation_handling">Translation handling</label>
                        <label index="menu_language_packges">Language Packages</label>
                        <label index="menu_settings">Settings</label>
@@ -63,7 +64,7 @@
                        <label index="details_info">Information</label>
                        <label index="details_edit">Edit files</label>
                        <label index="details_backup_delete">Backup/Delete</label>
-                       <label index="details_maintainance">Maintainance</label>
+                       <label index="details_maintenance">Maintenance</label>
                        <label index="details_dump_db">Dump Database</label>
                        <label index="details_upload">Upload to TER</label>
                        <label index="details_update">UPDATE!</label>
                        <label index="ext_details_saving_failed_changes_lost">Saving failed, the content was not correctly written to disk. Changes have been lost!</label>
                        <label index="ext_details_file_saved">File saved.</label>
                        <label index="ext_details_file_save_button">Save file</label>
-                       <label index="ext_details_saving_disabled">[SAVING IS DISABLED - It can be enabled with the $TYPO3_CONF_VARS['EXT']['noEdit'] flag]</label>
+                       <label index="ext_details_file_unknownType">Unknown file type</label>
+                       <label index="ext_details_file_imageType">Image</label>
+                       <label index="ext_details_file_textType">Text</label>
+                       <label index="ext_details_file_extType">%s - file</label>
+                       <label index="ext_details_saving_disabled">SAVING IS DISABLED - It can be enabled with the $TYPO3_CONF_VARS['EXT']['noEdit'] flag</label>
                        <label index="ext_details_cancel_button">Cancel</label>
                        <label index="ext_details_edit_file">Edit file:</label>
                        <label index="ext_details_filesize_exceeded_kb">File size exceeded %s KBytes</label>
                        <label index="checkDependencies_import_now">Import now (opens a new window)</label>
                        <label index="checkDependencies_ignore_ext_requirement">Ignore this extension requirement</label>
                        <label index="checkDependencies_ext_not_installed">Extension "%s" (%s) was not installed. Please install it first.</label>
-                       <label index="checkDependencies_install_now">Install now (opens a new window)</label>
+                       <label index="checkDependencies_install_now">Install now (opens ac new window)</label>
                        <label index="checkDependencies_ext_too_low">The running version of extension "%s" (%s) is lower than required (%s).</label>
                        <label index="checkDependencies_ext_too_high">The running version of extension "%s" (%s) is higher than allowed (%s).</label>
                        <label index="checkDependencies_conflict_ignored">Conflict with %s ignored as requested.</label>
                        <label index="msg_character">Character</label>
                        <label index="msg_developerinformation">Developer Information</label>
                        <label index="msg_fileSaved">File "{0}" was saved.</label>
+                       <label index="msg_fileNotExists">File does not exist!</label>
+                       <label index="msg_fileWriteProtected">File is write protected!</label>
                        <label index="msg_extUpToDate">Extension is up to date.</label>
                        <label index="msg_extNotInstalled">Extension "%s" is not installed.</label>
                        <label index="msg_extNoConfiguration">This extension has no configuration.</label>
                        <label index="msg_loginFailed">login failed!</label>
                        <label index="msg_noUserLoginData">No user login data!</label>
                        <label index="msg_ok">OK</label>
+                       <label index="msg_localVersion">Installed version is v{0}</label>
                        <label index="msg_userNotExists">User does not exist!</label>
                        <label index="msg_extkexExists">Extension key already exists.</label>
                        <label index="msg_extkexNotExists">Extension key does not exist.</label>
index 3990198..a633f6a 100644 (file)
@@ -30,6 +30,11 @@ strong {
        overflow: auto !important;
 }
 
+.x-grid-panel1 .x-panel-body,
+.extfiletree .x-panel-body {
+    overflow: auto !important;
+}
+
 
 /* extension states */
 .state-alpha div {background-color:#d12438;color:#fff !important;font-weight:bold !important;}
@@ -154,11 +159,16 @@ img.installExtension, img.removeExtension {
 }
 
 #em-local-extensions .x-grid3-row-selected,
-#em-extlanguagegrid .x-grid3-row-selected
-{
-       background-color: #cfffda;
+#em-extlanguagegrid .x-grid3-row-selected {
+       background-color: #d8ecd0;
+}
+
+#em-local-extensions .x-grid3-row-selected.x-grid3-row-over,
+#em-extlanguagegrid .x-grid3-row-selected.x-grid3-row-over {
+       background-color: #abd99a;
 }
 
+
 .em-extlist-extinfo label,
 .em-info label {
        vertical-align: top;
@@ -197,4 +207,9 @@ a.email {
 
 .paddingActionIcon img {
        margin-right: 5px;
+}
+
+.filteringList-highlight {
+       background-color: #f48e0c;
+    color: #fff;
 }
\ No newline at end of file
index 9f88ea5..0b8e437 100644 (file)
@@ -39,27 +39,34 @@ Ext.ns('TYPO3.EM', 'TYPO3.EM.GridColumns', 'TYPO3.EM.ExtDirect', 'TYPO3.EMSOAP.E
 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',
-               dataIndex: 'category'
-               }, {
-               type: 'list',
-               dataIndex: 'state',
-               options: ['alpha', 'beta', 'stable', 'experimental', 'test', 'obsolete', 'excludeFromUpdates'],
-               phpMode: true
+       filters: [
+               {
+                       type: 'string',
+                       dataIndex: 'title'
+                       }, {
+                       type: 'string',
+                       dataIndex: 'extkey'
+                       }, {
+                       type: 'string',
+                       dataIndex: 'author'
+                       }, {
+                       type: 'string',
+                       dataIndex: 'category'
+                       }, {
+                       type: 'list',
+                       dataIndex: 'state',
+                       options: ['alpha', 'beta', 'stable', 'experimental', 'test', 'obsolete', 'excludeFromUpdates'],
+                       phpMode: true
+                       }, {
+                       type: 'boolean',
+                       dataIndex: 'installed'
                }, {
-               type: 'boolean',
-               dataIndex: 'installed'
-       }],
+                       type: 'list',
+                       dataIndex: 'type',
+                       options: [TYPO3.lang.type_system, TYPO3.lang.type_global, TYPO3.lang.type_local],
+                       phpMode: true
+               }
+       ],
        getRecordFilter: function(){
                var f = [];
                this.filters.each(function(filter){
@@ -205,7 +212,7 @@ TYPO3.EM.GridColumns.ImportExtension = {
                        getClass: function(value, meta, record) {
                                if (record.data.exists) {
                                        if (record.data.versionislower) {
-                                               this.items[0].tooltip = TYPO3.lang.menu_update_extensions;
+                                               this.items[0].tooltip = String.format(TYPO3.lang.menu_update_extension, record.data.existingVersion, record.data.version);
                                                return 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-extension-update';
                                        } else {
                                                return '';
@@ -217,9 +224,9 @@ TYPO3.EM.GridColumns.ImportExtension = {
                        },
                        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 action = TYPO3.lang.menu_import_extensions;
                                if (record.exists && record.versionislower) {
-                                       action = TYPO3.lang.menu_install_extensions;
+                                       action = TYPO3.lang.menu_update_extensions;
                                }
                                var link = TYPO3.settings.EM.scriptLink
                                                + '&nodoc=1&view=info&CMD[silentMode]=1&CMD[standAlone]=1&ter_connect=1&CMD[importExt]='
@@ -276,6 +283,7 @@ TYPO3.EM.GridColumns.ExtensionTitle = {
                if (description) {
                        metaData.attr = 'ext:qtip="' + Ext.util.Format.htmlEncode(description) + '"';
                }
+               value = store.highlightSearch(value);
                return record.data.icon + ' ' + value + ' (v' + record.data.version + ')';
        }
 };
@@ -286,7 +294,10 @@ TYPO3.EM.GridColumns.ExtensionKey = {
        sortable: true,
        filterable: true,
        hideable: true,
-       dataIndex: 'extkey'
+       dataIndex: 'extkey',
+       renderer: function(value, metaData, record, rowIndex, colIndex, store) {
+               return store.highlightSearch(value);
+       }
 };
 
 TYPO3.EM.GridColumns.ExtensionCategory = {
@@ -352,6 +363,7 @@ TYPO3.EM.GridColumns.ExtensionType = {
        sortable:true,
        dataIndex:'type',
        hideable: true,
+       filterable: true,
        hidden: true,
        renderer: function(value, metaData, record, rowIndex, colIndex, store) {
                if (record.data.doubleInstallShort && record.data.doubleInstallShort.length > 1) {
@@ -371,12 +383,12 @@ TYPO3.EM.GridColumns.ExtensionState = {
        resizable: false,
        fixed: true,
        hideable: true,
+       filterable: true,
        dataIndex:'state',
        renderer: function(value, metaData, record, rowIndex, colIndex, store){
                metaData.css += 'state-' + value + ' ';
                return value;
-       },
-       filterable: true
+       }
 };
 
 TYPO3.EM.GridColumns.ExtensionStateValue = {
index 19a4eb7..eb83e74 100644 (file)
@@ -28,8 +28,7 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
 
                var fileTree = new Ext.tree.TreePanel ({
                        itemId: 'extfiletree',
-                       autoScroll: true,
-                       //containerScroll: true,
+                       cls: 'extfiletree',
                        margins: '0 0 0 0',
                        cmargins: '0 0 0 0',
 
@@ -67,7 +66,7 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
                                                        } else {
                                                                this.layout.center.panel.jslintButton.disable();
                                                        }
-                                                       console.log(node.attributes);
+
                                                }, this);
                                        }
                                        if (node.attributes.fileType === 'image') {
@@ -121,15 +120,16 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
                                }]
                        }, {
 
-                                region: 'center',
+                               region: 'center',
 
-                                layout: 'fit',
-                                margins: '0 0 0 0',
-                                cmargins: '0 0 0 0',
-                                border: false,
-                                items: [hlEditor],
-                                tbar: [{
-                                       iconCls: 'x-btn-filebrowser',
+                               layout: 'fit',
+                               margins: '0 0 0 0',
+                               cmargins: '0 0 0 0',
+                               border: false,
+                               cls: 'file-editor',
+                               items: [hlEditor],
+                               tbar: [{
+                                       iconCls: 'x-btn-filebrowser',
                                        tooltip: TYPO3.lang.cmd_openInNewWindow,
                                        ref: '../openWindowButton',
                                        scope: this,
@@ -171,7 +171,7 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
                                        }
                                }, {
                                        iconCls: 'x-btn-save',
-                                       tooltip: TYPO3.lang.cmd_save,
+                                       tooltip: TYPO3.settings.EM.fileSaveAllowed ? TYPO3.lang.cmd_save : TYPO3.lang.ext_details_saving_disabled,
                                        ref: '../saveButton',
                                        disabled: true,
                                        scope: this,
@@ -423,7 +423,7 @@ TYPO3.EM.CodeMirror = Ext.extend(Ext.Panel, {
        /** @private */
        resizeCodeEditor: function(component, width, height, origWidth, origHeight) {
                var el = Ext.fly(this.codeMirrorEditor.frame);
-               el.setSize(width , height);
+               el.setSize(width - 50, height); // subtract width of line numbers
                el.next().setHeight(height);
                this.doLayout();
        },
@@ -468,12 +468,14 @@ TYPO3.EM.CodeMirror = Ext.extend(Ext.Panel, {
        },
 
        changeAction: function(changed) {
-               if (!changed) {
-                       this.ownerCt.saveButton.disable();
-                       this.contentChanged = false;
-               } else {
-                       this.ownerCt.saveButton.enable();
-                       this.contentChanged = true;
+               if (TYPO3.settings.EM.fileSaveAllowed) {
+                       if (!changed) {
+                               this.ownerCt.saveButton.disable();
+                               this.contentChanged = false;
+                       } else {
+                               this.ownerCt.saveButton.enable();
+                               this.contentChanged = true;
+                       }
                }
        },
 
@@ -482,8 +484,8 @@ TYPO3.EM.CodeMirror = Ext.extend(Ext.Panel, {
        },
 
        setValue: function(text) {
-               //console.log(this.codeMirrorEditor);
                this.codeMirrorEditor.setCode(text);
+               this.resizeCodeEditor();
        },
 
        setValueAtCursor: function(text) {
index b921dff..8748ce1 100644 (file)
@@ -171,6 +171,7 @@ TYPO3.EM.Languages = Ext.extend(Ext.FormPanel, {
                                        }
                                        TYPO3.EM.LanguagesSelectionModel.selectRecords(a);
                                        langExtStore.load();
+                                       store.sort('label', 'ASC');
                                },
                                scope: this
                        }
index 8fd85ca..62e4fa3 100644 (file)
@@ -244,7 +244,7 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                                                        }
                                                },
                                                {
-                                                       title: TYPO3.lang.details_maintainance,
+                                                       title: TYPO3.lang.details_maintenance,
                                                        //disabled: record.data.installed === 0,
                                                        html: TYPO3.EM.App.loadingIndicor,
                                                        listeners: {
@@ -268,6 +268,23 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                                                                                }, this);
                                                                        });
                                                                }
+                                                               var deletelink = Ext.select('a.deleteLink');
+                                                               if (deletelink.elements.length) {
+                                                                       var link = deletelink.elements[0];
+                                                                       link.removeAttribute('onclick');
+                                                                       Ext.get(link).on('click', function() {
+                                                                               this.waitBox = Ext.Msg.wait(TYPO3.lang.extDelete_from_server, record.data.extkey);
+                                                                               TYPO3.EM.ExtDirect.deleteExtension(record.data.extkey, function(response) {
+                                                                                       this.waitBox.hide();
+                                                                                       if (response.success) {
+                                                                                               TYPO3.Flashmessage.display(TYPO3.Severity.ok, TYPO3.lang.msg_extkexDeletedSuccess, response.result, 5);
+                                                                                               Ext.StoreMgr.get('localstore').remove(record);
+                                                                                       } else {
+                                                                                               TYPO3.Flashmessage.display(TYPO3.Severity.error, response.error, response.result, 5);
+                                                                                       }
+                                                                               }, this);
+                                                                       });
+                                                               }
 
                                                        }
                                                }
@@ -364,7 +381,7 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                                        if (filtertext) {
                                                        //filter by search string
                                                var re = new RegExp(Ext.escapeRe(filtertext), 'gi');
-                                               var isMatched = record.data.extkey.match(re) || record.data.title.match(re) ||  record.data.description.match(re);
+                                               var isMatched = record.data.extkey.match(re) || record.data.title.match(re);
                                                if (!isMatched) {
                                                        return false;
                                                }
@@ -381,6 +398,21 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                                }
 
                                return true;
+                       },
+
+                       highlightSearch: function(value) {
+                               var control = Ext.getCmp('localSearchField');
+                               if (control) {
+                                       var filtertext = control.getRawValue();
+                                       if (filtertext) {
+                                               var re = new RegExp(Ext.escapeRe(filtertext), 'gi');
+                                               var result = re.exec(value) || [];
+                                               if (result.length) {
+                                                       return value.replace(result[0], '<span class="filteringList-highlight">' + result[0] + '</span>');
+                                               }
+                                       }
+                               }
+                               return value;
                        }
                });
 
@@ -388,8 +420,7 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                        store: this.localstore,
                        filterFunction: this.filterRecords,
                        id: 'localSearchField',
-                       width: 200,
-                       charCountTrigger: 1
+                       width: 200
                });
 
                var cols = [
index a6f6106..fb0e71f 100644 (file)
@@ -93,6 +93,7 @@ TYPO3.EM.RepositoryList = Ext.extend(Ext.grid.GridPanel, {
                                {name:'versions', type: 'int'},
                                {name:'installed', type: 'int'},
                                {name:'versionislower', type: 'bool'},
+                               {name:'existingVersion'},
                                {name:'exists', type: 'int'},
                                {name:'relevance', type: 'int'}
                        ],
@@ -140,6 +141,20 @@ TYPO3.EM.RepositoryList = Ext.extend(Ext.grid.GridPanel, {
                                        }
                                },
                                scope: this
+                       },
+                       highlightSearch: function(value) {
+                               var control = Ext.getCmp('rsearchField');
+                               if (control) {
+                                       var filtertext = control.getRawValue();
+                                       if (filtertext) {
+                                               var re = new RegExp(Ext.escapeRe(filtertext), 'gi');
+                                               var result = re.exec(value) || [];
+                                               if (result.length) {
+                                                       return value.replace(result[0], '<span class="filteringList-highlight">' + result[0] + '</span>');
+                                               }
+                                       }
+                               }
+                               return value;
                        }
 
                });
@@ -158,6 +173,7 @@ TYPO3.EM.RepositoryList = Ext.extend(Ext.grid.GridPanel, {
                        id: 'rsearchField',
                        store: this.repositoryListStore,
                        width: 260,
+                       specialKeyOnly: true,
                        emptyText: TYPO3.lang.msg_startTyping
                });
 
index 72dd0a5..6b904ba 100644 (file)
@@ -41,15 +41,10 @@ TYPO3.EM.Tools = function() {
                        if (reload === true) {
                                TYPO3.EM.Filters.clearFilters();
                                localStore.showAction = extKey;
+                               var search = Ext.getCmp('localSearchField');
+                               search.setValue(extKey);
+                               search.refreshTrigger();
                                localStore.load();
-                       } else {
-                               // find row and expand
-                               /*var row = localStore.find('extkey', extKey);
-                                var grid = Ext.getCmp('em-local-extensions');
-
-                                grid.expander.expandRow(row);
-                                grid.getView().focusRow(row);
-                                grid.getSelectionModel().selectRow(row);*/
                        }
                },
 
@@ -79,7 +74,6 @@ TYPO3.EM.Tools = function() {
 
                refreshMenu: function(record, installAction) {
                        if (installAction == 'import') {
-                               console.log(record);
                                TYPO3.EM.Tools.displayLocalExtension(record.extkey, true);
                        }
                        if (top.TYPO3ModuleMenu && installAction == 'install') {
index 3c8926a..5e65aed 100644 (file)
@@ -7,8 +7,8 @@
 Ext.ns('Ext.ux.form');
 
 Ext.ux.form.SearchField = Ext.extend(Ext.form.TwinTriggerField, {
-       charCountTrigger: 0,
        enableKeyEvents: true,
+       specialKeyOnly: false,
 
        initComponent : function(){
 
@@ -18,15 +18,26 @@ Ext.ux.form.SearchField = Ext.extend(Ext.form.TwinTriggerField, {
                                this.onTrigger2Click();
                        }
                }, this);
-               if (this.charCountTrigger > 0) {
+               if (!this.specialKeyOnly) {
                        this.on('keyup', function(f, e){
                                var value = this.getRawValue();
-                               if (value.length > this.charCountTrigger) {
-                                       this.onTrigger2Click();
-                               }
+                               this.onTrigger2Click();
                        }, this);
                }
        },
+       onRender : function(ct, position){
+               this.doc = Ext.isIE ? Ext.getBody() : Ext.getDoc();
+               Ext.form.TriggerField.superclass.onRender.call(this, ct, position);
+
+               this.wrap = this.el.wrap({cls: 'x-form-field-wrap x-form-field-trigger-wrap'});
+               this.trigger = this.wrap.createChild(this.triggerConfig ||
+                               {tag: "img", src: Ext.BLANK_IMAGE_URL, alt: "", cls: "x-form-trigger " + this.triggerClass});
+               this.initTrigger();
+               if(!this.width){
+                       this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth());
+               }
+               this.resizeEl = this.positionEl = this.wrap;
+       },
 
        validationEvent:false,
        validateOnBlur:false,
@@ -70,5 +81,13 @@ Ext.ux.form.SearchField = Ext.extend(Ext.form.TwinTriggerField, {
                }
                this.hasSearch = true;
                this.triggers[0].show();
+       },
+
+       refreshTrigger: function() {
+               if (this.getRawValue().length > 0) {
+                       this.triggers[0].show();
+               } else {
+                       this.triggers[0].hide();
+               }
        }
 });