Merged em from rev 4093
authorSteffen Kamper <info@sk-typo3.de>
Tue, 8 Feb 2011 18:38:48 +0000 (18:38 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Tue, 8 Feb 2011 18:38:48 +0000 (18:38 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-5@10421 709f56b5-9817-0410-a4d7-c38de5d9e867

30 files changed:
ChangeLog
typo3/sysext/em/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/classes/parser/class.tx_em_parser_extensionxmlabstractparser.php
typo3/sysext/em/classes/tools/class.tx_em_tools.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/language/locallang.xml
typo3/sysext/em/res/css/t3_em.css
typo3/sysext/em/res/js/em_app.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_usertools.js
typo3/sysext/em/res/js/overrides/ext_overrides.js
typo3/sysext/em/res/js/ux/fileuploadfield.js
typo3/sysext/em/res/js/ux/filter/Filter.js
typo3/sysext/em/res/js/ux/filter/ListFilter.js
typo3/sysext/em/res/js/ux/filter/NumericFilter.js
typo3/sysext/em/res/js/ux/filter/StringFilter.js
typo3/sysext/em/res/js/ux/menu/ListMenu.js
typo3/sysext/em/res/js/ux/menu/RangeMenu.js
typo3/sysext/em/res/js/ux/searchfield.js

index 0b8fcd0..cc3d82f 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2011-02-08  Steffen Kamper  <steffen@typo3.org>
 
+       * Merged em from rev 4093
        * Fixed bug #15771: Docheader (save, save+view, save+close etc) missing
        * Follow-up to #17500: Improve error handling in ExtDirect router (Thanks to Helmut Hummel)
 
index 451bced..617b84d 100644 (file)
@@ -1,11 +1,43 @@
-2011-02-04  Steffen Kamper  <steffen@typo3.org>\r
-\r
-       * CSS for filetree folder icons removed (use standard), filter with typo3 icons\r
-       * Render settings and labels after the hook for easy additions\r
-       * Implemented Hook to allow extensions to plug in the gui\r
-\r
-2011-02-03  Steffen Kamper  <steffen@typo3.org>\r
-\r
-       * Fixed bug #17450 path to Documentation for sysextensions is wrong (Thanks to Simon Schaufelberger)\r
-       * Fixed double form tag in configuration forms (Thanks to Helmut Hummel)\r
-\r
+2011-02-07  Steffen Kamper  <steffen@typo3.org>
+
+       * CGL spaces=>tabs, raised ext version to 4.5.1, cleaned em_conf
+       * fix docPath in link generation for documentation
+       * remote list should show installed extensions without search word
+       * log saving of ext files in be-log
+       * Mark filename red when file content changed
+
+2011-02-07  Steffen Kamper  <steffen@typo3.org>
+
+       * Fixed bug #11487 Edit Files - Download not implemented
+       * Adjusted tooltips for filter
+       * Fixed bug #15019: Extension Manager does not free the DB result with sql_free_result
+       * Fixed bug #17363: Legacy extension manager does not allow to change category of configuration anymore
+       * StateProvider for file tree adjusted
+
+2011-02-06  Steffen Kamper  <steffen@typo3.org>
+
+       * Prevent single click in translations while fetching languages
+       * StateProvider for file tree added
+       * Fixed bug #11862 Updating translations fails
+       * Fixed bug #12799 Problem with Planer Task
+       * Fixed bug #12812 State destroys the columns menu in repository list
+
+2011-02-05  Steffen Kamper  <steffen@typo3.org>
+
+       * CSS - fixed links in grid header menus
+       * Fixed bug #12556 Upload comment not uploaded
+       * CSS: remove border from filter trigger icons, cancel item displaced
+       * remote list: do not deliver all data with empty search
+       * CGL cleanups
+
+2011-02-04  Steffen Kamper  <steffen@typo3.org>
+
+       * CSS for filetree folder icons removed (use standard), filter with typo3 icons
+       * Render settings and labels after the hook for easy additions
+       * Implemented Hook to allow extensions to plug in the gui
+
+2011-02-03  Steffen Kamper  <steffen@typo3.org>
+
+       * Fixed bug #17450 path to Documentation for sysextensions is wrong (Thanks to Simon Schaufelberger)
+       * Fixed double form tag in configuration forms (Thanks to Helmut Hummel)
+
index 93d153c..fa7f6af 100644 (file)
@@ -181,7 +181,8 @@ class tx_em_ExtensionManager {
                        'inlineToWindow' => $globalSettings['inlineToWindow'],
                        'allowRepositoryUpdate' => $allowRepositoryUpdate,
                        'displayMyExtensions' => $globalSettings['displayMyExtensions'],
-                       'fileSaveAllowed' => $GLOBALS['TYPO3_CONF_VARS']['EXT']['noEdit'] == 0
+                       'fileSaveAllowed' => $GLOBALS['TYPO3_CONF_VARS']['EXT']['noEdit'] == 0,
+                       'debug' => $GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] > 0,
                );
                $settings = array_merge($settings, $additionalSettings);
 
@@ -194,6 +195,7 @@ class tx_em_ExtensionManager {
                $this->pageRenderer->addJsFile($this->resPath . 'js/overrides/ext_overrides.js');
                $this->pageRenderer->addJsFile($this->resPath . 'js/ux/custom_plugins.js');
                $this->pageRenderer->addJsFile($this->parentObject->doc->backPath . '../t3lib/js/extjs/ux/Ext.ux.FitToParent.js');
+               $this->pageRenderer->addJsFile($this->resPath . 'js/ux/TreeState.js');
                $this->pageRenderer->addJsFile($this->resPath . 'js/ux/RowPanelExpander.js');
                $this->pageRenderer->addJsFile($this->resPath . 'js/ux/searchfield.js');
                $this->pageRenderer->addJsFile($this->resPath . 'js/ux/fileuploadfield.js');
index 84ef83f..1921ec0 100644 (file)
@@ -378,11 +378,11 @@ class tx_em_Connection_ExtDirectServer {
                $ext = array();
                $extKey = $parameter->extkey;
                $type = $parameter->typeShort;
-               $node = strpos($parameter->node, '/') !== FALSE ? $parameter->node : $parameter->baseNode;
+               $node = substr($parameter->node, 0, 6) !== 'xnode-' ? $parameter->node : $parameter->baseNode;
 
                $path = PATH_site . $node;
                $fileArray = array();
-
+//debug($node)
                $dirs = t3lib_div::get_dirs($path);
                $files = t3lib_div::getFilesInDir($path, '', FALSE, '', '');
 
@@ -396,7 +396,7 @@ class tx_em_Connection_ExtDirectServer {
                foreach ($dirs as $dir) {
                        if ($dir{0} !== '.') {
                                $fileArray[] = array(
-                                       'id' => $node . '/' . $dir,
+                                       'id' => ($node == '' ? '' : $node . '/') . $dir,
                                        'text' => htmlspecialchars($dir),
                                        'leaf' => false,
                                        'qtip' => ''
@@ -460,7 +460,6 @@ class tx_em_Connection_ExtDirectServer {
        public function readExtFile($path) {
                $path = PATH_site . $path;
                if (@file_exists($path)) {
-                       //TODO: charset conversion
                        return t3lib_div::getURL($path);
                }
                return '';
@@ -491,6 +490,10 @@ class tx_em_Connection_ExtDirectServer {
                                        )
                                        : $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_saving_disabled', TRUE);
                }
+
+               if ($success) {
+                       $GLOBALS['BE_USER']->writelog(9, 0, 0, 0, sprintf('File "%s" has been modified', $file));
+               }
                return array(
                        'success' => $success,
                        'path' => $path,
@@ -533,6 +536,7 @@ class tx_em_Connection_ExtDirectServer {
                $parameter['user']['fe_u'] = $parameter['fe_u'];
                $parameter['user']['fe_p'] = $parameter['fe_p'];
                $parameter['upload']['mode'] = $parameter['newversion'];
+               $parameter['upload']['comment'] = $parameter['uploadcomment'];
 
                /** @var $extensionList tx_em_Extensions_List */
                $extensionList = t3lib_div::makeInstance('tx_em_Extensions_List', $this);
@@ -763,23 +767,32 @@ class tx_em_Connection_ExtDirectServer {
 
                $where = $addFields = '';
 
-               $quotedSearch = $GLOBALS['TYPO3_DB']->escapeStrForLike(
-                       $GLOBALS['TYPO3_DB']->quoteStr($search, 'cache_extensions'),
-                       'cache_extensions'
-               );
-               $addFields = '
-                       (CASE WHEN cache_extensions.extkey =  "' . $search . '" THEN 100 ELSE 5 END) +
-                       (CASE WHEN cache_extensions.title = "' . $search . '" THEN 80 ELSE 5 END) +
-                       (CASE WHEN cache_extensions.extkey LIKE \'%' . $quotedSearch . '%\' THEN 60 ELSE 5 END) +
-                       (CASE WHEN cache_extensions.title LIKE \'%' . $quotedSearch . '%\' THEN 40 ELSE 5 END)
-                AS relevance';
-
-               if (t3lib_extMgm::isLoaded('dbal')) {
-                       // as dbal can't use the sum, make it more easy for dbal
-                       $addFields = 'CASE WHEN cache_extensions.extkey =  \'' . $search . '\' THEN 100 ELSE 10 END AS relevance';
-               }
-               $where = ' AND (cache_extensions.extkey LIKE \'%' . $quotedSearch . '%\' OR cache_extensions.title LIKE \'%' . $quotedSearch . '%\')';
+               if ($search === '' && !$installedOnly) {
+                       return array(
+                               'length' => 0,
+                               'data' => array(),
+                       );
+               } elseif ($search === '*') {
+
+               } else {
+                       $quotedSearch = $GLOBALS['TYPO3_DB']->escapeStrForLike(
+                               $GLOBALS['TYPO3_DB']->quoteStr($search, 'cache_extensions'),
+                               'cache_extensions'
+                       );
+                       $addFields = '
+                               (CASE WHEN cache_extensions.extkey =  "' . $search . '" THEN 100 ELSE 5 END) +
+                               (CASE WHEN cache_extensions.title = "' . $search . '" THEN 80 ELSE 5 END) +
+                               (CASE WHEN cache_extensions.extkey LIKE \'%' . $quotedSearch . '%\' THEN 60 ELSE 5 END) +
+                               (CASE WHEN cache_extensions.title LIKE \'%' . $quotedSearch . '%\' THEN 40 ELSE 5 END)
+                        AS relevance';
+
+                       if (t3lib_extMgm::isLoaded('dbal')) {
+                               // as dbal can't use the sum, make it more easy for dbal
+                               $addFields = 'CASE WHEN cache_extensions.extkey =  \'' . $search . '\' THEN 100 ELSE 10 END AS relevance';
+                       }
+                       $where = ' AND (cache_extensions.extkey LIKE \'%' . $quotedSearch . '%\' OR cache_extensions.title LIKE \'%' . $quotedSearch . '%\')';
 
+               }
                // check for filter
                $where .= $this->makeFilterQuery(get_object_vars($parameters));
 
@@ -844,7 +857,6 @@ class tx_em_Connection_ExtDirectServer {
                return array(
                        'length' => $list['count'],
                        'data' => $list['results'],
-                       'where' => $where
                );
 
        }
index 66ba558..eb58ce9 100644 (file)
@@ -187,6 +187,8 @@ class tx_em_Extensions_List {
                        $directLink = 'mod.php?M=tools_em';
                        $emConf = tx_em_Tools::includeEMCONF($path . $extKey . '/ext_emconf.php', $extKey);
                        $manual = $path . $extKey . '/doc/manual.sxw';
+                       $manualRelPath = $relPath . $extKey . '/doc/manual.sxw';
+
                        if ($type === '') {
                                $type = tx_em_Tools::getExtTypeFromPath($path);
                        }
@@ -236,9 +238,11 @@ class tx_em_Extensions_List {
                                $list[$key]['doc'] = '';
                                if ($list[$key]['docPath']) {
                                        $manual = $path . $extKey . '/' . $list[$key]['docPath'] . '/manual.sxw';
+                                       $manualRelPath = $relPath . $extKey . '/' .  $list[$key]['docPath'] . '/manual.sxw';
                                }
+
                                if (@is_file($manual)) {
-                                       $list[$key]['doc'] = '<a href="' . htmlspecialchars($relPath . $extKey . '/doc/manual.sxw') . '" target="_blank">'
+                                       $list[$key]['doc'] = '<a href="' . htmlspecialchars($manualRelPath) . '" 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="" height="16" />' : '<img src="clear.gif" alt="" width="16" height="16" />';
@@ -631,11 +635,15 @@ EXTENSION KEYS:
                                                '</a></td>';
 
                                // Manual download
-                               $fileP = tx_em_Tools::typePath($extInfo['type']) . $extKey . '/doc/manual.sxw';
+                               $manual = tx_em_Tools::typePath($extInfo['type']) . $extKey . '/doc/manual.sxw';
+                               $manualRelPath = t3lib_div::resolveBackPath($this->parentObject->doc->backPath . tx_em_Tools::typeRelPath($extInfo['type'])) . $extKey . '/doc/manual.sxw';
+                               if ($extInfo['EM_CONF']['docPath']) {
+                                       $manual = tx_em_Tools::typePath($extInfo['type']) . $extKey . '/' . $extInfo['EM_CONF']['docPath'] . '/manual.sxw';
+                                       $manualRelPath = t3lib_div::resolveBackPath($this->parentObject->doc->backPath . tx_em_Tools::typeRelPath($extInfo['type'])) . $extKey . '/' . $extInfo['EM_CONF']['docPath'] . '/manual.sxw';
+                               }
                                $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::typeRelPath($extInfo['type']) . $extKey . '/doc/manual.sxw')) . '" target="_blank" title="' . $GLOBALS['LANG']->getLL('listRow_local_manual') . '">' .
+                                               (tx_em_Tools::typePath($extInfo['type']) && @is_file($manual) ?
+                                                               '<a href="' . htmlspecialchars($manualRelPath) . '" target="_blank" title="' . $GLOBALS['LANG']->getLL('listRow_local_manual') . '">' .
                                                                                t3lib_iconWorks::getSpriteIcon('actions-system-extension-documentation') . '</a>' : '') .
                                                '</td>';
 
index 893b812..e2fc165 100644 (file)
@@ -444,6 +444,8 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                        }
                } elseif ($this->CMD['importExtInfo']) { // Gets detailed information of an extension from online rep.
                        $this->importExtInfo($this->CMD['importExtInfo'], $this->CMD['extVersion']);
+               } elseif ($this->CMD['downloadExtFile']) {
+                       tx_em_Tools::sendFile($this->CMD['downloadExtFile']);
                } else { // No command - we show what the menu setting tells us:
                        if (t3lib_div::inList('loaded_list,installed_list,import', $this->MOD_SETTINGS['function'])) {
                                $menu .= '&nbsp;' . $GLOBALS['LANG']->getLL('group_by') . '&nbsp;' . t3lib_BEfunc::getFuncMenu(0, 'SET[listOrder]', $this->MOD_SETTINGS['listOrder'], $this->MOD_MENU['listOrder']) .
@@ -903,7 +905,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
         * @return      void
         */
        function alterSettings() {
-
+               $content = '';
                // Prepare the HTML output:
                $content .= '
                        <form action="' . $this->script . '" method="post" name="altersettings">
@@ -1103,6 +1105,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
        function fetchMetaData($metaType) {
                global $TYPO3_CONF_VARS;
 
+               $content = '';
                switch ($metaType) {
                        case 'mirrors':
                                $mfile = t3lib_div::tempnam('mirrors');
@@ -1883,6 +1886,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                                                        $content = $this->install->extDelete($extKey, $list[$extKey], $this->CMD);
                                                        $this->content .= $this->doc->section(
                                                                $GLOBALS['LANG']->getLL('ext_details_delete'),
+                                                               $GLOBALS['LANG']->getLL('ext_details_delete'),
                                                                $content, 0, 1
                                                        );
                                                } else {
@@ -2182,6 +2186,8 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
         */
        function extUpdateEMCONF($extKey, $extInfo) {
                $absPath = tx_em_Tools::getExtPath($extKey, $extInfo['type']);
+               $content = '';
+
                if ($this->CMD['doUpdateEMCONF']) {
                        return $this->extensionDetails->updateLocalEM_CONF($extKey, $extInfo);
                } else {
index 15e111b..5c1e388 100644 (file)
@@ -1310,7 +1310,9 @@ class tx_em_Install {
                                                t3lib_BEfunc::getFuncMenu(0, 'SET[constant_editor_cat]', $MOD_SETTINGS['constant_editor_cat'], $MOD_MENU['constant_editor_cat'], '', '&CMD[showExt]=' . $extKey);
                                        // add class to select
                                $menu = str_replace('<select', '<select class="mod-menu-template-select"', $menu);
-                               $menu = str_replace('jumpToUrl', 'abc', $menu);
+                               if ($this->silentMode) {
+                                       $menu = str_replace('jumpToUrl', 'abc', $menu);
+                               }
 
                                if ($this->parentObject instanceof SC_mod_tools_em_index) {
                                        $this->parentObject->content .= $this->parentObject->doc->section('', '<span class="nobr">' . $menu . '</span>');
index 2dd9cf1..adb74dd 100644 (file)
@@ -436,7 +436,6 @@ abstract class tx_em_Parser_ExtensionXmlAbstractParser extends tx_em_Parser_XmlA
        protected function convertDependencies($dependencies) {
                $newDependencies = array();
                $dependenciesArray = unserialize($dependencies);
-               debug($dependenciesArray, '$dependenciesArray');
                if (is_array($dependenciesArray)) {
                        foreach ($dependenciesArray as $version) {
                                $newDependencies[$version['kind']][$version['extensionKey']] = $version['versionRange'];
index a0d7855..70c2524 100644 (file)
@@ -1022,6 +1022,21 @@ final class tx_em_Tools {
        }
 
        /**
+        * @static
+        * @param  $path
+        * @return void
+        */
+       public static function sendFile($path) {
+               $path = PATH_site . $path;
+               if (is_file($path) && is_readable($path)) {
+                       header('Content-Type: application/octet-stream');
+                       header('Content-Disposition: attachment; filename=' . basename($path));
+                       readfile($path);
+                       exit;
+               }
+       }
+
+       /**
         * Wrapping input string in a link tag with link to email address
         *
         * @param       string          Input string, being wrapped in <a> tags
index a63061f..d0fa556 100644 (file)
@@ -263,11 +263,13 @@ class tx_em_Tools_XmlHandler {
        function getReviewState($extKey, $version) {
                $where = 'extkey=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extKey, 'cache_extensions') . ' AND version=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($version, 'cache_extensions');
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('reviewstate', 'cache_extensions', $where);
+               $reviewState = 0;
                if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                       return $row['reviewstate'];
+                       $reviewState = $row['reviewstate'];
                }
                $GLOBALS['TYPO3_DB']->sql_free_result($res);
-               return 0;
+
+               return $reviewState;
        }
 
 
@@ -364,8 +366,7 @@ class tx_em_Tools_XmlHandler {
 
                $fp = gzopen($filename, 'rb');
                if (!$fp) {
-                       $content .= 'Error opening XML extension file "' . $filename . '"';
-                       return $content;
+                       return 'Error opening XML extension file "' . $filename . '"';
                }
                $string = gzread($fp, 0xffff); // Read 64KB
 
@@ -386,6 +387,7 @@ class tx_em_Tools_XmlHandler {
                $GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('cache_extensions');
 
                $extcount = 0;
+               $content = '';
                @ini_set('pcre.backtrack_limit', 500000);
                do {
                        if (preg_match('/.*(<extension\s+extensionkey="[^"]+">.*<\/extension>)/suU', $string, $match)) {
index 9d7070b..48c7e6c 100644 (file)
@@ -100,8 +100,8 @@ class tx_em_Translations {
                                t3lib_div::mkdir_deep(PATH_typo3conf, $path);
                        }
                        t3lib_div::writeFile($file, $l10n[0]);
-                       // SteffenG tried this to get first update without errors
-                       //t3lib_div::rmdir(PATH_typo3conf . $path, TRUE);
+                               // this prevent first update having errors
+                       t3lib_div::rmdir(PATH_typo3conf . $path, TRUE);
                        if (tx_em_Tools::unzip($file, PATH_typo3conf . $path)) {
                                return true;
                        } else {
index 5f0ef3b..cd60cfb 100644 (file)
@@ -15,11 +15,11 @@ return array(
 
        'tx_em_database' => $emClassesPath . 'database/class.tx_em_database.php',
 
-       'tx_em_xmlexception' => $emClassesPath . 'exception/class.tx_em_xml_exception.php',
-       'tx_em_connection_exception' => $emClassesPath . 'exception/class.tx_em_connection_exception.php',
-       'tx_em_extensionxml_exception' => $emClassesPath . 'exception/class.tx_em_extensionxml_exception.php',
-       'tx_em_extensionimport_exception' => $emClassesPath . 'exception/class.tx_em_extensionimport_exception.php',
-       'tx_em_mirrorxml_exception' => $emClassesPath . 'exception/class.tx_em_mirrorxml_exception.php',
+       'tx_em_xmlexception' => $emClassesPath . 'exception/class.tx_em_xmlexception.php',
+       'tx_em_connectionexception' => $emClassesPath . 'exception/class.tx_em_connectionexception.php',
+       'tx_em_extensionxmlexception' => $emClassesPath . 'exception/class.tx_em_extensionxmlexception.php',
+       'tx_em_extensionimportexception' => $emClassesPath . 'exception/class.tx_em_extensionimportexception.php',
+       'tx_em_mirrorxmlexception' => $emClassesPath . 'exception/class.tx_em_mirrorxmlexception.php',
 
        'tx_em_extensions_list' => $emClassesPath . 'extensions/class.tx_em_extensions_list.php',
        'tx_em_extensions_details' => $emClassesPath . 'extensions/class.tx_em_extensions_details.php',
index e12276b..cdd05f2 100644 (file)
@@ -3,7 +3,7 @@
 ########################################################################
 # Extension Manager/Repository config file for ext "em".
 #
-# Auto generated 26-01-2011 20:22
+# Auto generated 08-02-2011 19:22
 #
 # 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' => '4.5.0',
-       '_md5_values_when_last_written' => 'a:100:{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:"9d23";s:40:"classes/class.tx_em_extensionmanager.php";s:4:"c343";s:16:"classes/conf.php";s:4:"d842";s:17:"classes/index.php";s:4:"9dab";s:61:"classes/connection/class.tx_em_connection_extdirectserver.php";s:4:"1b36";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:"813e";s:41:"classes/database/class.tx_em_database.php";s:4:"5852";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:"5006";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:"fa1e";s:64:"classes/parser/class.tx_em_parser_extensionxmlabstractparser.php";s:4:"fdb2";s:60:"classes/parser/class.tx_em_parser_extensionxmlpullparser.php";s:4:"8cb1";s:60:"classes/parser/class.tx_em_parser_extensionxmlpushparser.php";s:4:"728a";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:"50c1";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:"ccd7";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: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:"05c1";s:22:"res/js/em_locallist.js";s:4:"0895";s:27:"res/js/em_repositorylist.js";s:4:"b6fa";s:21:"res/js/em_settings.js";s:4:"0264";s:16:"res/js/em_ter.js";s:4:"d4fb";s:18:"res/js/em_tools.js";s:4:"2b3e";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:"7d2e";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:"6968";s:19:"res/js/ux/jslint.js";s:4:"8c75";s:24:"res/js/ux/searchfield.js";s:4:"194f";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.1',
+       '_md5_values_when_last_written' => 'a:103:{s:9:"ChangeLog";s:4:"b360";s:16:"ext_autoload.php";s:4:"397a";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:"68e8";s:16:"classes/conf.php";s:4:"d842";s:17:"classes/index.php";s:4:"376e";s:61:"classes/connection/class.tx_em_connection_extdirectserver.php";s:4:"b40e";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:"813e";s:41:"classes/database/class.tx_em_database.php";s:4:"5852";s:53:"classes/exception/class.tx_em_connectionexception.php";s:4:"8b14";s:58:"classes/exception/class.tx_em_extensionimportexception.php";s:4:"62e2";s:55:"classes/exception/class.tx_em_extensionxmlexception.php";s:4:"fcfe";s:52:"classes/exception/class.tx_em_mirrorxmlexception.php";s:4:"ad05";s:46:"classes/exception/class.tx_em_xmlexception.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:"0b87";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:"545e";s:64:"classes/parser/class.tx_em_parser_extensionxmlabstractparser.php";s:4:"3cc8";s:60:"classes/parser/class.tx_em_parser_extensionxmlpullparser.php";s:4:"8cb1";s:60:"classes/parser/class.tx_em_parser_extensionxmlpushparser.php";s:4:"728a";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:"5f11";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:"312d";s:49:"classes/translations/class.tx_em_translations.php";s:4:"efba";s:61:"interfaces/interface.tx_em_index_checkdatabaseupdateshook.php";s:4:"7178";s:22:"language/locallang.xml";s:4:"0107";s:18:"res/css/editor.css";s:4:"d4a2";s:17:"res/css/t3_em.css";s:4:"8f6e";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:"2d0d";s:23:"res/js/em_components.js";s:4:"4b6a";s:18:"res/js/em_files.js";s:4:"7905";s:22:"res/js/em_languages.js";s:4:"d58d";s:20:"res/js/em_layouts.js";s:4:"05c1";s:22:"res/js/em_locallist.js";s:4:"3939";s:27:"res/js/em_repositorylist.js";s:4:"4f0f";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:"d187";s:22:"res/js/em_usertools.js";s:4:"3816";s:33:"res/js/overrides/ext_overrides.js";s:4:"eda6";s:24:"res/js/ux/GridFilters.js";s:4:"95db";s:29:"res/js/ux/RowPanelExpander.js";s:4:"d4dd";s:22:"res/js/ux/TreeState.js";s:4:"ba48";s:27:"res/js/ux/custom_plugins.js";s:4:"d761";s:28:"res/js/ux/fileuploadfield.js";s:4:"a7a0";s:19:"res/js/ux/jslint.js";s:4:"8c75";s:24:"res/js/ux/searchfield.js";s:4:"4e83";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:"5601";s:30:"res/js/ux/filter/ListFilter.js";s:4:"88bc";s:33:"res/js/ux/filter/NumericFilter.js";s:4:"a32d";s:32:"res/js/ux/filter/StringFilter.js";s:4:"ce23";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:"d5ff";s:27:"res/js/ux/menu/RangeMenu.js";s:4:"6a5e";}',
        'constraints' => array(
                'depends' => array(
                        'cms' => '',
index 454c6f5..ccb3d22 100644 (file)
                        <label index="msg_item">Item</label>
                        <label index="cmd_ClearAllFilters">Clear all Filters</label>
                        <label index="cmd_RetrieveUpdate">Retrieve / Update</label>
-                       <label index="help_localFilter">Enter something to search for and press Enter. Title, description, and extension key are searched.</label>
-                       <label index="help_remoteFilter">Enter something to search for and press Enter. To list all extensions, use "*"</label>
+                       <label index="help_localFilter">Enter something to search for. Title and extension key are used for search.</label>
+                       <label index="help_remoteFilter">Enter something to search for and press Enter. For complete extension list use "*"</label>
                        <label index="help_loadFileInEditor">Click on a file to load in editor</label>
                        <label index="extTemplate_showOldModules">Show old modules: Enable this option to have old modules like "Loaded Extensions, Installed extensions ..." available in upper left select box of the Extension Manager</label>
                        <label index="extTemplate_selectedLanguages">Language selection: The language setting is saved here as a global setting. You should not change it at this place but instead use the Extension Manager tab for "Translation handling" to add and remove languages for your installation</label>
index b2d28f3..8c817c0 100644 (file)
@@ -1,4 +1,9 @@
 /* Global overwrite */
+
+.x-menu-list-item a {
+       display: block !important;
+}
+
 strong {
        font-weight: bold;
 }
@@ -223,11 +228,17 @@ a.email {
 .ux-searchfield-trigger1 {
        right: 0 !important;
     position: absolute !important;
-    top: 3px !important;
+    top: 5px !important;
+       border: none !important;
 }
 
 .ux-searchfield-trigger2 {
        left: 4px !important;
     position: absolute !important;
     top: 3px !important;
+       border: none !important;
+}
+
+.fileChanged {
+       color: red;
 }
\ No newline at end of file
index 41fa559..b38cff9 100644 (file)
@@ -35,12 +35,14 @@ Ext.ns('TYPO3.EM', 'TYPO3.EM.ExtDirect');
 Ext.onReady(function() {
                //save states in BE_USER->uc
        Ext.state.Manager.setProvider(new TYPO3.state.ExtDirectProvider({
-               key: 'moduleData.tools_em.States'
+               key: 'moduleData.tools_em.States',
+               autoRead: false
        }));
 
        if (Ext.isObject(TYPO3.settings.EM.States)) {
                Ext.state.Manager.getProvider().initState(TYPO3.settings.EM.States);
        }
+
        Ext.QuickTips.init();
        TYPO3.EM.ImportWindow = null;
 
index 1763ad2..7b47876 100644 (file)
@@ -17,6 +17,7 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
        rootIcon: 'sysext/t3skin/icons/module_tools_em.png',
        rootText: TYPO3.lang.ext_details_ext_files,
        baseParams: null,
+       treeId: null,
 
        initComponent:function() {
 
@@ -35,6 +36,10 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
                        cls: 'extfiletree',
                        margins: '0 0 0 0',
                        cmargins: '0 0 0 0',
+                       id: this.treeId ? this.treeId : Ext.id(),
+                       stateful: this.treeId ? true : false,
+                       stateEvents: [],
+                       plugins: new Ext.ux.state.TreePanel(),
 
                        root: {
                                text: this.rootText,
@@ -61,6 +66,7 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
                                                        hlEditor.editFile = node.attributes.id;
                                                        this.layout.center.panel.reloadButton.enable();
                                                        this.layout.center.panel.fileLabel.setText('File: ' + hlEditor.editFile);
+                                                       this.layout.center.panel.fileLabel.removeClass('fileChanged');
                                                        this.layout.center.panel.saveButton.disable();
                                                        this.layout.center.panel.undoButton.enable();
                                                        this.layout.center.panel.redoButton.enable();
@@ -88,6 +94,11 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
                                                        }]
                                                }).show();
                                        }
+                                       if (node.isLeaf()) {
+                                               this.layout.west.panel.downloadFileButton.enable();
+                                       } else {
+                                               this.layout.west.panel.downloadFileButton.disable();
+                                       }
                                },
                                scope: this
                        }
@@ -116,11 +127,20 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
                                }, {
                                        iconCls: 'x-btn-upload',
                                        tooltip: TYPO3.lang.cmd_upload,
+                                       ref: '../uploadFileButton',
                                        hidden: true
                                }, {
-                                       iconCls: 'x-btn-download',
+                                       iconCls: 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-extension-download',
                                        tooltip: TYPO3.lang.cmd_download,
-                                       hidden: true
+                                       ref: '../downloadFileButton',
+                                       disabled: true,
+                                       handler: function() {
+                                               var node = fileTree.getSelectionModel().getSelectedNode();
+                                               if (node.isLeaf()) {
+                                                       this.downloadFile(node.attributes.id);
+                                               }
+                                       },
+                                       scope: this
                                }]
                        }, {
 
@@ -190,6 +210,7 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
                                                                        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();
+                                                                       this.layout.center.panel.fileLabel.removeClass('fileChanged');
                                                                } else {
                                                                        TYPO3.Flashmessage.display(TYPO3.Severity.error, TYPO3.lang.cmd_save, response.error, 5);
                                                                }
@@ -277,7 +298,58 @@ TYPO3.EM.ExtFilelist = Ext.extend(Ext.Panel, {
 
        onRender: function() {
                TYPO3.EM.ExtFilelist.superclass.onRender.apply(this, arguments);
-       }
+       },
+
+       downloadFile: function(path) {
+
+                       // create hidden target iframe
+                       var id = Ext.id();
+                       var frame = document.createElement('iframe');
+                       frame.id = id;
+                       frame.name = id;
+                       frame.className = 'x-hidden';
+                       if (Ext.isIE) {
+                               frame.src = Ext.SSL_SECURE_URL;
+                       }
+
+                       document.body.appendChild(frame);
+
+                       if (Ext.isIE) {
+                               document.frames[id].name = id;
+                       }
+
+                       var form = Ext.DomHelper.append(document.body, {
+                                               tag: 'form',
+                                               method: 'post',
+                                               action: 'mod.php?M=tools_em',
+                                               target: id
+                                       });
+
+                       document.body.appendChild(form);
+
+                       var hidden;
+
+                       // append path to form
+                       hidden = document.createElement('input');
+                       hidden.type = 'hidden';
+                       hidden.name = 'CMD[downloadExtFile]';
+                       hidden.value = path;
+                       form.appendChild(hidden);
+
+                       var callback = function() {
+                               Ext.EventManager.removeListener(frame, 'load', callback, this);
+                               setTimeout(function() {
+                                       document.body.removeChild(form);
+                               }, 100);
+                               setTimeout(function() {
+                                       document.body.removeChild(frame);
+                               }, 110);
+                       };
+
+                       Ext.EventManager.on(frame, 'load', callback, this);
+
+                       form.submit();
+               }
 
 
 
@@ -475,9 +547,11 @@ TYPO3.EM.CodeMirror = Ext.extend(Ext.Panel, {
                if (TYPO3.settings.EM.fileSaveAllowed) {
                        if (!changed) {
                                this.ownerCt.saveButton.disable();
+                               this.ownerCt.fileLabel.removeClass('fileChanged');
                                this.contentChanged = false;
                        } else {
                                this.ownerCt.saveButton.enable();
+                               this.ownerCt.fileLabel.addClass('fileChanged');
                                this.contentChanged = true;
                        }
                }
index 8748ce1..c018374 100644 (file)
@@ -123,7 +123,6 @@ TYPO3.EM.Languages = Ext.extend(Ext.FormPanel, {
        selectedLanguages: [],
        cb: null,
 
-
        initComponent: function() {
                var langExtStore = new Ext.data.DirectStore({
                        storeId     : 'em-languageext-store',
@@ -269,9 +268,10 @@ TYPO3.EM.Languages = Ext.extend(Ext.FormPanel, {
                Ext.getCmp('lang-updatebutton').handler = this.langActionHandler.createDelegate(this);
        } ,
 
-       onExtensionLangguageGridRender: function() {
-               this.on('cellclick',function(grid, rowIndex, columnIndex, event) {
-                       if (!this.interruptProcess && columnIndex > 0) {
+       onExtensionLangguageGridRender: function(grid) {
+               grid.fetchingProcess = false;
+               this.on('cellclick', function(grid, rowIndex, columnIndex, event) {
+                       if (!grid.fetchingProcess && columnIndex > 0) {
                                var record = grid.store.getAt(rowIndex);
                                var lang = grid.colModel.config[columnIndex].dataIndex;
                                Ext.Msg.confirm(
@@ -293,25 +293,29 @@ TYPO3.EM.Languages = Ext.extend(Ext.FormPanel, {
                                        this
                                );
                        }
-               });
+               }, 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();
+               var languagegrid = Ext.getCmp('em-languagegrid');
+               var buttonPanel = Ext.getCmp('LanguagesActionPanel');
+               var progressBar = Ext.getCmp('langpb');
+               var grid = Ext.getCmp('em-extlanguagegrid');
+
+               buttonPanel.hide();
+               progressBar.show();
+           languagegrid.disable();
+
 
                if (button.id === 'lang-checkbutton') {
                                // check languages
                        this.startFetchLanguages(0, Ext.StoreMgr.get('em-languageext-store'), function(){
                                TYPO3.EM.LanguagesProgressBar.updateText(this.interruptProcess ? TYPO3.lang.msg_interrupted : TYPO3.lang.msg_finished);
                                (function() {
-                                       pp.hide();
-                                       bp.show();
-                                       lg.enable();
+                                       progressBar.hide();
+                                       buttonPanel.show();
+                                       languagegrid.enable();
+                                       grid.fetchingProcess = false;
                                }).defer(1000, this);
                                if (!this.interruptProcess) {
                                        TYPO3.Flashmessage.display(TYPO3.Severity.information, TYPO3.lang.translation_checking_extension, TYPO3.lang.translation_check_done, 3);
@@ -326,9 +330,10 @@ TYPO3.EM.Languages = Ext.extend(Ext.FormPanel, {
                                        TYPO3.Flashmessage.display(TYPO3.Severity.information, TYPO3.lang.translation_update_extension, TYPO3.lang.translation_update_done, 3);
                                        Ext.getCmp('em-extlanguagegrid').getSelectionModel().clearSelections();
                                }
-                               pp.hide();
-                               bp.show();
-                               lg.enable();
+                               progressBar.hide();
+                               buttonPanel.show();
+                               languagegrid.enable();
+                               grid.fetchingProcess = false;
                        });
                }
        },
@@ -376,6 +381,7 @@ TYPO3.EM.Languages = Ext.extend(Ext.FormPanel, {
                }
                // start process
                this.interruptProcess = false;
+               Ext.getCmp('em-extlanguagegrid').fetchingProcess = true;
                this.fetchLanguage();
        },
 
index b468753..cfe664b 100644 (file)
@@ -44,255 +44,257 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
        rowExpander: new Ext.ux.grid.RowPanelExpander({
                hideable: false,
                id: 'LocalListExpander',
-               createExpandingRowPanelItems: function(record, rowIndex){
+               createExpandingRowPanelItems: function(record, rowIndex) {
                        var panelItems = [
                                new Ext.TabPanel({
-                                       plain: true,
-                                       activeTab: 0,
-                                       defaults: {
-                                               cls: 'gridrowpanel',
-                                               height: 250
-                                       },
-                                       record: record,
-                                       items:[
-                                               {
-                                                       title: TYPO3.lang.msg_info,
-                                                       html: TYPO3.EM.Layouts.showExtInfo(record.data),
-                                                       listeners: {
-                                                               activate: function(panel) {
-                                                                       var updateScriptLink = Ext.fly('update-check-' + record.data.extkey);
-                                                                       if (updateScriptLink) {
-                                                                               updateScriptLink.on('click', function() {
-                                                                                       panel.getEl().mask('loading');
-                                                                                       TYPO3.EM.ExtDirect.getExtensionUpdateScript(record.data.extkey, function(response) {
-                                                                                               panel.getEl().unmask();
-                                                                                               if (response.success) {
-                                                                                                       var w = new Ext.Window({
-                                                                                                               width: 500,
-                                                                                                               height: 500,
-                                                                                                               layout: 'fit',
-                                                                                                               title: TYPO3.lang.ext_details_updateScript + ' (' + record.data.extkey + ')',
-                                                                                                               items: [{
-                                                                                                                       xtype: 'iframePanel',
-                                                                                                                       id: 'updateScript-' + record.data.extkey
-                                                                                                               }]
-                                                                                                       }).show(true, function(){
-                                                                                                               Ext.getCmp('updateScript-' + record.data.extkey).setUrl('mod.php?M=tools_em&nodoc=1&CMD[showExt]=' + record.data.extkey + '&SET[singleDetails]=updateModule');
+                                                       plain: true,
+                                                       activeTab: 0,
+                                                       defaults: {
+                                                               cls: 'gridrowpanel',
+                                                               height: 250
+                                                       },
+                                                       record: record,
+                                                       items:[
+                                                               {
+                                                                       title: TYPO3.lang.msg_info,
+                                                                       html: TYPO3.EM.Layouts.showExtInfo(record.data),
+                                                                       listeners: {
+                                                                               activate: function(panel) {
+                                                                                       var updateScriptLink = Ext.fly('update-check-' + record.data.extkey);
+                                                                                       if (updateScriptLink) {
+                                                                                               updateScriptLink.on('click', function() {
+                                                                                                       panel.getEl().mask('loading');
+                                                                                                       TYPO3.EM.ExtDirect.getExtensionUpdateScript(record.data.extkey, function(response) {
+                                                                                                               panel.getEl().unmask();
+                                                                                                               if (response.success) {
+                                                                                                                       var w = new Ext.Window({
+                                                                                                                                               width: 500,
+                                                                                                                                               height: 500,
+                                                                                                                                               layout: 'fit',
+                                                                                                                                               title: TYPO3.lang.ext_details_updateScript + ' (' + record.data.extkey + ')',
+                                                                                                                                               items: [
+                                                                                                                                                       {
+                                                                                                                                                               xtype: 'iframePanel',
+                                                                                                                                                               id: 'updateScript-' + record.data.extkey
+                                                                                                                                                       }
+                                                                                                                                               ]
+                                                                                                                                       }).show(true, function() {
+                                                                                                                               Ext.getCmp('updateScript-' + record.data.extkey).setUrl('mod.php?M=tools_em&nodoc=1&CMD[showExt]=' + record.data.extkey + '&SET[singleDetails]=updateModule');
+                                                                                                                       });
+                                                                                                               } else {
+                                                                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.information, TYPO3.lang.cmd_update, TYPO3.lang.repository_update_not_needed, 5);
+                                                                                                               }
                                                                                                        });
-                                                                                               } else {
-                                                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.information, TYPO3.lang.cmd_update, TYPO3.lang.repository_update_not_needed, 5);
-                                                                                               }
-                                                                                       });
-                                                                               }, this);
-                                                                       }
+                                                                                               }, this);
+                                                                                       }
 
-                                                               }
-                                                       }
-                                               },
-                                               {
-                                                       title: TYPO3.lang.msg_dbupdate,
-                                                       html: TYPO3.EM.App.loadingIndicor,
-                                                       xtype: 'form',
-                                                       disabled: record.data.installed === 0,
-                                                       listeners: {
-                                                               activate: function(panel) {
-                                                                       panel.update(TYPO3.EM.App.loadingIndicor);
-                                                                       TYPO3.EM.ExtDirect.getExtensionUpdate(record.data.extkey, function(response) {
-                                                                               panel.update(response, true,  this.readUpdateForm.createDelegate(this));
-                                                                       }, this);
-                                                               }
-                                                       },
-                                                       scope: this,
-                                                       readUpdateForm: function() {
-                                                               var button = Ext.get('update-submit-' + record.data.extkey);
-                                                               Ext.apply(this.form,{
-                                                                       api: {
-                                                                               submit: TYPO3.EM.ExtDirect.saveExtensionConfiguration
-                                                                       },
-                                                                       paramsAsHash: false
-                                                               });
-                                                               if (button) {
-                                                                       button.on('click', function() {
-                                                                               this.doUpdate(false);
-                                                                       }, this);
-                                                               }
-                                                       },
-                                                       doUpdate: function(noSave) {
-                                                               this.form.submit({
-                                                                       waitMsg : noSave ? ' ' : TYPO3.lang.action_updateDatabase,
-                                                                       params: {
-                                                                               extkey: record.data.extkey,
-                                                                               exttype: record.data.typeShort,
-                                                                               noSave: noSave
+                                                                               }
+                                                                       }
+                                                               },
+                                                               {
+                                                                       title: TYPO3.lang.msg_dbupdate,
+                                                                       html: TYPO3.EM.App.loadingIndicor,
+                                                                       xtype: 'form',
+                                                                       disabled: record.data.installed === 0,
+                                                                       listeners: {
+                                                                               activate: function(panel) {
+                                                                                       panel.update(TYPO3.EM.App.loadingIndicor);
+                                                                                       TYPO3.EM.ExtDirect.getExtensionUpdate(record.data.extkey, function(response) {
+                                                                                               panel.update(response, true, this.readUpdateForm.createDelegate(this));
+                                                                                       }, this);
+                                                                               }
                                                                        },
-                                                                       success: function(form, action) {
-                                                                               this.ownerCt.activeTab.update(TYPO3.EM.App.loadingIndicor);
-                                                                               TYPO3.EM.ExtDirect.getExtensionUpdate(record.data.extkey, function(response) {
-                                                                                       this.ownerCt.activeTab.update(response, true,  this.readUpdateForm.createDelegate(this));
-                                                                       }, this);
+                                                                       scope: this,
+                                                                       readUpdateForm: function() {
+                                                                               var button = Ext.get('update-submit-' + record.data.extkey);
+                                                                               Ext.apply(this.form, {
+                                                                                                       api: {
+                                                                                                               submit: TYPO3.EM.ExtDirect.saveExtensionConfiguration
+                                                                                                       },
+                                                                                                       paramsAsHash: false
+                                                                                               });
+                                                                               if (button) {
+                                                                                       button.on('click', function() {
+                                                                                               this.doUpdate(false);
+                                                                                       }, this);
+                                                                               }
                                                                        },
-                                                                       failure: function(form, action) {
-                                                                               if (action.failureType === Ext.form.Action.CONNECT_FAILURE) {
-                                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.error, TYPO3.lang.msg_error,
+                                                                       doUpdate: function(noSave) {
+                                                                               this.form.submit({
+                                                                                                       waitMsg : noSave ? ' ' : TYPO3.lang.action_updateDatabase,
+                                                                                                       params: {
+                                                                                                               extkey: record.data.extkey,
+                                                                                                               exttype: record.data.typeShort,
+                                                                                                               noSave: noSave
+                                                                                                       },
+                                                                                                       success: function(form, action) {
+                                                                                                               this.ownerCt.activeTab.update(TYPO3.EM.App.loadingIndicor);
+                                                                                                               TYPO3.EM.ExtDirect.getExtensionUpdate(record.data.extkey, function(response) {
+                                                                                                                       this.ownerCt.activeTab.update(response, true, this.readUpdateForm.createDelegate(this));
+                                                                                                               }, this);
+                                                                                                       },
+                                                                                                       failure: function(form, action) {
+                                                                                                               if (action.failureType === Ext.form.Action.CONNECT_FAILURE) {
+                                                                                                                       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, TYPO3.lang.invalid, action.result.errormsg, 5);
+                                                                                                                                                       action.response.statusText, 5);
+                                                                                                               }
+                                                                                                               if (action.failureType === Ext.form.Action.SERVER_INVALID) {
+                                                                                                                       // server responded with success = false
+                                                                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.error, TYPO3.lang.invalid, action.result.errormsg, 5);
+                                                                                                               }
+                                                                                                       },
+                                                                                                       scope: this
+                                                                                               });
+                                                                       }
+                                                               },
+                                                               {
+                                                                       title: TYPO3.lang.msg_configuration,
+                                                                       xtype: 'form',
+                                                                       disabled: record.data.installed === 0,
+                                                                       html: TYPO3.EM.App.loadingIndicor,
+                                                                       listeners: {
+                                                                               activate: function(panel) {
+                                                                                       panel.update(TYPO3.EM.App.loadingIndicor);
+                                                                                       TYPO3.EM.ExtDirect.getExtensionConfiguration(record.data.extkey, function(response) {
+                                                                                               panel.update(response, true, this.readConfigForm.createDelegate(this));
+                                                                                       }, this);
                                                                                }
-                                                                        },
-                                                                       scope: this
-                                                                });
-                                                       }
-                                               },
-                                               {
-                                                       title: TYPO3.lang.msg_configuration,
-                                                       xtype: 'form',
-                                                       disabled: record.data.installed === 0,
-                                                       html: TYPO3.EM.App.loadingIndicor,
-                                                       listeners: {
-                                                               activate: function(panel) {
-                                                                       panel.update(TYPO3.EM.App.loadingIndicor);
-                                                                       TYPO3.EM.ExtDirect.getExtensionConfiguration(record.data.extkey, function(response) {
-                                                                               panel.update(response, true, this.readConfigForm.createDelegate(this));
-                                                                       }, this);
-                                                               }
-                                                       },
-                                                       scope: this,
-                                                       readConfigForm: function() {
-                                                               var button = Ext.get('configuration-submit-' + record.data.extkey);
-                                                               if (!button) {
-                                                                       var button = Ext.get('update-submit-' + record.data.extkey);
-                                                               }
-                                                               var select = Ext.select('.mod-menu-template-select');
-                                                               Ext.apply(this.form,{
-                                                                       api: {
-                                                                               submit: TYPO3.EM.ExtDirect.saveExtensionConfiguration
                                                                        },
-                                                                       paramsAsHash: false
-                                                               });
-                                                               if (select) {
-                                                                       var converted = new Ext.form.ComboBox({
-                                                                               transform: select.elements[0],
-                                                                               typeAhead: true,
-                                                                               listeners: {
-                                                                                       beforequery: function(o) {
-                                                                                               o.forceAll = true;
-                                                                                       },
-                                                                                       select: function() {
-                                                                                               this.doSubmit(true);
-                                                                                       },
-                                                                                       scope: this
+                                                                       scope: this,
+                                                                       readConfigForm: function() {
+                                                                               var button = Ext.get('configuration-submit-' + record.data.extkey);
+                                                                               if (!button) {
+                                                                                       var button = Ext.get('update-submit-' + record.data.extkey);
                                                                                }
-                                                                       });
-                                                               }
-                                                               if (button) {
-                                                                       button.on('click', function() {
-                                                                               this.doSubmit(false);
-                                                                       }, this);
-                                                               }
-                                                       },
-                                                       doSubmit: function(noSave) {
-                                                               this.form.submit({
-                                                                       waitMsg : noSave ? ' ' : TYPO3.lang.action_saving_settings,
-                                                                       params: {
-                                                                               extkey: record.data.extkey,
-                                                                               exttype: record.data.typeShort,
-                                                                               noSave: noSave
-                                                                       },
-                                                                       success: function(form, action) {
-                                                                               if (action.result.html) {
-                                                                                       this.ownerCt.activeTab.update(action.result.html, true, this.readConfigForm.createDelegate(this));
-                                                                               } else {
-                                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.ok, TYPO3.lang.msg_configuration, TYPO3.lang.configurationSaved, 5);
+                                                                               var select = Ext.select('.mod-menu-template-select');
+                                                                               Ext.apply(this.form, {
+                                                                                                       api: {
+                                                                                                               submit: TYPO3.EM.ExtDirect.saveExtensionConfiguration
+                                                                                                       },
+                                                                                                       paramsAsHash: false
+                                                                                               });
+                                                                               if (select) {
+                                                                                       var converted = new Ext.form.ComboBox({
+                                                                                                               transform: select.elements[0],
+                                                                                                               typeAhead: true,
+                                                                                                               listeners: {
+                                                                                                                       beforequery: function(o) {
+                                                                                                                               o.forceAll = true;
+                                                                                                                       },
+                                                                                                                       select: function() {
+                                                                                                                               this.doSubmit(true);
+                                                                                                                       },
+                                                                                                                       scope: this
+                                                                                                               }
+                                                                                                       });
+                                                                               }
+                                                                               if (button) {
+                                                                                       button.on('click', function() {
+                                                                                               this.doSubmit(false);
+                                                                                       }, this);
                                                                                }
                                                                        },
-                                                                       failure: function(form, action) {
-                                                                               if (action.failureType === Ext.form.Action.CONNECT_FAILURE) {
-                                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.error, TYPO3.lang.msg_error,
+                                                                       doSubmit: function(noSave) {
+                                                                               this.form.submit({
+                                                                                                       waitMsg : noSave ? ' ' : TYPO3.lang.action_saving_settings,
+                                                                                                       params: {
+                                                                                                               extkey: record.data.extkey,
+                                                                                                               exttype: record.data.typeShort,
+                                                                                                               noSave: noSave
+                                                                                                       },
+                                                                                                       success: function(form, action) {
+                                                                                                               if (action.result.html) {
+                                                                                                                       this.ownerCt.activeTab.update(action.result.html, true, this.readConfigForm.createDelegate(this));
+                                                                                                               } else {
+                                                                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.ok, 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, TYPO3.lang.msg_error,
                                                                                                                                        TYPO3.lang.msg_error + ':' + action.response.status + ': ' +
-                                                                                                                                       action.response.statusText, 5);
+                                                                                                                                                       action.response.statusText, 5);
+                                                                                                               }
+                                                                                                               if (action.failureType === Ext.form.Action.SERVER_INVALID) {
+                                                                                                                       // server responded with success = false
+                                                                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.error, TYPO3.lang.invalid, action.result.errormsg, 5);
+                                                                                                               }
+                                                                                                       },
+                                                                                                       scope: this
+                                                                                               });
+                                                                       }
+                                                               },
+                                                               {
+                                                                       title: TYPO3.lang.msg_files,
+                                                                       xtype: 'extfilelist',
+                                                                       recordData: record.data,
+                                                                       cls: 'gridrowfilespanel'
+                                                               },
+                                                               {
+                                                                       xtype: 'terupload',
+                                                                       title: TYPO3.lang.cmd_terupload,
+                                                                       recordData: record.data,
+                                                                       disabled: !TYPO3.settings.EM.hasCredentials
+                                                               },
+                                                               {
+                                                                       title: TYPO3.lang.msg_developerinformation,
+                                                                       html: '<div class="loading-indicator">' + TYPO3.lang.action_loading + '</div>',
+                                                                       listeners: {
+                                                                               activate: function(panel) {
+                                                                                       TYPO3.EM.ExtDirect.getExtensionDevelopInfo(record.data.extkey, function(response) {
+                                                                                               panel.update(response);
+                                                                                       });
                                                                                }
-                                                                               if (action.failureType === Ext.form.Action.SERVER_INVALID) {
-                                                                                               // server responded with success = false
-                                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.error, TYPO3.lang.invalid, action.result.errormsg, 5);
+                                                                       }
+                                                               },
+                                                               {
+                                                                       title: TYPO3.lang.details_maintenance,
+                                                                       //disabled: record.data.installed === 0,
+                                                                       html: TYPO3.EM.App.loadingIndicor,
+                                                                       listeners: {
+                                                                               activate: function(panel) {
+                                                                                       TYPO3.EM.ExtDirect.getExtensionBackupDelete(record.data.extkey, function(response) {
+                                                                                               panel.update(response, true, this.readBackupDeleteLinks.createDelegate(this));
+                                                                                       }, this);
+                                                                               }
+                                                                       },
+                                                                       scope: this,
+                                                                       readBackupDeleteLinks: function() {
+                                                                               var emconflink = Ext.select('a.emconfLink');
+                                                                               if (emconflink.elements.length) {
+                                                                                       var link = emconflink.elements[0];
+                                                                                       link.removeAttribute('onclick');
+                                                                                       Ext.get(link).on('click', function() {
+                                                                                               this.waitBox = Ext.Msg.wait(TYPO3.lang.ext_details_update_em_conf, record.data.extkey);
+                                                                                               TYPO3.EM.ExtDirect.cleanEmConf(record.data.extkey, function(response) {
+                                                                                                       this.waitBox.hide();
+                                                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.ok, TYPO3.lang.ext_details_update_em_conf, response.result, 5);
+                                                                                               }, 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);
+                                                                                       });
                                                                                }
-                                                                        },
-                                                                       scope: this
-                                                                });
-                                                       }
-                                               },
-                                               {
-                                                       title: TYPO3.lang.msg_files,
-                                                       xtype: 'extfilelist',
-                                                       recordData: record.data,
-                                                       cls: 'gridrowfilespanel'
-                                               },
-                                               {
-                                                       xtype: 'terupload',
-                                                       title: TYPO3.lang.cmd_terupload,
-                                                       recordData: record.data,
-                                                       disabled: !TYPO3.settings.EM.hasCredentials
-                                               },
-                                               {
-                                                       title: TYPO3.lang.msg_developerinformation,
-                                                       html: '<div class="loading-indicator">' + TYPO3.lang.action_loading+ '</div>',
-                                                       listeners: {
-                                                               activate: function(panel) {
-                                                                       TYPO3.EM.ExtDirect.getExtensionDevelopInfo(record.data.extkey, function(response) {
-                                                                               panel.update(response);
-                                                                       });
-                                                               }
-                                                       }
-                                               },
-                                               {
-                                                       title: TYPO3.lang.details_maintenance,
-                                                       //disabled: record.data.installed === 0,
-                                                       html: TYPO3.EM.App.loadingIndicor,
-                                                       listeners: {
-                                                               activate: function(panel) {
-                                                                       TYPO3.EM.ExtDirect.getExtensionBackupDelete(record.data.extkey, function(response) {
-                                                                               panel.update(response, true, this.readBackupDeleteLinks.createDelegate(this));
-                                                                       }, this);
-                                                               }
-                                                       },
-                                                       scope: this,
-                                                       readBackupDeleteLinks: function() {
-                                                               var emconflink = Ext.select('a.emconfLink');
-                                                               if (emconflink.elements.length) {
-                                                                       var link = emconflink.elements[0];
-                                                                       link.removeAttribute('onclick');
-                                                                       Ext.get(link).on('click', function() {
-                                                                               this.waitBox = Ext.Msg.wait(TYPO3.lang.ext_details_update_em_conf, record.data.extkey);
-                                                                               TYPO3.EM.ExtDirect.cleanEmConf(record.data.extkey, function(response) {
-                                                                                       this.waitBox.hide();
-                                                                                       TYPO3.Flashmessage.display(TYPO3.Severity.ok, TYPO3.lang.ext_details_update_em_conf, response.result, 5);
-                                                                               }, 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);
-                                                                       });
-                                                               }
 
-                                                       }
-                                               }
-                                       ]
-                               })
+                                                                       }
+                                                               }
+                                                       ]
+                                               })
                        ];
                        return panelItems;
                }
@@ -302,43 +304,43 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                this.localstore = new Ext.data.GroupingStore({
                        storeId: 'localstore',
                        proxy: new Ext.data.DirectProxy({
-                               directFn: TYPO3.EM.ExtDirect.getExtensionList
-                       }),
+                                               directFn: TYPO3.EM.ExtDirect.getExtensionList
+                                       }),
                        autoLoad: false,
                        reader: new Ext.data.JsonReader({
-                               idProperty: 'extkey',
-                               root: 'data',
-                               totalProperty: 'length',
-                               fields:[
-                                       {name:'install'},
-                                       {name:'title'},
-                                       {name:'extkey'},
-                                       {name:'category'},
-                                       {name:'version'},
-                                       {name:'type'},
-                                       {name:'state'},
-                                       {name:'icon'},
-                                       {name:'description'},
-                                       {name:'shy'},
-                                       {name:'installed'},
-                                       {name:'author'},
-                                       {name:'author_email'},
-                                       {name:'author_company'},
-                                       {name:'download'},
-                                       {name:'doc'},
-                                       {name:'typeShort'},
-                                       {name:'nodePath'},
-                                       {name:'reviewstate'},
-                                       {name:'required'},
-                                       {name:'doubleInstall'},
-                                       {name:'doubleInstallShort'},
-                                       {name:'updateModule'},
-                                       {name:'doNotLoadInFE'},
-                                       {name:'depends'},
-                                       {name:'conflicts'},
-                                       {name:'suggests'}
-                               ]
-                       }),
+                                               idProperty: 'extkey',
+                                               root: 'data',
+                                               totalProperty: 'length',
+                                               fields:[
+                                                       {name:'install'},
+                                                       {name:'title'},
+                                                       {name:'extkey'},
+                                                       {name:'category'},
+                                                       {name:'version'},
+                                                       {name:'type'},
+                                                       {name:'state'},
+                                                       {name:'icon'},
+                                                       {name:'description'},
+                                                       {name:'shy'},
+                                                       {name:'installed'},
+                                                       {name:'author'},
+                                                       {name:'author_email'},
+                                                       {name:'author_company'},
+                                                       {name:'download'},
+                                                       {name:'doc'},
+                                                       {name:'typeShort'},
+                                                       {name:'nodePath'},
+                                                       {name:'reviewstate'},
+                                                       {name:'required'},
+                                                       {name:'doubleInstall'},
+                                                       {name:'doubleInstallShort'},
+                                                       {name:'updateModule'},
+                                                       {name:'doNotLoadInFE'},
+                                                       {name:'depends'},
+                                                       {name:'conflicts'},
+                                                       {name:'suggests'}
+                                               ]
+                                       }),
 
                        sortInfo:{
                                field: 'title',
@@ -351,7 +353,7 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                                beforeload: function() {
 
                                },
-                               datachanged: function(store){
+                               datachanged: function(store) {
                                        Ext.getCmp('displayExtensionLabel').setText(TYPO3.lang.extensions + ' ' + store.data.length);
                                        var hasFilters = false;
                                        TYPO3.EM.Filters.filters.each(function (filter) {
@@ -381,12 +383,12 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
 
                                scope: this
                        },
-                       validateRecord: function(record){
+                       validateRecord: function(record) {
                                var control = Ext.getCmp('localSearchField');
                                if (control) {
                                        var filtertext = control.getRawValue();
                                        if (filtertext) {
-                                                       //filter by search string
+                                               //filter by search string
                                                var re = new RegExp(Ext.escapeRe(filtertext), 'gi');
                                                var isMatched = record.data.extkey.match(re) || record.data.title.match(re);
                                                if (!isMatched) {
@@ -394,10 +396,10 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                                                }
                                        }
                                }
-                               if (TYPO3.settings.EM.hide_obsolete == 1 && record.data.state === 'obsolete'){
+                               if (TYPO3.settings.EM.hide_obsolete == 1 && record.data.state === 'obsolete') {
                                        return false;
                                }
-                               if (TYPO3.settings.EM.hide_shy == 1 && record.data.shy == 1){
+                               if (TYPO3.settings.EM.hide_shy == 1 && record.data.shy == 1) {
                                        return false;
                                }
                                if (TYPO3.settings.EM.display_installed == 1 && record.data.installed == 0) {
@@ -431,14 +433,14 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                });
 
                var cols = [
-                               TYPO3.settings.EM.inlineToWindow == 1 ? TYPO3.EM.GridColumns.DummyColumn : this.rowExpander,
-                               TYPO3.EM.GridColumns.InstallExtension,
-                               TYPO3.EM.GridColumns.ExtensionTitle,
-                               TYPO3.EM.GridColumns.ExtensionKey,
-                               TYPO3.EM.GridColumns.ExtensionCategory,
-                               TYPO3.EM.GridColumns.ExtensionAuthor,
-                               TYPO3.EM.GridColumns.ExtensionType,
-                               TYPO3.EM.GridColumns.ExtensionState
+                       TYPO3.settings.EM.inlineToWindow == 1 ? TYPO3.EM.GridColumns.DummyColumn : this.rowExpander,
+                       TYPO3.EM.GridColumns.InstallExtension,
+                       TYPO3.EM.GridColumns.ExtensionTitle,
+                       TYPO3.EM.GridColumns.ExtensionKey,
+                       TYPO3.EM.GridColumns.ExtensionCategory,
+                       TYPO3.EM.GridColumns.ExtensionAuthor,
+                       TYPO3.EM.GridColumns.ExtensionType,
+                       TYPO3.EM.GridColumns.ExtensionState
                ];
 
                var cm = new Ext.grid.ColumnModel({
@@ -446,12 +448,11 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                        defaults: {
                                sortable: true
                        }
-
                });
 
                var sm = Ext.emptyFn();
                if (TYPO3.settings.EM.inlineToWindow == 1) {
-                       var sm = new Ext.grid.RowSelectionModel({
+                       sm = new Ext.grid.RowSelectionModel({
                                singleSelect: true
                        });
                }
@@ -466,20 +467,21 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                        sm: sm,
                        plugins: TYPO3.settings.EM.inlineToWindow == 1 ? [TYPO3.EM.Filters] : [this.rowExpander, TYPO3.EM.Filters],
                        view : new Ext.grid.GroupingView({
-                               forceFit : true,
-                               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
-                       }),
+                                               forceFit : true,
+                                               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
+                                       }),
 
                        tbar: [
                                ' ',
                                {
                                        text: TYPO3.lang.cmd_filter,
                                        tooltip: TYPO3.lang.help_localFilter,
+                                       tooltipType : 'qtip',
                                        scale: 'small',
                                        ref: '../filterMenuButton',
                                        iconAlign: 'right',
@@ -489,25 +491,27 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                                                                checked: TYPO3.settings.EM.display_installed ? true : false,
                                                                text: TYPO3.lang.display_installedOnly,
                                                                handler: function(item, event) {
-                                                                       TYPO3.settings.EM.display_installed =  item.checked ? 0 : 1;
+                                                                       TYPO3.settings.EM.display_installed = item.checked ? 0 : 1;
                                                                        TYPO3.EM.ExtDirect.saveSetting('display_installed', TYPO3.settings.EM.display_installed);
                                                                        this.filterRecords();
                                                                },
                                                                scope: this
-                                                       }, {
+                                                       },
+                                                       {
                                                                checked: TYPO3.settings.EM.hide_shy ? true : false,
                                                                text: TYPO3.lang.hide_shy,
                                                                handler: function(item, event) {
-                                                                       TYPO3.settings.EM.hide_shy =  item.checked ? 0 : 1;
-                                                                               TYPO3.EM.ExtDirect.saveSetting('hide_shy', TYPO3.settings.EM.hide_shy);
-                                                                               this.filterRecords();
+                                                                       TYPO3.settings.EM.hide_shy = item.checked ? 0 : 1;
+                                                                       TYPO3.EM.ExtDirect.saveSetting('hide_shy', TYPO3.settings.EM.hide_shy);
+                                                                       this.filterRecords();
                                                                },
                                                                scope: this
-                                                       }, {
+                                                       },
+                                                       {
                                                                checked: TYPO3.settings.EM.hide_obsolete ? true : false,
                                                                text: TYPO3.lang.hide_obsolete,
                                                                handler: function(item, event) {
-                                                                       TYPO3.settings.EM.hide_obsolete = item. checked ? 0 : 1;
+                                                                       TYPO3.settings.EM.hide_obsolete = item.checked ? 0 : 1;
                                                                        TYPO3.EM.ExtDirect.saveSetting('hide_obsolete', TYPO3.settings.EM.hide_obsolete);
                                                                        this.filterRecords();
                                                                } ,
@@ -575,13 +579,13 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
                        this.localstore.load();
                }
 
-               this.on('rowdblclick',function(grid, rowIndex, event) {
+               this.on('rowdblclick', function(grid, rowIndex, event) {
                        if (TYPO3.settings.EM.inlineToWindow == 1) {
                                this.showExtInfoInWindow(rowIndex);
                        }
                });
 
-               this.on('cellclick',function(grid, rowIndex, columnIndex, event) {
+               this.on('cellclick', function(grid, rowIndex, columnIndex, event) {
                        if (TYPO3.settings.EM.inlineToWindow == 1 && columnIndex == 2) {
                                this.showExtInfoInWindow(rowIndex);
                        }
@@ -596,11 +600,11 @@ TYPO3.EM.LocalList = Ext.extend(Ext.grid.GridPanel, {
        showExtInfoInWindow: function(index) {
                var record = this.store.getAt(index);
                var id = 'window-extinfo-' + record.data.extkey;
-               var tabs = this.rowExpander.createExpandingRowPanelItems(record,index);
+               var tabs = this.rowExpander.createExpandingRowPanelItems(record, index);
 
                Ext.apply(tabs, {
-                       height: 'auto'
-               });
+                                       height: 'auto'
+                               });
 
                if (Ext.WindowMgr.get(id)) {
                        Ext.WindowMgr.bringToFront(id);
index 2e610be..5e439e6 100644 (file)
@@ -118,6 +118,10 @@ TYPO3.EM.RepositoryList = Ext.extend(Ext.grid.GridPanel, {
                        },
                        listeners: {
                                beforeload: function(store, records){
+                                       var control = Ext.getCmp('rsearchField');
+                                       if (control.getValue == '') {
+                                               return false;
+                                       }
                                        store.setBaseParam('rep', Ext.getCmp('repCombo').getValue());
                                        store.setBaseParam('installedOnly', this.showInstalledOnly);
                                        if (!this.showInstalledOnly) {
@@ -139,6 +143,11 @@ TYPO3.EM.RepositoryList = Ext.extend(Ext.grid.GridPanel, {
                                        } else {
                                                this.doClearFilters.hide();
                                        }
+                                       if (records.length === 0) {
+
+                                       } else {
+
+                                       }
                                },
                                scope: this
                        },
@@ -216,7 +225,7 @@ TYPO3.EM.RepositoryList = Ext.extend(Ext.grid.GridPanel, {
                                ' ',
                                {
                                        text: TYPO3.lang.cmd_filter,
-                                       qTip: TYPO3.lang.help_remoteFilter,
+                                       tooltip: TYPO3.lang.help_remoteFilter,
                                        scale: 'small',
                                        iconAlign: 'right',
                                        ref: '../filterMenuButton',
index fca1bef..f658caa 100644 (file)
@@ -513,8 +513,6 @@ TYPO3.EM.UserTools = Ext.extend(Ext.Panel, {
                        ]
                }).show();
        }
-
-
 });
 
 Ext.reg('TYPO3.EM.UserTools', TYPO3.EM.UserTools);
index 8fa0cb5..b8aebca 100644 (file)
@@ -202,6 +202,52 @@ Ext.override(Ext.grid.GridPanel, {
                if (colIndex >= 0) {
                        this.colModel.removeColumn(colIndex);
                }
+       },
+       applyState : function(state) {
+               var cm = this.colModel,
+                               cs = state.columns,
+                               store = this.store,
+                               s,
+                               c,
+                               colIndex;
+
+               if (cs) {
+                       for (var i = 0, len = cs.length; i < len; i++) {
+                               s = cs[i];
+                               c = cm.getColumnById(s.id);
+                               if (c) {
+                                       colIndex = cm.getIndexById(s.id);
+                                       cm.setState(colIndex, {
+                                               hidden: s.hidden || false,
+                                               width: s.width,
+                                               sortable: s.sortable,
+                                               hideable: cm.config[colIndex].hideable
+                                       });
+                                       if (colIndex != i) {
+                                               cm.moveColumn(colIndex, i);
+                                       }
+                               }
+                       }
+               }
+               if (store) {
+                       s = state.sort;
+                       if (s) {
+                               store[store.remoteSort ? 'setDefaultSort' : 'sort'](s.field, s.direction);
+                       }
+                       s = state.group;
+                       if (store.groupBy) {
+                               if (s) {
+                                       store.groupBy(s);
+                               } else {
+                                       store.clearGrouping();
+                               }
+                       }
+
+               }
+               var o = Ext.apply({}, state);
+               delete o.columns;
+               delete o.sort;
+               Ext.grid.GridPanel.superclass.applyState.call(this, o);
        }
 });
 
index 6b31cd3..13ee757 100644 (file)
@@ -12,167 +12,167 @@ Ext.ns('Ext.ux.form');
  * Creates a file upload field.
  * @xtype fileuploadfield
  */
-Ext.ux.form.FileUploadField = Ext.extend(Ext.form.TextField,  {
-    /**
-     * @cfg {String} buttonText The button text to display on the upload button (defaults to
-     * 'Browse...').  Note that if you supply a value for {@link #buttonCfg}, the buttonCfg.text
-     * value will be used instead if available.
-     */
-    buttonText: 'Browse...',
-    /**
-     * @cfg {Boolean} buttonOnly True to display the file upload field as a button with no visible
-     * text field (defaults to false).  If true, all inherited TextField members will still be available.
-     */
-    buttonOnly: false,
-    /**
-     * @cfg {Number} buttonOffset The number of pixels of space reserved between the button and the text field
-     * (defaults to 3).  Note that this only applies if {@link #buttonOnly} = false.
-     */
-    buttonOffset: 3,
-    /**
-     * @cfg {Object} buttonCfg A standard {@link Ext.Button} config object.
-     */
-
-    // private
-    readOnly: true,
-
-    /**
-     * @hide
-     * @method autoSize
-     */
-    autoSize: Ext.emptyFn,
-
-    // private
-    initComponent: function(){
-        Ext.ux.form.FileUploadField.superclass.initComponent.call(this);
-
-        this.addEvents(
-            /**
-             * @event fileselected
-             * Fires when the underlying file input field's value has changed from the user
-             * selecting a new file from the system file selection dialog.
-             * @param {Ext.ux.form.FileUploadField} this
-             * @param {String} value The file value returned by the underlying file input field
-             */
-            'fileselected'
-        );
-    },
-
-    // private
-    onRender : function(ct, position){
-        Ext.ux.form.FileUploadField.superclass.onRender.call(this, ct, position);
-
-        this.wrap = this.el.wrap({cls:'x-form-field-wrap x-form-file-wrap'});
-        this.el.addClass('x-form-file-text');
-        this.el.dom.removeAttribute('name');
-        this.createFileInput();
-
-        var btnCfg = Ext.applyIf(this.buttonCfg || {}, {
-            text: this.buttonText
-        });
-        this.button = new Ext.Button(Ext.apply(btnCfg, {
-            renderTo: this.wrap,
-            cls: 'x-form-file-btn' + (btnCfg.iconCls ? ' x-btn-icon' : '')
-        }));
-
-        if(this.buttonOnly){
-            this.el.hide();
-            this.wrap.setWidth(this.button.getEl().getWidth());
-        }
-
-        this.bindListeners();
-        this.resizeEl = this.positionEl = this.wrap;
-    },
-    
-    bindListeners: function(){
-        this.fileInput.on({
-            scope: this,
-            mouseenter: function() {
-                this.button.addClass(['x-btn-over','x-btn-focus'])
-            },
-            mouseleave: function(){
-                this.button.removeClass(['x-btn-over','x-btn-focus','x-btn-click'])
-            },
-            mousedown: function(){
-                this.button.addClass('x-btn-click')
-            },
-            mouseup: function(){
-                this.button.removeClass(['x-btn-over','x-btn-focus','x-btn-click'])
-            },
-            change: function(){
-                var v = this.fileInput.dom.value;
-                this.setValue(v);
-                this.fireEvent('fileselected', this, v);    
-            }
-        }); 
-    },
-    
-    createFileInput : function() {
-        this.fileInput = this.wrap.createChild({
-            id: this.getFileInputId(),
-            name: this.name||this.getId(),
-            cls: 'x-form-file',
-            tag: 'input',
-            type: 'file',
-            size: 1
-        });
-    },
-    
-    reset : function(){
-        this.fileInput.remove();
-        this.createFileInput();
-        this.bindListeners();
-        Ext.ux.form.FileUploadField.superclass.reset.call(this);
-    },
-
-    // private
-    getFileInputId: function(){
-        return this.id + '-file';
-    },
-
-    // private
-    onResize : function(w, h){
-        Ext.ux.form.FileUploadField.superclass.onResize.call(this, w, h);
-
-        this.wrap.setWidth(w);
-
-        if(!this.buttonOnly){
-            var w = this.wrap.getWidth() - this.button.getEl().getWidth() - this.buttonOffset;
-            this.el.setWidth(w);
-        }
-    },
-
-    // private
-    onDestroy: function(){
-        Ext.ux.form.FileUploadField.superclass.onDestroy.call(this);
-        Ext.destroy(this.fileInput, this.button, this.wrap);
-    },
-    
-    onDisable: function(){
-        Ext.ux.form.FileUploadField.superclass.onDisable.call(this);
-        this.doDisable(true);
-    },
-    
-    onEnable: function(){
-        Ext.ux.form.FileUploadField.superclass.onEnable.call(this);
-        this.doDisable(false);
-
-    },
-    
-    // private
-    doDisable: function(disabled){
-        this.fileInput.dom.disabled = disabled;
-        this.button.setDisabled(disabled);
-    },
-
-
-    // private
-    preFocus : Ext.emptyFn,
-
-    // private
-    alignErrorIcon : function(){
-        this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]);
-    }
+Ext.ux.form.FileUploadField = Ext.extend(Ext.form.TextField, {
+       /**
+        * @cfg {String} buttonText The button text to display on the upload button (defaults to
+        * 'Browse...').  Note that if you supply a value for {@link #buttonCfg}, the buttonCfg.text
+        * value will be used instead if available.
+        */
+       buttonText: 'Browse...',
+       /**
+        * @cfg {Boolean} buttonOnly True to display the file upload field as a button with no visible
+        * text field (defaults to false).  If true, all inherited TextField members will still be available.
+        */
+       buttonOnly: false,
+       /**
+        * @cfg {Number} buttonOffset The number of pixels of space reserved between the button and the text field
+        * (defaults to 3).  Note that this only applies if {@link #buttonOnly} = false.
+        */
+       buttonOffset: 3,
+       /**
+        * @cfg {Object} buttonCfg A standard {@link Ext.Button} config object.
+        */
+
+       // private
+       readOnly: true,
+
+       /**
+        * @hide
+        * @method autoSize
+        */
+       autoSize: Ext.emptyFn,
+
+       // private
+       initComponent: function() {
+               Ext.ux.form.FileUploadField.superclass.initComponent.call(this);
+
+               this.addEvents(
+                               /**
+                                * @event fileselected
+                                * Fires when the underlying file input field's value has changed from the user
+                                * selecting a new file from the system file selection dialog.
+                                * @param {Ext.ux.form.FileUploadField} this
+                                * @param {String} value The file value returned by the underlying file input field
+                                */
+                               'fileselected'
+               );
+       },
+
+       // private
+       onRender : function(ct, position) {
+               Ext.ux.form.FileUploadField.superclass.onRender.call(this, ct, position);
+
+               this.wrap = this.el.wrap({cls:'x-form-field-wrap x-form-file-wrap'});
+               this.el.addClass('x-form-file-text');
+               this.el.dom.removeAttribute('name');
+               this.createFileInput();
+
+               var btnCfg = Ext.applyIf(this.buttonCfg || {}, {
+                                       text: this.buttonText
+                               });
+               this.button = new Ext.Button(Ext.apply(btnCfg, {
+                                       renderTo: this.wrap,
+                                       cls: 'x-form-file-btn' + (btnCfg.iconCls ? ' x-btn-icon' : '')
+                               }));
+
+               if (this.buttonOnly) {
+                       this.el.hide();
+                       this.wrap.setWidth(this.button.getEl().getWidth());
+               }
+
+               this.bindListeners();
+               this.resizeEl = this.positionEl = this.wrap;
+       },
+
+       bindListeners: function() {
+               this.fileInput.on({
+                                       scope: this,
+                                       mouseenter: function() {
+                                               this.button.addClass(['x-btn-over','x-btn-focus'])
+                                       },
+                                       mouseleave: function() {
+                                               this.button.removeClass(['x-btn-over','x-btn-focus','x-btn-click'])
+                                       },
+                                       mousedown: function() {
+                                               this.button.addClass('x-btn-click')
+                                       },
+                                       mouseup: function() {
+                                               this.button.removeClass(['x-btn-over','x-btn-focus','x-btn-click'])
+                                       },
+                                       change: function() {
+                                               var v = this.fileInput.dom.value;
+                                               this.setValue(v);
+                                               this.fireEvent('fileselected', this, v);
+                                       }
+                               });
+       },
+
+       createFileInput : function() {
+               this.fileInput = this.wrap.createChild({
+                                       id: this.getFileInputId(),
+                                       name: this.name || this.getId(),
+                                       cls: 'x-form-file',
+                                       tag: 'input',
+                                       type: 'file',
+                                       size: 1
+                               });
+       },
+
+       reset : function() {
+               this.fileInput.remove();
+               this.createFileInput();
+               this.bindListeners();
+               Ext.ux.form.FileUploadField.superclass.reset.call(this);
+       },
+
+       // private
+       getFileInputId: function() {
+               return this.id + '-file';
+       },
+
+       // private
+       onResize : function(w, h) {
+               Ext.ux.form.FileUploadField.superclass.onResize.call(this, w, h);
+
+               this.wrap.setWidth(w);
+
+               if (!this.buttonOnly) {
+                       var w = this.wrap.getWidth() - this.button.getEl().getWidth() - this.buttonOffset;
+                       this.el.setWidth(w);
+               }
+       },
+
+       // private
+       onDestroy: function() {
+               Ext.ux.form.FileUploadField.superclass.onDestroy.call(this);
+               Ext.destroy(this.fileInput, this.button, this.wrap);
+       },
+
+       onDisable: function() {
+               Ext.ux.form.FileUploadField.superclass.onDisable.call(this);
+               this.doDisable(true);
+       },
+
+       onEnable: function() {
+               Ext.ux.form.FileUploadField.superclass.onEnable.call(this);
+               this.doDisable(false);
+
+       },
+
+       // private
+       doDisable: function(disabled) {
+               this.fileInput.dom.disabled = disabled;
+               this.button.setDisabled(disabled);
+       },
+
+
+       // private
+       preFocus : Ext.emptyFn,
+
+       // private
+       alignErrorIcon : function() {
+               this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]);
+       }
 
 });
 
index 76c0665..ee8103d 100644 (file)
-/*!
- * Ext JS Library 3.1.1
- * Copyright(c) 2006-2010 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
+/*!\r
+ * Ext JS Library 3.1.1\r
+ * Copyright(c) 2006-2010 Ext JS, LLC\r
+ * licensing@extjs.com\r
+ * http://www.extjs.com/license\r
+ */\r
 Ext.namespace('Ext.ux.grid.filter');\r
 \r
-/** \r
+/**\r
  * @class Ext.ux.grid.filter.Filter\r
  * @extends Ext.util.Observable\r
  * Abstract base class for filter implementations.\r
  */\r
 Ext.ux.grid.filter.Filter = Ext.extend(Ext.util.Observable, {\r
-    /**\r
-     * @cfg {Boolean} active\r
-     * Indicates the initial status of the filter (defaults to false).\r
-     */\r
-    active : false,\r
-    /**\r
-     * True if this filter is active.  Use setActive() to alter after configuration.\r
-     * @type Boolean\r
-     * @property active\r
-     */\r
-    /**\r
-     * @cfg {String} dataIndex \r
-     * The {@link Ext.data.Store} dataIndex of the field this filter represents.\r
-     * The dataIndex does not actually have to exist in the store.\r
-     */\r
-    dataIndex : null,\r
-    /**\r
-     * The filter configuration menu that will be installed into the filter submenu of a column menu.\r
-     * @type Ext.menu.Menu\r
-     * @property\r
-     */\r
-    menu : null,\r
-    /**\r
-     * @cfg {Number} updateBuffer\r
-     * Number of milliseconds to wait after user interaction to fire an update. Only supported \r
-     * by filters: 'list', 'numeric', and 'string'. Defaults to 500.\r
-     */\r
-    updateBuffer : 500,\r
+       /**\r
+        * @cfg {Boolean} active\r
+        * Indicates the initial status of the filter (defaults to false).\r
+        */\r
+       active : false,\r
+       /**\r
+        * True if this filter is active.  Use setActive() to alter after configuration.\r
+        * @type Boolean\r
+        * @property active\r
+        */\r
+       /**\r
+        * @cfg {String} dataIndex\r
+        * The {@link Ext.data.Store} dataIndex of the field this filter represents.\r
+        * The dataIndex does not actually have to exist in the store.\r
+        */\r
+       dataIndex : null,\r
+       /**\r
+        * The filter configuration menu that will be installed into the filter submenu of a column menu.\r
+        * @type Ext.menu.Menu\r
+        * @property\r
+        */\r
+       menu : null,\r
+       /**\r
+        * @cfg {Number} updateBuffer\r
+        * Number of milliseconds to wait after user interaction to fire an update. Only supported\r
+        * by filters: 'list', 'numeric', and 'string'. Defaults to 500.\r
+        */\r
+       updateBuffer : 500,\r
+\r
+       constructor : function (config) {\r
+               Ext.apply(this, config);\r
+\r
+               this.addEvents(\r
+                               /**\r
+                                * @event activate\r
+                                * Fires when an inactive filter becomes active\r
+                                * @param {Ext.ux.grid.filter.Filter} this\r
+                                */\r
+                               'activate',\r
+                               /**\r
+                                * @event deactivate\r
+                                * Fires when an active filter becomes inactive\r
+                                * @param {Ext.ux.grid.filter.Filter} this\r
+                                */\r
+                               'deactivate',\r
+                               /**\r
+                                * @event serialize\r
+                                * Fires after the serialization process. Use this to attach additional parameters to serialization\r
+                                * data before it is encoded and sent to the server.\r
+                                * @param {Array/Object} data A map or collection of maps representing the current filter configuration.\r
+                                * @param {Ext.ux.grid.filter.Filter} filter The filter being serialized.\r
+                                */\r
+                               'serialize',\r
+                               /**\r
+                                * @event update\r
+                                * Fires when a filter configuration has changed\r
+                                * @param {Ext.ux.grid.filter.Filter} this The filter object.\r
+                                */\r
+                               'update'\r
+               );\r
+               Ext.ux.grid.filter.Filter.superclass.constructor.call(this);\r
+\r
+               this.menu = new Ext.menu.Menu();\r
+               this.init(config);\r
+               if (config && config.value) {\r
+                       this.setValue(config.value);\r
+                       this.setActive(config.active !== false, true);\r
+                       delete config.value;\r
+               }\r
+       },\r
+\r
+       /**\r
+        * Destroys this filter by purging any event listeners, and removing any menus.\r
+        */\r
+       destroy : function() {\r
+               if (this.menu) {\r
+                       this.menu.destroy();\r
+               }\r
+               this.purgeListeners();\r
+       },\r
+\r
+       /**\r
+        * Template method to be implemented by all subclasses that is to\r
+        * initialize the filter and install required menu items.\r
+        * Defaults to Ext.emptyFn.\r
+        */\r
+       init : Ext.emptyFn,\r
+\r
+       /**\r
+        * Template method to be implemented by all subclasses that is to\r
+        * get and return the value of the filter.\r
+        * Defaults to Ext.emptyFn.\r
+        * @return {Object} The 'serialized' form of this filter\r
+        * @methodOf Ext.ux.grid.filter.Filter\r
+        */\r
+       getValue : Ext.emptyFn,\r
 \r
-    constructor : function (config) {\r
-        Ext.apply(this, config);\r
-            \r
-        this.addEvents(\r
-            /**\r
-             * @event activate\r
-             * Fires when an inactive filter becomes active\r
-             * @param {Ext.ux.grid.filter.Filter} this\r
-             */\r
-            'activate',\r
-            /**\r
-             * @event deactivate\r
-             * Fires when an active filter becomes inactive\r
-             * @param {Ext.ux.grid.filter.Filter} this\r
-             */\r
-            'deactivate',\r
-            /**\r
-             * @event serialize\r
-             * Fires after the serialization process. Use this to attach additional parameters to serialization\r
-             * data before it is encoded and sent to the server.\r
-             * @param {Array/Object} data A map or collection of maps representing the current filter configuration.\r
-             * @param {Ext.ux.grid.filter.Filter} filter The filter being serialized.\r
-             */\r
-            'serialize',\r
-            /**\r
-             * @event update\r
-             * Fires when a filter configuration has changed\r
-             * @param {Ext.ux.grid.filter.Filter} this The filter object.\r
-             */\r
-            'update'\r
-        );\r
-        Ext.ux.grid.filter.Filter.superclass.constructor.call(this);\r
+       /**\r
+        * Template method to be implemented by all subclasses that is to\r
+        * set the value of the filter and fire the 'update' event.\r
+        * Defaults to Ext.emptyFn.\r
+        * @param {Object} data The value to set the filter\r
+        * @methodOf Ext.ux.grid.filter.Filter\r
+        */\r
+       setValue : Ext.emptyFn,\r
 \r
-        this.menu = new Ext.menu.Menu();\r
-        this.init(config);\r
-        if(config && config.value){\r
-            this.setValue(config.value);\r
-            this.setActive(config.active !== false, true);\r
-            delete config.value;\r
-        }\r
-    },\r
+       /**\r
+        * Template method to be implemented by all subclasses that is to\r
+        * return <tt>true</tt> if the filter has enough configuration information to be activated.\r
+        * Defaults to <tt>return true</tt>.\r
+        * @return {Boolean}\r
+        */\r
+       isActivatable : function() {\r
+               return true;\r
+       },\r
 \r
-    /**\r
-     * Destroys this filter by purging any event listeners, and removing any menus.\r
-     */\r
-    destroy : function(){\r
-        if (this.menu){\r
-            this.menu.destroy();\r
-        }\r
-        this.purgeListeners();\r
-    },\r
+       /**\r
+        * Template method to be implemented by all subclasses that is to\r
+        * get and return serialized filter data for transmission to the server.\r
+        * Defaults to Ext.emptyFn.\r
+        */\r
+       getSerialArgs : Ext.emptyFn,\r
 \r
-    /**\r
-     * Template method to be implemented by all subclasses that is to\r
-     * initialize the filter and install required menu items.\r
-     * Defaults to Ext.emptyFn.\r
-     */\r
-    init : Ext.emptyFn,\r
-    \r
-    /**\r
-     * Template method to be implemented by all subclasses that is to\r
-     * get and return the value of the filter.\r
-     * Defaults to Ext.emptyFn.\r
-     * @return {Object} The 'serialized' form of this filter\r
-     * @methodOf Ext.ux.grid.filter.Filter\r
-     */\r
-    getValue : Ext.emptyFn,\r
-    \r
-    /**\r
-     * Template method to be implemented by all subclasses that is to\r
-     * set the value of the filter and fire the 'update' event.\r
-     * Defaults to Ext.emptyFn.\r
-     * @param {Object} data The value to set the filter\r
-     * @methodOf Ext.ux.grid.filter.Filter\r
-     */        \r
-    setValue : Ext.emptyFn,\r
-    \r
-    /**\r
-     * Template method to be implemented by all subclasses that is to\r
-     * return <tt>true</tt> if the filter has enough configuration information to be activated.\r
-     * Defaults to <tt>return true</tt>.\r
-     * @return {Boolean}\r
-     */\r
-    isActivatable : function(){\r
-        return true;\r
-    },\r
-    \r
-    /**\r
-     * Template method to be implemented by all subclasses that is to\r
-     * get and return serialized filter data for transmission to the server.\r
-     * Defaults to Ext.emptyFn.\r
-     */\r
-    getSerialArgs : Ext.emptyFn,\r
+       /**\r
+        * Template method to be implemented by all subclasses that is to\r
+        * validates the provided Ext.data.Record against the filters configuration.\r
+        * Defaults to <tt>return true</tt>.\r
+        * @param {Ext.data.Record} record The record to validate\r
+        * @return {Boolean} true if the record is valid within the bounds\r
+        * of the filter, false otherwise.\r
+        */\r
+       validateRecord : function() {\r
+               return true;\r
+       },\r
 \r
-    /**\r
-     * Template method to be implemented by all subclasses that is to\r
-     * validates the provided Ext.data.Record against the filters configuration.\r
-     * Defaults to <tt>return true</tt>.\r
-     * @param {Ext.data.Record} record The record to validate\r
-     * @return {Boolean} true if the record is valid within the bounds\r
-     * of the filter, false otherwise.\r
-     */\r
-    validateRecord : function(){\r
-        return true;\r
-    },\r
+       /**\r
+        * Returns the serialized filter data for transmission to the server\r
+        * and fires the 'serialize' event.\r
+        * @return {Object/Array} An object or collection of objects containing\r
+        * key value pairs representing the current configuration of the filter.\r
+        * @methodOf Ext.ux.grid.filter.Filter\r
+        */\r
+       serialize : function() {\r
+               var args = this.getSerialArgs();\r
+               this.fireEvent('serialize', args, this);\r
+               return args;\r
+       },\r
 \r
-    /**\r
-     * Returns the serialized filter data for transmission to the server\r
-     * and fires the 'serialize' event.\r
-     * @return {Object/Array} An object or collection of objects containing\r
-     * key value pairs representing the current configuration of the filter.\r
-     * @methodOf Ext.ux.grid.filter.Filter\r
-     */\r
-    serialize : function(){\r
-        var args = this.getSerialArgs();\r
-        this.fireEvent('serialize', args, this);\r
-        return args;\r
-    },\r
+       /** @private */\r
+       fireUpdate : function() {\r
+               if (this.active) {\r
+                       this.fireEvent('update', this);\r
+               }\r
+               this.setActive(this.isActivatable());\r
+       },\r
 \r
-    /** @private */\r
-    fireUpdate : function(){\r
-        if (this.active) {\r
-            this.fireEvent('update', this);\r
-        }\r
-        this.setActive(this.isActivatable());\r
-    },\r
-    \r
-    /**\r
-     * Sets the status of the filter and fires the appropriate events.\r
-     * @param {Boolean} active        The new filter state.\r
-     * @param {Boolean} suppressEvent True to prevent events from being fired.\r
-     * @methodOf Ext.ux.grid.filter.Filter\r
-     */\r
-    setActive : function(active, suppressEvent){\r
-        if(this.active != active){\r
-            this.active = active;\r
-            if (suppressEvent !== true) {\r
-                this.fireEvent(active ? 'activate' : 'deactivate', this);\r
-            }\r
-        }\r
-    }    \r
+       /**\r
+        * Sets the status of the filter and fires the appropriate events.\r
+        * @param {Boolean} active              The new filter state.\r
+        * @param {Boolean} suppressEvent True to prevent events from being fired.\r
+        * @methodOf Ext.ux.grid.filter.Filter\r
+        */\r
+       setActive : function(active, suppressEvent) {\r
+               if (this.active != active) {\r
+                       this.active = active;\r
+                       if (suppressEvent !== true) {\r
+                               this.fireEvent(active ? 'activate' : 'deactivate', this);\r
+                       }\r
+               }\r
+       }\r
 });
\ No newline at end of file
index b6f8e53..0f61b32 100644 (file)
@@ -1,10 +1,10 @@
-/*!
- * Ext JS Library 3.1.1
- * Copyright(c) 2006-2010 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-/** \r
+/*!\r
+ * Ext JS Library 3.1.1\r
+ * Copyright(c) 2006-2010 Ext JS, LLC\r
+ * licensing@extjs.com\r
+ * http://www.extjs.com/license\r
+ */\r
+/**\r
  * @class Ext.ux.grid.filter.ListFilter\r
  * @extends Ext.ux.grid.filter.Filter\r
  * <p>List filters are able to be preloaded/backed by an Ext.data.Store to load\r
  * {@link Ext.ux.menu.ListMenu} component.</p>\r
  * <p>Although not shown here, this class accepts all configuration options\r
  * for {@link Ext.ux.menu.ListMenu}.</p>\r
- * \r
+ *\r
  * <p><b><u>Example Usage:</u></b></p>\r
- * <pre><code>    \r
-var filters = new Ext.ux.grid.GridFilters({\r
   ...\r
   filters: [{\r
       type: 'list',\r
       dataIndex: 'size',\r
       phpMode: true,\r
       // options will be used as data to implicitly creates an ArrayStore\r
       options: ['extra small', 'small', 'medium', 'large', 'extra large']\r
   }]\r
-});\r
+ * <pre><code>\r
+ var filters = new Ext.ux.grid.GridFilters({\r
+ ...\r
+ filters: [{\r
+ type: 'list',\r
+ dataIndex: 'size',\r
+ phpMode: true,\r
+ // options will be used as data to implicitly creates an ArrayStore\r
+ options: ['extra small', 'small', 'medium', 'large', 'extra large']\r
+ }]\r
+ });\r
  * </code></pre>\r
- * \r
+ *\r
  */\r
 Ext.ux.grid.filter.ListFilter = Ext.extend(Ext.ux.grid.filter.Filter, {\r
 \r
-    /**\r
-     * @cfg {Array} options\r
-     * <p><code>data</code> to be used to implicitly create a data store\r
-     * to back this list when the data source is <b>local</b>. If the\r
-     * data for the list is remote, use the <code>{@link #store}</code>\r
-     * config instead.</p>\r
-     * <br><p>Each item within the provided array may be in one of the\r
-     * following formats:</p>\r
-     * <div class="mdetail-params"><ul>\r
-     * <li><b>Array</b> :\r
-     * <pre><code>\r
-options: [\r
-    [11, 'extra small'], \r
-    [18, 'small'],\r
-    [22, 'medium'],\r
-    [35, 'large'],\r
-    [44, 'extra large']\r
-]\r
-     * </code></pre>\r
-     * </li>\r
-     * <li><b>Object</b> :\r
-     * <pre><code>\r
-labelField: 'name', // override default of 'text'\r
-options: [\r
-    {id: 11, name:'extra small'}, \r
-    {id: 18, name:'small'}, \r
-    {id: 22, name:'medium'}, \r
-    {id: 35, name:'large'}, \r
-    {id: 44, name:'extra large'} \r
-]\r
-     * </code></pre>\r
-     * </li>\r
-     * <li><b>String</b> :\r
-     * <pre><code>\r
-     * options: ['extra small', 'small', 'medium', 'large', 'extra large']\r
-     * </code></pre>\r
-     * </li>\r
-     */\r
-    /**\r
-     * @cfg {Boolean} phpMode\r
-     * <p>Adjust the format of this filter. Defaults to false.</p>\r
-     * <br><p>When GridFilters <code>@cfg encode = false</code> (default):</p>\r
-     * <pre><code>\r
-// phpMode == false (default):\r
-filter[0][data][type] list\r
-filter[0][data][value] value1\r
-filter[0][data][value] value2\r
-filter[0][field] prod \r
+       /**\r
+        * @cfg {Array} options\r
+        * <p><code>data</code> to be used to implicitly create a data store\r
+        * to back this list when the data source is <b>local</b>. If the\r
+        * data for the list is remote, use the <code>{@link #store}</code>\r
+        * config instead.</p>\r
+        * <br><p>Each item within the provided array may be in one of the\r
+        * following formats:</p>\r
+        * <div class="mdetail-params"><ul>\r
+        * <li><b>Array</b> :\r
+        * <pre><code>\r
+        options: [\r
+        [11, 'extra small'],\r
+        [18, 'small'],\r
+        [22, 'medium'],\r
+        [35, 'large'],\r
+        [44, 'extra large']\r
+        ]\r
+        * </code></pre>\r
+        * </li>\r
+        * <li><b>Object</b> :\r
+        * <pre><code>\r
+        labelField: 'name', // override default of 'text'\r
+        options: [\r
+        {id: 11, name:'extra small'},\r
+        {id: 18, name:'small'},\r
+        {id: 22, name:'medium'},\r
+        {id: 35, name:'large'},\r
+        {id: 44, name:'extra large'}\r
+        ]\r
+        * </code></pre>\r
+        * </li>\r
+        * <li><b>String</b> :\r
+        * <pre><code>\r
+        * options: ['extra small', 'small', 'medium', 'large', 'extra large']\r
+        * </code></pre>\r
+        * </li>\r
+        */\r
+       /**\r
+        * @cfg {Boolean} phpMode\r
+        * <p>Adjust the format of this filter. Defaults to false.</p>\r
+        * <br><p>When GridFilters <code>@cfg encode = false</code> (default):</p>\r
+        * <pre><code>\r
+        // phpMode == false (default):\r
+        filter[0][data][type] list\r
+        filter[0][data][value] value1\r
+        filter[0][data][value] value2\r
+        filter[0][field] prod\r
+\r
+        // phpMode == true:\r
+        filter[0][data][type] list\r
+        filter[0][data][value] value1, value2\r
+        filter[0][field] prod\r
+        * </code></pre>\r
+        * When GridFilters <code>@cfg encode = true</code>:\r
+        * <pre><code>\r
+        // phpMode == false (default):\r
+        filter : [{"type":"list","value":["small","medium"],"field":"size"}]\r
+\r
+        // phpMode == true:\r
+        filter : [{"type":"list","value":"small,medium","field":"size"}]\r
+        * </code></pre>\r
+        */\r
+       phpMode : false,\r
+       /**\r
+        * @cfg {Ext.data.Store} store\r
+        * The {@link Ext.data.Store} this list should use as its data source\r
+        * when the data source is <b>remote</b>. If the data for the list\r
+        * is local, use the <code>{@link #options}</code> config instead.\r
+        */\r
+\r
+       /**\r
+        * @private\r
+        * Template method that is to initialize the filter and install required menu items.\r
+        * @param {Object} config\r
+        */\r
+       init : function (config) {\r
+               this.dt = new Ext.util.DelayedTask(this.fireUpdate, this);\r
+\r
+               // if a menu already existed, do clean up first\r
+               if (this.menu) {\r
+                       this.menu.destroy();\r
+               }\r
+               this.menu = new Ext.ux.menu.ListMenu(config);\r
+               this.menu.on('checkchange', this.onCheckChange, this);\r
+       },\r
 \r
-// phpMode == true:\r
-filter[0][data][type] list\r
-filter[0][data][value] value1, value2\r
-filter[0][field] prod \r
-     * </code></pre>\r
-     * When GridFilters <code>@cfg encode = true</code>:\r
-     * <pre><code>\r
-// phpMode == false (default):\r
-filter : [{"type":"list","value":["small","medium"],"field":"size"}]\r
+       /**\r
+        * @private\r
+        * Template method that is to get and return the value of the filter.\r
+        * @return {String} The value of this filter\r
+        */\r
+       getValue : function () {\r
+               return this.menu.getSelected();\r
+       },\r
+       /**\r
+        * @private\r
+        * Template method that is to set the value of the filter.\r
+        * @param {Object} value The value to set the filter\r
+        */\r
+       setValue : function (value) {\r
+               this.menu.setSelected(value);\r
+               this.fireEvent('update', this);\r
+       },\r
 \r
-// phpMode == true:\r
-filter : [{"type":"list","value":"small,medium","field":"size"}]\r
-     * </code></pre>\r
-     */\r
-    phpMode : false,\r
-    /**\r
-     * @cfg {Ext.data.Store} store\r
-     * The {@link Ext.data.Store} this list should use as its data source\r
-     * when the data source is <b>remote</b>. If the data for the list\r
-     * is local, use the <code>{@link #options}</code> config instead.\r
-     */\r
+       /**\r
+        * @private\r
+        * Template method that is to return <tt>true</tt> if the filter\r
+        * has enough configuration information to be activated.\r
+        * @return {Boolean}\r
+        */\r
+       isActivatable : function () {\r
+               return this.getValue().length > 0;\r
+       },\r
 \r
-    /**  \r
-     * @private\r
-     * Template method that is to initialize the filter and install required menu items.\r
-     * @param {Object} config\r
-     */\r
-    init : function (config) {\r
-        this.dt = new Ext.util.DelayedTask(this.fireUpdate, this);\r
+       /**\r
+        * @private\r
+        * Template method that is to get and return serialized filter data for\r
+        * transmission to the server.\r
+        * @return {Object/Array} An object or collection of objects containing\r
+        * key value pairs representing the current configuration of the filter.\r
+        */\r
+       getSerialArgs : function () {\r
+               var args = {type: 'list', value: this.phpMode ? this.getValue().join(',') : this.getValue()};\r
+               return args;\r
+       },\r
 \r
-        // if a menu already existed, do clean up first\r
-        if (this.menu){\r
-            this.menu.destroy();\r
-        }\r
-        this.menu = new Ext.ux.menu.ListMenu(config);\r
-        this.menu.on('checkchange', this.onCheckChange, this);\r
-    },\r
-    \r
-    /**\r
-     * @private\r
-     * Template method that is to get and return the value of the filter.\r
-     * @return {String} The value of this filter\r
-     */\r
-    getValue : function () {\r
-        return this.menu.getSelected();\r
-    },\r
-    /**\r
-     * @private\r
-     * Template method that is to set the value of the filter.\r
-     * @param {Object} value The value to set the filter\r
-     */        \r
-    setValue : function (value) {\r
-        this.menu.setSelected(value);\r
-        this.fireEvent('update', this);\r
-    },\r
+       /** @private */\r
+       onCheckChange : function() {\r
+               this.dt.delay(this.updateBuffer);\r
+       },\r
 \r
-    /**\r
-     * @private\r
-     * Template method that is to return <tt>true</tt> if the filter\r
-     * has enough configuration information to be activated.\r
-     * @return {Boolean}\r
-     */\r
-    isActivatable : function () {\r
-        return this.getValue().length > 0;\r
-    },\r
-    \r
-    /**\r
-     * @private\r
-     * Template method that is to get and return serialized filter data for\r
-     * transmission to the server.\r
-     * @return {Object/Array} An object or collection of objects containing\r
-     * key value pairs representing the current configuration of the filter.\r
-     */\r
-    getSerialArgs : function () {\r
-        var args = {type: 'list', value: this.phpMode ? this.getValue().join(',') : this.getValue()};\r
-        return args;\r
-    },\r
 \r
-    /** @private */\r
-    onCheckChange : function(){\r
-        this.dt.delay(this.updateBuffer);\r
-    },\r
-    \r
-    \r
-    /**\r
-     * Template method that is to validate the provided Ext.data.Record\r
-     * against the filters configuration.\r
-     * @param {Ext.data.Record} record The record to validate\r
-     * @return {Boolean} true if the record is valid within the bounds\r
-     * of the filter, false otherwise.\r
-     */\r
-    validateRecord : function (record) {\r
-        return this.getValue().indexOf(record.get(this.dataIndex)) > -1;\r
-    }\r
+       /**\r
+        * Template method that is to validate the provided Ext.data.Record\r
+        * against the filters configuration.\r
+        * @param {Ext.data.Record} record The record to validate\r
+        * @return {Boolean} true if the record is valid within the bounds\r
+        * of the filter, false otherwise.\r
+        */\r
+       validateRecord : function (record) {\r
+               return this.getValue().indexOf(record.get(this.dataIndex)) > -1;\r
+       }\r
 });
\ No newline at end of file
index b04f0ff..c6cc354 100644 (file)
-/*!
- * Ext JS Library 3.1.1
- * Copyright(c) 2006-2010 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-/** \r
+/*!\r
+ * Ext JS Library 3.1.1\r
+ * Copyright(c) 2006-2010 Ext JS, LLC\r
+ * licensing@extjs.com\r
+ * http://www.extjs.com/license\r
+ */\r
+/**\r
  * @class Ext.ux.grid.filter.NumericFilter\r
  * @extends Ext.ux.grid.filter.Filter\r
  * Filters using an Ext.ux.menu.RangeMenu.\r
  * <p><b><u>Example Usage:</u></b></p>\r
- * <pre><code>    \r
-var filters = new Ext.ux.grid.GridFilters({\r
   ...\r
   filters: [{\r
       type: 'numeric',\r
       dataIndex: 'price'\r
   }]\r
-});\r
- * </code></pre> \r
+ * <pre><code>\r
+ var filters = new Ext.ux.grid.GridFilters({\r
+ ...\r
+ filters: [{\r
+ type: 'numeric',\r
+ dataIndex: 'price'\r
+ }]\r
+ });\r
+ * </code></pre>\r
  */\r
 Ext.ux.grid.filter.NumericFilter = Ext.extend(Ext.ux.grid.filter.Filter, {\r
 \r
-    /**\r
-     * @cfg {Object} fieldCls\r
-     * The Class to use to construct each field item within this menu\r
-     * Defaults to:<pre>\r
-     * fieldCls : Ext.form.NumberField\r
-     * </pre>\r
-     */\r
-    fieldCls : Ext.form.NumberField,\r
-    /**\r
-     * @cfg {Object} fieldCfg\r
-     * The default configuration options for any field item unless superseded\r
-     * by the <code>{@link #fields}</code> configuration.\r
-     * Defaults to:<pre>\r
-     * fieldCfg : {}\r
-     * </pre>\r
-     * Example usage:\r
-     * <pre><code>\r
-fieldCfg : {\r
-    width: 150,\r
-},\r
-     * </code></pre>\r
-     */\r
-    /**\r
-     * @cfg {Object} fields\r
-     * The field items may be configured individually\r
-     * Defaults to <tt>undefined</tt>.\r
-     * Example usage:\r
-     * <pre><code>\r
-fields : {\r
-    gt: { // override fieldCfg options\r
-        width: 200,\r
-        fieldCls: Ext.ux.form.CustomNumberField // to override default {@link #fieldCls}\r
-    }\r
-},\r
-     * </code></pre>\r
-     */\r
-    /**\r
-     * @cfg {Object} iconCls\r
-     * The iconCls to be applied to each comparator field item.\r
-     * Defaults to:<pre>\r
-iconCls : {\r
-    gt : 'ux-rangemenu-gt',\r
-    lt : 'ux-rangemenu-lt',\r
-    eq : 'ux-rangemenu-eq'\r
-}\r
-     * </pre>\r
-     */\r
-    iconCls : {\r
-        gt : 'ux-rangemenu-gt',\r
-        lt : 'ux-rangemenu-lt',\r
-        eq : 'ux-rangemenu-eq'\r
-    },\r
+       /**\r
+        * @cfg {Object} fieldCls\r
+        * The Class to use to construct each field item within this menu\r
+        * Defaults to:<pre>\r
+        * fieldCls : Ext.form.NumberField\r
+        * </pre>\r
+        */\r
+       fieldCls : Ext.form.NumberField,\r
+       /**\r
+        * @cfg {Object} fieldCfg\r
+        * The default configuration options for any field item unless superseded\r
+        * by the <code>{@link #fields}</code> configuration.\r
+        * Defaults to:<pre>\r
+        * fieldCfg : {}\r
+        * </pre>\r
+        * Example usage:\r
+        * <pre><code>\r
+        fieldCfg : {\r
+        width: 150,\r
+        },\r
+        * </code></pre>\r
+        */\r
+       /**\r
+        * @cfg {Object} fields\r
+        * The field items may be configured individually\r
+        * Defaults to <tt>undefined</tt>.\r
+        * Example usage:\r
+        * <pre><code>\r
+        fields : {\r
+        gt: { // override fieldCfg options\r
+        width: 200,\r
+        fieldCls: Ext.ux.form.CustomNumberField // to override default {@link #fieldCls}\r
+        }\r
+        },\r
+        * </code></pre>\r
+        */\r
+       /**\r
+        * @cfg {Object} iconCls\r
+        * The iconCls to be applied to each comparator field item.\r
+        * Defaults to:<pre>\r
+        iconCls : {\r
+        gt : 'ux-rangemenu-gt',\r
+        lt : 'ux-rangemenu-lt',\r
+        eq : 'ux-rangemenu-eq'\r
+        }\r
+        * </pre>\r
+        */\r
+       iconCls : {\r
+               gt : 'ux-rangemenu-gt',\r
+               lt : 'ux-rangemenu-lt',\r
+               eq : 'ux-rangemenu-eq'\r
+       },\r
+\r
+       /**\r
+        * @cfg {Object} menuItemCfgs\r
+        * Default configuration options for each menu item\r
+        * Defaults to:<pre>\r
+        menuItemCfgs : {\r
+        emptyText: 'Enter Filter Text...',\r
+        selectOnFocus: true,\r
+        width: 125\r
+        }\r
+        * </pre>\r
+        */\r
+       menuItemCfgs : {\r
+               emptyText: 'Enter Filter Text...',\r
+               selectOnFocus: true,\r
+               width: 125\r
+       },\r
+\r
+       /**\r
+        * @cfg {Array} menuItems\r
+        * The items to be shown in this menu.  Items are added to the menu\r
+        * according to their position within this array. Defaults to:<pre>\r
+        * menuItems : ['lt','gt','-','eq']\r
+        * </pre>\r
+        */\r
+       menuItems : ['lt', 'gt', '-', 'eq'],\r
 \r
-    /**\r
-     * @cfg {Object} menuItemCfgs\r
-     * Default configuration options for each menu item\r
-     * Defaults to:<pre>\r
-menuItemCfgs : {\r
-    emptyText: 'Enter Filter Text...',\r
-    selectOnFocus: true,\r
-    width: 125\r
-}\r
-     * </pre>\r
-     */\r
-    menuItemCfgs : {\r
-        emptyText: 'Enter Filter Text...',\r
-        selectOnFocus: true,\r
-        width: 125\r
-    },\r
+       /**\r
+        * @private\r
+        * Template method that is to initialize the filter and install required menu items.\r
+        */\r
+       init : function (config) {\r
+               // if a menu already existed, do clean up first\r
+               if (this.menu) {\r
+                       this.menu.destroy();\r
+               }\r
+               this.menu = new Ext.ux.menu.RangeMenu(Ext.apply(config, {\r
+                                       // pass along filter configs to the menu\r
+                                       fieldCfg : this.fieldCfg || {},\r
+                                       fieldCls : this.fieldCls,\r
+                                       fields : this.fields || {},\r
+                                       iconCls: this.iconCls,\r
+                                       menuItemCfgs: this.menuItemCfgs,\r
+                                       menuItems: this.menuItems,\r
+                                       updateBuffer: this.updateBuffer\r
+                               }));\r
+               // relay the event fired by the menu\r
+               this.menu.on('update', this.fireUpdate, this);\r
+       },\r
 \r
-    /**\r
-     * @cfg {Array} menuItems\r
-     * The items to be shown in this menu.  Items are added to the menu\r
-     * according to their position within this array. Defaults to:<pre>\r
-     * menuItems : ['lt','gt','-','eq']\r
-     * </pre>\r
-     */\r
-    menuItems : ['lt', 'gt', '-', 'eq'],\r
+       /**\r
+        * @private\r
+        * Template method that is to get and return the value of the filter.\r
+        * @return {String} The value of this filter\r
+        */\r
+       getValue : function () {\r
+               return this.menu.getValue();\r
+       },\r
 \r
-    /**  \r
-     * @private\r
-     * Template method that is to initialize the filter and install required menu items.\r
-     */\r
-    init : function (config) {\r
-        // if a menu already existed, do clean up first\r
-        if (this.menu){\r
-            this.menu.destroy();\r
-        }        \r
-        this.menu = new Ext.ux.menu.RangeMenu(Ext.apply(config, {\r
-            // pass along filter configs to the menu\r
-            fieldCfg : this.fieldCfg || {},\r
-            fieldCls : this.fieldCls,\r
-            fields : this.fields || {},\r
-            iconCls: this.iconCls,\r
-            menuItemCfgs: this.menuItemCfgs,\r
-            menuItems: this.menuItems,\r
-            updateBuffer: this.updateBuffer\r
-        }));\r
-        // relay the event fired by the menu\r
-        this.menu.on('update', this.fireUpdate, this);\r
-    },\r
-    \r
-    /**\r
-     * @private\r
-     * Template method that is to get and return the value of the filter.\r
-     * @return {String} The value of this filter\r
-     */\r
-    getValue : function () {\r
-        return this.menu.getValue();\r
-    },\r
+       /**\r
+        * @private\r
+        * Template method that is to set the value of the filter.\r
+        * @param {Object} value The value to set the filter\r
+        */\r
+       setValue : function (value) {\r
+               this.menu.setValue(value);\r
+       },\r
 \r
-    /**\r
-     * @private\r
-     * Template method that is to set the value of the filter.\r
-     * @param {Object} value The value to set the filter\r
-     */        \r
-    setValue : function (value) {\r
-        this.menu.setValue(value);\r
-    },\r
+       /**\r
+        * @private\r
+        * Template method that is to return <tt>true</tt> if the filter\r
+        * has enough configuration information to be activated.\r
+        * @return {Boolean}\r
+        */\r
+       isActivatable : function () {\r
+               var values = this.getValue();\r
+               for (key in values) {\r
+                       if (values[key] !== undefined) {\r
+                               return true;\r
+                       }\r
+               }\r
+               return false;\r
+       },\r
 \r
-    /**\r
-     * @private\r
-     * Template method that is to return <tt>true</tt> if the filter\r
-     * has enough configuration information to be activated.\r
-     * @return {Boolean}\r
-     */\r
-    isActivatable : function () {\r
-        var values = this.getValue();\r
-        for (key in values) {\r
-            if (values[key] !== undefined) {\r
-                return true;\r
-            }\r
-        }\r
-        return false;\r
-    },\r
-    \r
-    /**\r
-     * @private\r
-     * Template method that is to get and return serialized filter data for\r
-     * transmission to the server.\r
-     * @return {Object/Array} An object or collection of objects containing\r
-     * key value pairs representing the current configuration of the filter.\r
-     */\r
-    getSerialArgs : function () {\r
-        var key,\r
-            args = [],\r
-            values = this.menu.getValue();\r
-        for (key in values) {\r
-            args.push({\r
-                type: 'numeric',\r
-                comparison: key,\r
-                value: values[key]\r
-            });\r
-        }\r
-        return args;\r
-    },\r
+       /**\r
+        * @private\r
+        * Template method that is to get and return serialized filter data for\r
+        * transmission to the server.\r
+        * @return {Object/Array} An object or collection of objects containing\r
+        * key value pairs representing the current configuration of the filter.\r
+        */\r
+       getSerialArgs : function () {\r
+               var key,\r
+                               args = [],\r
+                               values = this.menu.getValue();\r
+               for (key in values) {\r
+                       args.push({\r
+                                               type: 'numeric',\r
+                                               comparison: key,\r
+                                               value: values[key]\r
+                                       });\r
+               }\r
+               return args;\r
+       },\r
 \r
-    /**\r
-     * Template method that is to validate the provided Ext.data.Record\r
-     * against the filters configuration.\r
-     * @param {Ext.data.Record} record The record to validate\r
-     * @return {Boolean} true if the record is valid within the bounds\r
-     * of the filter, false otherwise.\r
-     */\r
-    validateRecord : function (record) {\r
-        var val = record.get(this.dataIndex),\r
-            values = this.getValue();\r
-        if (values.eq !== undefined && val != values.eq) {\r
-            return false;\r
-        }\r
-        if (values.lt !== undefined && val >= values.lt) {\r
-            return false;\r
-        }\r
-        if (values.gt !== undefined && val <= values.gt) {\r
-            return false;\r
-        }\r
-        return true;\r
-    }\r
+       /**\r
+        * Template method that is to validate the provided Ext.data.Record\r
+        * against the filters configuration.\r
+        * @param {Ext.data.Record} record The record to validate\r
+        * @return {Boolean} true if the record is valid within the bounds\r
+        * of the filter, false otherwise.\r
+        */\r
+       validateRecord : function (record) {\r
+               var val = record.get(this.dataIndex),\r
+                               values = this.getValue();\r
+               if (values.eq !== undefined && val != values.eq) {\r
+                       return false;\r
+               }\r
+               if (values.lt !== undefined && val >= values.lt) {\r
+                       return false;\r
+               }\r
+               if (values.gt !== undefined && val <= values.gt) {\r
+                       return false;\r
+               }\r
+               return true;\r
+       }\r
 });
\ No newline at end of file
index 3ed046e..250090f 100644 (file)
-/*!
- * Ext JS Library 3.1.1
- * Copyright(c) 2006-2010 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-/** \r
+/*!\r
+ * Ext JS Library 3.1.1\r
+ * Copyright(c) 2006-2010 Ext JS, LLC\r
+ * licensing@extjs.com\r
+ * http://www.extjs.com/license\r
+ */\r
+/**\r
  * @class Ext.ux.grid.filter.StringFilter\r
  * @extends Ext.ux.grid.filter.Filter\r
  * Filter by a configurable Ext.form.TextField\r
  * <p><b><u>Example Usage:</u></b></p>\r
- * <pre><code>    \r
-var filters = new Ext.ux.grid.GridFilters({\r
   ...\r
   filters: [{\r
       // required configs\r
       type: 'string',\r
       dataIndex: 'name',\r
-        \r
       // optional configs\r
       value: 'foo',\r
       active: true, // default is false\r
       iconCls: 'ux-gridfilter-text-icon' // default\r
       // any Ext.form.TextField configs accepted\r
   }]\r
-});\r
+ * <pre><code>\r
+ var filters = new Ext.ux.grid.GridFilters({\r
+ ...\r
+ filters: [{\r
+ // required configs\r
+ type: 'string',\r
+ dataIndex: 'name',\r
+\r
+ // optional configs\r
+ value: 'foo',\r
+ active: true, // default is false\r
+ iconCls: 'ux-gridfilter-text-icon' // default\r
+ // any Ext.form.TextField configs accepted\r
+ }]\r
+ });\r
  * </code></pre>\r
  */\r
 Ext.ux.grid.filter.StringFilter = Ext.extend(Ext.ux.grid.filter.Filter, {\r
 \r
-    /**\r
-     * @cfg {String} iconCls\r
-     * The iconCls to be applied to the menu item.\r
-     * Defaults to <tt>'ux-gridfilter-text-icon'</tt>.\r
-     */\r
-    iconCls : 'ux-gridfilter-text-icon',\r
+       /**\r
+        * @cfg {String} iconCls\r
+        * The iconCls to be applied to the menu item.\r
+        * Defaults to <tt>'ux-gridfilter-text-icon'</tt>.\r
+        */\r
+       iconCls : 'ux-gridfilter-text-icon',\r
+\r
+       emptyText: 'Enter Filter Text...',\r
+       selectOnFocus: true,\r
+       width: 125,\r
+\r
+       /**\r
+        * @private\r
+        * Template method that is to initialize the filter and install required menu items.\r
+        */\r
+       init : function (config) {\r
+               Ext.applyIf(config, {\r
+                                       enableKeyEvents: true,\r
+                                       iconCls: this.iconCls,\r
+                                       listeners: {\r
+                                               scope: this,\r
+                                               keyup: this.onInputKeyUp\r
+                                       }\r
+                               });\r
+\r
+               this.inputItem = new Ext.form.TextField(config);\r
+               this.menu.add(this.inputItem);\r
+               this.updateTask = new Ext.util.DelayedTask(this.fireUpdate, this);\r
+       },\r
+\r
+       /**\r
+        * @private\r
+        * Template method that is to get and return the value of the filter.\r
+        * @return {String} The value of this filter\r
+        */\r
+       getValue : function () {\r
+               return this.inputItem.getValue();\r
+       },\r
 \r
-    emptyText: 'Enter Filter Text...',\r
-    selectOnFocus: true,\r
-    width: 125,\r
-    \r
-    /**  \r
-     * @private\r
-     * Template method that is to initialize the filter and install required menu items.\r
-     */\r
-    init : function (config) {\r
-        Ext.applyIf(config, {\r
-            enableKeyEvents: true,\r
-            iconCls: this.iconCls,\r
-            listeners: {\r
-                scope: this,\r
-                keyup: this.onInputKeyUp\r
-            }\r
-        });\r
+       /**\r
+        * @private\r
+        * Template method that is to set the value of the filter.\r
+        * @param {Object} value The value to set the filter\r
+        */\r
+       setValue : function (value) {\r
+               this.inputItem.setValue(value);\r
+               this.fireEvent('update', this);\r
+       },\r
 \r
-        this.inputItem = new Ext.form.TextField(config); \r
-        this.menu.add(this.inputItem);\r
-        this.updateTask = new Ext.util.DelayedTask(this.fireUpdate, this);\r
-    },\r
-    \r
-    /**\r
-     * @private\r
-     * Template method that is to get and return the value of the filter.\r
-     * @return {String} The value of this filter\r
-     */\r
-    getValue : function () {\r
-        return this.inputItem.getValue();\r
-    },\r
-    \r
-    /**\r
-     * @private\r
-     * Template method that is to set the value of the filter.\r
-     * @param {Object} value The value to set the filter\r
-     */        \r
-    setValue : function (value) {\r
-        this.inputItem.setValue(value);\r
-        this.fireEvent('update', this);\r
-    },\r
+       /**\r
+        * @private\r
+        * Template method that is to return <tt>true</tt> if the filter\r
+        * has enough configuration information to be activated.\r
+        * @return {Boolean}\r
+        */\r
+       isActivatable : function () {\r
+               return this.inputItem.getValue().length > 0;\r
+       },\r
 \r
-    /**\r
-     * @private\r
-     * Template method that is to return <tt>true</tt> if the filter\r
-     * has enough configuration information to be activated.\r
-     * @return {Boolean}\r
-     */\r
-    isActivatable : function () {\r
-        return this.inputItem.getValue().length > 0;\r
-    },\r
+       /**\r
+        * @private\r
+        * Template method that is to get and return serialized filter data for\r
+        * transmission to the server.\r
+        * @return {Object/Array} An object or collection of objects containing\r
+        * key value pairs representing the current configuration of the filter.\r
+        */\r
+       getSerialArgs : function () {\r
+               return {type: 'string', value: this.getValue()};\r
+       },\r
 \r
-    /**\r
-     * @private\r
-     * Template method that is to get and return serialized filter data for\r
-     * transmission to the server.\r
-     * @return {Object/Array} An object or collection of objects containing\r
-     * key value pairs representing the current configuration of the filter.\r
-     */\r
-    getSerialArgs : function () {\r
-        return {type: 'string', value: this.getValue()};\r
-    },\r
+       /**\r
+        * Template method that is to validate the provided Ext.data.Record\r
+        * against the filters configuration.\r
+        * @param {Ext.data.Record} record The record to validate\r
+        * @return {Boolean} true if the record is valid within the bounds\r
+        * of the filter, false otherwise.\r
+        */\r
+       validateRecord : function (record) {\r
+               var val = record.get(this.dataIndex);\r
 \r
-    /**\r
-     * Template method that is to validate the provided Ext.data.Record\r
-     * against the filters configuration.\r
-     * @param {Ext.data.Record} record The record to validate\r
-     * @return {Boolean} true if the record is valid within the bounds\r
-     * of the filter, false otherwise.\r
-     */\r
-    validateRecord : function (record) {\r
-        var val = record.get(this.dataIndex);\r
+               if (typeof val != 'string') {\r
+                       return (this.getValue().length === 0);\r
+               }\r
 \r
-        if(typeof val != 'string') {\r
-            return (this.getValue().length === 0);\r
-        }\r
+               return val.toLowerCase().indexOf(this.getValue().toLowerCase()) > -1;\r
+       },\r
 \r
-        return val.toLowerCase().indexOf(this.getValue().toLowerCase()) > -1;\r
-    },\r
-    \r
-    /**  \r
-     * @private\r
-     * Handler method called when there is a keyup event on this.inputItem\r
-     */\r
-    onInputKeyUp : function (field, e) {\r
-        var k = e.getKey();\r
-        if (k == e.RETURN && field.isValid()) {\r
-            e.stopEvent();\r
-            this.menu.hide(true);\r
-            return;\r
-        }\r
-        // restart the timer\r
-        this.updateTask.delay(this.updateBuffer);\r
-    }\r
+       /**\r
+        * @private\r
+        * Handler method called when there is a keyup event on this.inputItem\r
+        */\r
+       onInputKeyUp : function (field, e) {\r
+               var k = e.getKey();\r
+               if (k == e.RETURN && field.isValid()) {\r
+                       e.stopEvent();\r
+                       this.menu.hide(true);\r
+                       return;\r
+               }\r
+               // restart the timer\r
+               this.updateTask.delay(this.updateBuffer);\r
+       }\r
 });\r
index 4687d25..fd3893b 100644 (file)
@@ -1,12 +1,12 @@
-/*!
- * Ext JS Library 3.1.1
- * Copyright(c) 2006-2010 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
+/*!\r
+ * Ext JS Library 3.1.1\r
+ * Copyright(c) 2006-2010 Ext JS, LLC\r
+ * licensing@extjs.com\r
+ * http://www.extjs.com/license\r
+ */\r
 Ext.namespace('Ext.ux.menu');\r
 \r
-/** \r
+/**\r
  * @class Ext.ux.menu.ListMenu\r
  * @extends Ext.menu.Menu\r
  * This is a supporting class for {@link Ext.ux.grid.filter.ListFilter}.\r
@@ -14,164 +14,164 @@ Ext.namespace('Ext.ux.menu');
  * also accepts all configuration options from {@link Ext.ux.grid.filter.ListFilter}.\r
  */\r
 Ext.ux.menu.ListMenu = Ext.extend(Ext.menu.Menu, {\r
-    /**\r
-     * @cfg {String} labelField\r
-     * Defaults to 'text'.\r
-     */\r
-    labelField :  'text',\r
-    /**\r
-     * @cfg {String} paramPrefix\r
-     * Defaults to 'Loading...'.\r
-     */\r
-    loadingText : 'Loading...',\r
-    /**\r
-     * @cfg {Boolean} loadOnShow\r
-     * Defaults to true.\r
-     */\r
-    loadOnShow : true,\r
-    /**\r
-     * @cfg {Boolean} single\r
-     * Specify true to group all items in this list into a single-select\r
-     * radio button group. Defaults to false.\r
-     */\r
-    single : false,\r
-\r
-    constructor : function (cfg) {\r
-        this.selected = [];\r
-        this.addEvents(\r
-            /**\r
-             * @event checkchange\r
-             * Fires when there is a change in checked items from this list\r
-             * @param {Object} item Ext.menu.CheckItem\r
-             * @param {Object} checked The checked value that was set\r
-             */\r
-            'checkchange'\r
-        );\r
-      \r
-        Ext.ux.menu.ListMenu.superclass.constructor.call(this, cfg = cfg || {});\r
-    \r
-        if(!cfg.store && cfg.options){\r
-            var options = [];\r
-            for(var i=0, len=cfg.options.length; i<len; i++){\r
-                var value = cfg.options[i];\r
-                switch(Ext.type(value)){\r
-                    case 'array':  options.push(value); break;\r
-                    case 'object': options.push([value.id, value[this.labelField]]); break;\r
-                    case 'string': options.push([value, value]); break;\r
-                }\r
-            }\r
-            \r
-            this.store = new Ext.data.Store({\r
-                reader: new Ext.data.ArrayReader({id: 0}, ['id', this.labelField]),\r
-                data:   options,\r
-                listeners: {\r
-                    'load': this.onLoad,\r
-                    scope:  this\r
-                }\r
-            });\r
-            this.loaded = true;\r
-        } else {\r
-            this.add({text: this.loadingText, iconCls: 'loading-indicator'});\r
-            this.store.on('load', this.onLoad, this);\r
-        }\r
-    },\r
-\r
-    destroy : function () {\r
-        if (this.store) {\r
-            this.store.destroy();    \r
-        }\r
-        Ext.ux.menu.ListMenu.superclass.destroy.call(this);\r
-    },\r
-\r
-    /**\r
-     * Lists will initially show a 'loading' item while the data is retrieved from the store.\r
-     * In some cases the loaded data will result in a list that goes off the screen to the\r
-     * right (as placement calculations were done with the loading item). This adapter will\r
-     * allow show to be called with no arguments to show with the previous arguments and\r
-     * thus recalculate the width and potentially hang the menu from the left.\r
-     */\r
-    show : function () {\r
-        var lastArgs = null;\r
-        return function(){\r
-            if(arguments.length === 0){\r
-                Ext.ux.menu.ListMenu.superclass.show.apply(this, lastArgs);\r
-            } else {\r
-                lastArgs = arguments;\r
-                if (this.loadOnShow && !this.loaded) {\r
-                    this.store.load();\r
-                }\r
-                Ext.ux.menu.ListMenu.superclass.show.apply(this, arguments);\r
-            }\r
-        };\r
-    }(),\r
-    \r
-    /** @private */\r
-    onLoad : function (store, records) {\r
-        var visible = this.isVisible();\r
-        this.hide(false);\r
-        \r
-        this.removeAll(true);\r
-        \r
-        var gid = this.single ? Ext.id() : null;\r
-        for(var i=0, len=records.length; i<len; i++){\r
-            var item = new Ext.menu.CheckItem({\r
-                text:    records[i].get(this.labelField), \r
-                group:   gid,\r
-                checked: this.selected.indexOf(records[i].id) > -1,\r
-                hideOnClick: false});\r
-            \r
-            item.itemId = records[i].id;\r
-            item.on('checkchange', this.checkChange, this);\r
-                        \r
-            this.add(item);\r
-        }\r
-        \r
-        this.loaded = true;\r
-        \r
-        if (visible) {\r
-            this.show();\r
-        }      \r
-        this.fireEvent('load', this, records);\r
-    },\r
-\r
-    /**\r
-     * Get the selected items.\r
-     * @return {Array} selected\r
-     */\r
-    getSelected : function () {\r
-        return this.selected;\r
-    },\r
-    \r
-    /** @private */\r
-    setSelected : function (value) {\r
-        value = this.selected = [].concat(value);\r
-\r
-        if (this.loaded) {\r
-            this.items.each(function(item){\r
-                item.setChecked(false, true);\r
-                for (var i = 0, len = value.length; i < len; i++) {\r
-                    if (item.itemId == value[i]) {\r
-                        item.setChecked(true, true);\r
-                    }\r
-                }\r
-            }, this);\r
-        }\r
-    },\r
-    \r
-    /**\r
-     * Handler for the 'checkchange' event from an check item in this menu\r
-     * @param {Object} item Ext.menu.CheckItem\r
-     * @param {Object} checked The checked value that was set\r
-     */\r
-    checkChange : function (item, checked) {\r
-        var value = [];\r
-        this.items.each(function(item){\r
-            if (item.checked) {\r
-                value.push(item.itemId);\r
-            }\r
-        },this);\r
-        this.selected = value;\r
-        \r
-        this.fireEvent('checkchange', item, checked);\r
-    }    \r
+       /**\r
+        * @cfg {String} labelField\r
+        * Defaults to 'text'.\r
+        */\r
+       labelField :  'text',\r
+       /**\r
+        * @cfg {String} paramPrefix\r
+        * Defaults to 'Loading...'.\r
+        */\r
+       loadingText : 'Loading...',\r
+       /**\r
+        * @cfg {Boolean} loadOnShow\r
+        * Defaults to true.\r
+        */\r
+       loadOnShow : true,\r
+       /**\r
+        * @cfg {Boolean} single\r
+        * Specify true to group all items in this list into a single-select\r
+        * radio button group. Defaults to false.\r
+        */\r
+       single : false,\r
+\r
+       constructor : function (cfg) {\r
+               this.selected = [];\r
+               this.addEvents(\r
+                               /**\r
+                                * @event checkchange\r
+                                * Fires when there is a change in checked items from this list\r
+                                * @param {Object} item Ext.menu.CheckItem\r
+                                * @param {Object} checked The checked value that was set\r
+                                */\r
+                               'checkchange'\r
+               );\r
+\r
+               Ext.ux.menu.ListMenu.superclass.constructor.call(this, cfg = cfg || {});\r
+\r
+               if (!cfg.store && cfg.options) {\r
+                       var options = [];\r
+                       for (var i = 0, len = cfg.options.length; i < len; i++) {\r
+                               var value = cfg.options[i];\r
+                               switch (Ext.type(value)) {\r
+                                       case 'array':  options.push(value); break;\r
+                                       case 'object': options.push([value.id, value[this.labelField]]); break;\r
+                                       case 'string': options.push([value, value]); break;\r
+                               }\r
+                       }\r
+\r
+                       this.store = new Ext.data.Store({\r
+                                               reader: new Ext.data.ArrayReader({id: 0}, ['id', this.labelField]),\r
+                                               data:   options,\r
+                                               listeners: {\r
+                                                       'load': this.onLoad,\r
+                                                       scope:  this\r
+                                               }\r
+                                       });\r
+                       this.loaded = true;\r
+               } else {\r
+                       this.add({text: this.loadingText, iconCls: 'loading-indicator'});\r
+                       this.store.on('load', this.onLoad, this);\r
+               }\r
+       },\r
+\r
+       destroy : function () {\r
+               if (this.store) {\r
+                       this.store.destroy();\r
+               }\r
+               Ext.ux.menu.ListMenu.superclass.destroy.call(this);\r
+       },\r
+\r
+       /**\r
+        * Lists will initially show a 'loading' item while the data is retrieved from the store.\r
+        * In some cases the loaded data will result in a list that goes off the screen to the\r
+        * right (as placement calculations were done with the loading item). This adapter will\r
+        * allow show to be called with no arguments to show with the previous arguments and\r
+        * thus recalculate the width and potentially hang the menu from the left.\r
+        */\r
+       show : function () {\r
+               var lastArgs = null;\r
+               return function() {\r
+                       if (arguments.length === 0) {\r
+                               Ext.ux.menu.ListMenu.superclass.show.apply(this, lastArgs);\r
+                       } else {\r
+                               lastArgs = arguments;\r
+                               if (this.loadOnShow && !this.loaded) {\r
+                                       this.store.load();\r
+                               }\r
+                               Ext.ux.menu.ListMenu.superclass.show.apply(this, arguments);\r
+                       }\r
+               };\r
+       }(),\r
+\r
+       /** @private */\r
+       onLoad : function (store, records) {\r
+               var visible = this.isVisible();\r
+               this.hide(false);\r
+\r
+               this.removeAll(true);\r
+\r
+               var gid = this.single ? Ext.id() : null;\r
+               for (var i = 0, len = records.length; i < len; i++) {\r
+                       var item = new Ext.menu.CheckItem({\r
+                                               text:   records[i].get(this.labelField),\r
+                                               group:   gid,\r
+                                               checked: this.selected.indexOf(records[i].id) > -1,\r
+                                               hideOnClick: false});\r
+\r
+                       item.itemId = records[i].id;\r
+                       item.on('checkchange', this.checkChange, this);\r
+\r
+                       this.add(item);\r
+               }\r
+\r
+               this.loaded = true;\r
+\r
+               if (visible) {\r
+                       this.show();\r
+               }\r
+               this.fireEvent('load', this, records);\r
+       },\r
+\r
+       /**\r
+        * Get the selected items.\r
+        * @return {Array} selected\r
+        */\r
+       getSelected : function () {\r
+               return this.selected;\r
+       },\r
+\r
+       /** @private */\r
+       setSelected : function (value) {\r
+               value = this.selected = [].concat(value);\r
+\r
+               if (this.loaded) {\r
+                       this.items.each(function(item) {\r
+                               item.setChecked(false, true);\r
+                               for (var i = 0, len = value.length; i < len; i++) {\r
+                                       if (item.itemId == value[i]) {\r
+                                               item.setChecked(true, true);\r
+                                       }\r
+                               }\r
+                       }, this);\r
+               }\r
+       },\r
+\r
+       /**\r
+        * Handler for the 'checkchange' event from an check item in this menu\r
+        * @param {Object} item Ext.menu.CheckItem\r
+        * @param {Object} checked The checked value that was set\r
+        */\r
+       checkChange : function (item, checked) {\r
+               var value = [];\r
+               this.items.each(function(item) {\r
+                       if (item.checked) {\r
+                               value.push(item.itemId);\r
+                       }\r
+               }, this);\r
+               this.selected = value;\r
+\r
+               this.fireEvent('checkchange', item, checked);\r
+       }\r
 });
\ No newline at end of file
index e2f0288..ab184a3 100644 (file)
-/*!
- * Ext JS Library 3.1.1
- * Copyright(c) 2006-2010 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
+/*!\r
+ * Ext JS Library 3.1.1\r
+ * Copyright(c) 2006-2010 Ext JS, LLC\r
+ * licensing@extjs.com\r
+ * http://www.extjs.com/license\r
+ */\r
 Ext.ns('Ext.ux.menu');\r
 \r
-/** \r
+/**\r
  * @class Ext.ux.menu.RangeMenu\r
  * @extends Ext.menu.Menu\r
  * Custom implementation of Ext.menu.Menu that has preconfigured\r
  * items for gt, lt, eq.\r
  * <p><b><u>Example Usage:</u></b></p>\r
- * <pre><code>    \r
+ * <pre><code>\r
 \r
- * </code></pre> \r
+ * </code></pre>\r
  */\r
 Ext.ux.menu.RangeMenu = Ext.extend(Ext.menu.Menu, {\r
 \r
-    constructor : function (config) {\r
+       constructor : function (config) {\r
+\r
+               Ext.ux.menu.RangeMenu.superclass.constructor.call(this, config);\r
+\r
+               this.addEvents(\r
+                               /**\r
+                                * @event update\r
+                                * Fires when a filter configuration has changed\r
+                                * @param {Ext.ux.grid.filter.Filter} this The filter object.\r
+                                */\r
+                               'update'\r
+               );\r
+\r
+               this.updateTask = new Ext.util.DelayedTask(this.fireUpdate, this);\r
+\r
+               var i, len, item, cfg, Cls;\r
+\r
+               for (i = 0,len = this.menuItems.length; i < len; i++) {\r
+                       item = this.menuItems[i];\r
+                       if (item !== '-') {\r
+                               // defaults\r
+                               cfg = {\r
+                                       itemId: 'range-' + item,\r
+                                       enableKeyEvents: true,\r
+                                       iconCls: this.iconCls[item] || 'no-icon',\r
+                                       listeners: {\r
+                                               scope: this,\r
+                                               keyup: this.onInputKeyUp\r
+                                       }\r
+                               };\r
+                               Ext.apply(\r
+                                               cfg,\r
+                                               // custom configs\r
+                                               Ext.applyIf(this.fields[item] || {}, this.fieldCfg[item]),\r
+                                               // configurable defaults\r
+                                               this.menuItemCfgs\r
+                               );\r
+                               Cls = cfg.fieldCls || this.fieldCls;\r
+                               item = this.fields[item] = new Cls(cfg);\r
+                       }\r
+                       this.add(item);\r
+               }\r
+       },\r
+\r
+       /**\r
+        * @private\r
+        * called by this.updateTask\r
+        */\r
+       fireUpdate : function () {\r
+               this.fireEvent('update', this);\r
+       },\r
 \r
-        Ext.ux.menu.RangeMenu.superclass.constructor.call(this, config);\r
+       /**\r
+        * Get and return the value of the filter.\r
+        * @return {String} The value of this filter\r
+        */\r
+       getValue : function () {\r
+               var result = {}, key, field;\r
+               for (key in this.fields) {\r
+                       field = this.fields[key];\r
+                       if (field.isValid() && String(field.getValue()).length > 0) {\r
+                               result[key] = field.getValue();\r
+                       }\r
+               }\r
+               return result;\r
+       },\r
 \r
-        this.addEvents(\r
-            /**\r
-             * @event update\r
-             * Fires when a filter configuration has changed\r
-             * @param {Ext.ux.grid.filter.Filter} this The filter object.\r
-             */\r
-            'update'\r
-        );\r
-      \r
-        this.updateTask = new Ext.util.DelayedTask(this.fireUpdate, this);\r
-    \r
-        var i, len, item, cfg, Cls;\r
+       /**\r
+        * Set the value of this menu and fires the 'update' event.\r
+        * @param {Object} data The data to assign to this menu\r
+        */\r
+       setValue : function (data) {\r
+               var key;\r
+               for (key in this.fields) {\r
+                       this.fields[key].setValue(data[key] !== undefined ? data[key] : '');\r
+               }\r
+               this.fireEvent('update', this);\r
+       },\r
 \r
-        for (i = 0, len = this.menuItems.length; i < len; i++) {\r
-            item = this.menuItems[i];\r
-            if (item !== '-') {\r
-                // defaults\r
-                cfg = {\r
-                    itemId: 'range-' + item,\r
-                    enableKeyEvents: true,\r
-                    iconCls: this.iconCls[item] || 'no-icon',\r
-                    listeners: {\r
-                        scope: this,\r
-                        keyup: this.onInputKeyUp\r
-                    }\r
-                };\r
-                Ext.apply(\r
-                    cfg,\r
-                    // custom configs\r
-                    Ext.applyIf(this.fields[item] || {}, this.fieldCfg[item]),\r
-                    // configurable defaults\r
-                    this.menuItemCfgs\r
-                );\r
-                Cls = cfg.fieldCls || this.fieldCls;\r
-                item = this.fields[item] = new Cls(cfg);\r
-            }\r
-            this.add(item);\r
-        }\r
-    },\r
+       /**\r
+        * @private\r
+        * Handler method called when there is a keyup event on an input\r
+        * item of this menu.\r
+        */\r
+       onInputKeyUp : function (field, e) {\r
+               var k = e.getKey();\r
+               if (k == e.RETURN && field.isValid()) {\r
+                       e.stopEvent();\r
+                       this.hide(true);\r
+                       return;\r
+               }\r
 \r
-    /**\r
-     * @private\r
-     * called by this.updateTask\r
-     */\r
-    fireUpdate : function () {\r
-        this.fireEvent('update', this);\r
-    },\r
-    \r
-    /**\r
-     * Get and return the value of the filter.\r
-     * @return {String} The value of this filter\r
-     */\r
-    getValue : function () {\r
-        var result = {}, key, field;\r
-        for (key in this.fields) {\r
-            field = this.fields[key];\r
-            if (field.isValid() && String(field.getValue()).length > 0) {\r
-                result[key] = field.getValue();\r
-            }\r
-        }\r
-        return result;\r
-    },\r
-  \r
-    /**\r
-     * Set the value of this menu and fires the 'update' event.\r
-     * @param {Object} data The data to assign to this menu\r
-     */        \r
-    setValue : function (data) {\r
-        var key;\r
-        for (key in this.fields) {\r
-            this.fields[key].setValue(data[key] !== undefined ? data[key] : '');\r
-        }\r
-        this.fireEvent('update', this);\r
-    },\r
+               if (field == this.fields.eq) {\r
+                       if (this.fields.gt) {\r
+                               this.fields.gt.setValue(null);\r
+                       }\r
+                       if (this.fields.lt) {\r
+                               this.fields.lt.setValue(null);\r
+                       }\r
+               }\r
+               else {\r
+                       this.fields.eq.setValue(null);\r
+               }\r
 \r
-    /**  \r
-     * @private\r
-     * Handler method called when there is a keyup event on an input\r
-     * item of this menu.\r
-     */\r
-    onInputKeyUp : function (field, e) {\r
-        var k = e.getKey();\r
-        if (k == e.RETURN && field.isValid()) {\r
-            e.stopEvent();\r
-            this.hide(true);\r
-            return;\r
-        }\r
-        \r
-        if (field == this.fields.eq) {\r
-            if (this.fields.gt) {\r
-                this.fields.gt.setValue(null);\r
-            }\r
-            if (this.fields.lt) {\r
-                this.fields.lt.setValue(null);\r
-            }\r
-        }\r
-        else {\r
-            this.fields.eq.setValue(null);\r
-        }\r
-        \r
-        // restart the timer\r
-        this.updateTask.delay(this.updateBuffer);\r
-    }\r
+               // restart the timer\r
+               this.updateTask.delay(this.updateBuffer);\r
+       }\r
 });\r
index 08e9ddd..a4c2823 100644 (file)
@@ -9,58 +9,60 @@ Ext.ns('Ext.ux.form');
 Ext.ux.form.SearchField = Ext.extend(Ext.form.TwinTriggerField, {
        enableKeyEvents: true,
        specialKeyOnly: false,
-       validationEvent:false,
-       validateOnBlur:false,
-       trigger1Class:'x-form-trigger t3-icon t3-icon-actions t3-icon-actions-input t3-icon-input-clear ux-searchfield-trigger1',
-       trigger2Class:'x-btn-text t3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-tree-search-open ux-searchfield-trigger2',
-       hideTrigger1:true,
-       width:180,
+       validationEvent: false,
+       validateOnBlur: false,
+       trigger1Class: 'x-form-trigger t3-icon t3-icon-actions t3-icon-actions-input t3-icon-input-clear ux-searchfield-trigger1',
+       trigger2Class: 'x-btn-text t3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-tree-search-open ux-searchfield-trigger2',
+       hideTrigger1: true,
+       width: 180,
        hasSearch : false,
        paramName : 'query',
        filterFunction: null,
 
-       initComponent : function(){
+       initComponent : function() {
 
                this.triggerConfig = {
                        tag:'span', cls:'x-form-twin-triggers',
                        cn:[
                                {tag: "span", src: Ext.BLANK_IMAGE_URL, alt: "", cls: "x-form-trigger " + this.trigger1Class},
-                               {tag: "span", src: Ext.BLANK_IMAGE_URL, alt: "", cls: "x-form-trigger " + this.trigger2Class}
+                               {tag: "span", src: Ext.BLANK_IMAGE_URL, alt: "", cls: "x-form-trigger " + this.trigger2Class}
                        ]
                };
 
 
-               //Ext.ux.form.SearchField.superclass.initComponent.call(this);
-               this.on('specialkey', function(f, e){
-                       if(e.getKey() == e.ENTER){
+               this.on('specialkey', function(f, e) {
+                       if (e.getKey() == e.ENTER) {
                                this.onTrigger2Click();
                        }
                }, this);
+
                if (!this.specialKeyOnly) {
-                       this.on('keyup', function(f, e){
+                       this.on('keyup', function(f, e) {
                                var value = this.getRawValue();
                                this.onTrigger2Click();
                        }, this);
                }
        },
 
-       onRender : function(ct, position){
+       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 ux-searchfield'});
                this.trigger = this.wrap.createChild(this.triggerConfig ||
-                               {tag: "img", src: Ext.BLANK_IMAGE_URL, alt: "", cls: "x-form-trigger " + this.triggerClass});
+                       {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());
+
+               if (!this.width) {
+                       this.wrap.setWidth(this.el.getWidth() + this.trigger.getWidth());
                }
                this.resizeEl = this.positionEl = this.wrap;
        },
 
 
 
-       onTrigger1Click : function(){
-               if(this.hasSearch){
+       onTrigger1Click : function() {
+               if (this.hasSearch) {
                        this.el.dom.value = '';
                        var o = {start: 0};
                        this.store.baseParams = this.store.baseParams || {};
@@ -75,9 +77,9 @@ Ext.ux.form.SearchField = Ext.extend(Ext.form.TwinTriggerField, {
                }
        },
 
-       onTrigger2Click : function(){
+       onTrigger2Click : function() {
                var v = this.getRawValue();
-               if(v.length < 1){
+               if (v.length < 1) {
                        this.onTrigger1Click();
                        return;
                }