Fixed bug #17787: Filtering in repository state does not work
authorsteffenk <steffenk@709f56b5-9817-0410-a4d7-c38de5d9e867>
Sun, 27 Feb 2011 13:46:27 +0000 (13:46 +0000)
committersteffenk <steffenk@709f56b5-9817-0410-a4d7-c38de5d9e867>
Sun, 27 Feb 2011 13:46:27 +0000 (13:46 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10658 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectserver.php
typo3/sysext/em/res/js/em_components.js

index eead7a1..3eef44f 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2011-02-27  Steffen Kamper  <steffen@typo3.org>
 
+       * Fixed bug #17787: Filtering in repository state does not work
        * Fixed bug #17786: Filtering repository list fields are not prefixed with tablename
        * Follow-up to #17735: Class 'tx_em_XmlException' not found when Retrieve / Update
 
index 5c58378..75b8c97 100644 (file)
@@ -905,6 +905,7 @@ class tx_em_Connection_ExtDirectServer {
                        $extPath = t3lib_div::strtolower($value['extkey']);
                        $list['results'][$key]['statevalue'] = $value['state'];
                        $list['results'][$key]['state'] = tx_em_Tools::getDefaultState(intval($value['state']));
+                       $list['results'][$key]['stateCls'] = 'state-' . $list['results'][$key]['state'];
                        $list['results'][$key]['version'] = tx_em_Tools::versionFromInt($value['maxintversion']);
                        $list['results'][$key]['icon'] = '<img alt="" src="' . $mirrorUrl . $extPath{0} . '/' . $extPath{1} . '/' . $extPath . '_' . $list['results'][$key]['version'] . '.gif" />';
 
index 2d58283..50c168b 100644 (file)
@@ -420,7 +420,31 @@ TYPO3.EM.GridColumns.ExtensionStateValue = {
        dataIndex:'statevalue',
        renderer: function(value, metaData, record, rowIndex, colIndex, store){
                metaData.css += record.data.stateCls + ' ';
-               return record.data.state;
+               var label = TYPO3.lang.translation_n_a;
+               switch (parseInt(value, 10)) {
+                       case 0:
+                               label = TYPO3.lang.state_alpha;
+                       break;
+                       case 1:
+                               label = TYPO3.lang.state_beta;
+                       break;
+                       case 2:
+                               label = TYPO3.lang.state_stable;
+                       break;
+                       case 3:
+                               label = TYPO3.lang.state_experimental;
+                       break;
+                       case 4:
+                               label = TYPO3.lang.state_test;
+                       break;
+                       case 5:
+                               label = TYPO3.lang.state_obsolete;
+                       break;
+                       case 6:
+                               label = TYPO3.lang.state_exclude_from_updates;
+                       break;
+               }
+               return label;
        },
        filterable: true
 };