[BUGFIX] Fix sorting in language list 57/51157/2
authorMarkus Sommer <markussom@posteo.de>
Fri, 23 Dec 2016 13:48:06 +0000 (14:48 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 5 Jan 2017 23:50:51 +0000 (00:50 +0100)
* Add sorting field for A/D
* disable senseless sorting of actions

Resolves: #79085
Releases: master, 7.6
Change-Id: Ib7b31c43522d31dcecf9e97042b98be434616068
Reviewed-on: https://review.typo3.org/51157
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/lang/Resources/Private/Templates/Language/ListLanguages.html
typo3/sysext/lang/Resources/Public/JavaScript/LanguageModule.js

index bdb246f..a191404 100644 (file)
@@ -11,8 +11,8 @@
        <form class="form-inline">
                <div class="form-group">
                        <f:form.textfield name="typo3-language-searchfield" placeholder="{f:translate(key:'table.search')}"
-                                                         id="typo3-language-searchfield" value="{search}"
-                                                         class="form-control t3js-language-searchfield"/>
+                                                                                               id="typo3-language-searchfield" value="{search}"
+                                                                                               class="form-control t3js-language-searchfield"/>
                </div>
        </form>
        <br />
                <tbody>
                <f:for each="{languages}" as="language" iteration="iterator">
                        <tr id="language-{language.locale}" data-locale="{language.locale}"
-                               class="{f:if(condition: language.selected, then: 'enabled', else: 'disabled')} {f:if(condition: iterator.isEven, then: 'even', else: 'odd')}"
-                               role="row">
-                               <td>
+                                       class="{f:if(condition: language.selected, then: 'enabled', else: 'disabled')} {f:if(condition: iterator.isEven, then: 'even', else: 'odd')}"
+                                       role="row">
+                               <td data-order="{f:if(condition: language.selected, then: 'true', else: 'false')}">
                                        <a class="btn btn-default deactivateLanguageLink" data-action="deactivateLanguage"
-                                          data-locale="{language.locale}" data-language="{language.label}"
-                                          data-selected="{f:if(condition: language.selected, then: 'true', else: 'false')}"><span
-                                               title="Deactivate" class="t3-icon fa fa-minus-square"> </span></a>
+                                                data-locale="{language.locale}" data-language="{language.label}"
+                                                data-selected="{f:if(condition: language.selected, then: 'true', else: 'false')}">
+                                               <span title="{f:translate(key:'button.deactivate')}" class="t3-icon fa fa-minus-square"> </span>
+                                       </a>
                                        <a class="btn btn-default activateLanguageLink" data-action="activateLanguage"
-                                          data-locale="{language.locale}" data-language="{language.label}"
-                                          data-selected="{f:if(condition: language.selected, then: 'true', else: 'false')}"><span
-                                               title="Activate" class="t3-icon fa fa-plus-circle"> </span></a>
+                                                data-locale="{language.locale}" data-language="{language.label}"
+                                                data-selected="{f:if(condition: language.selected, then: 'true', else: 'false')}">
+                                               <span title="{f:translate(key:'button.activate')}" class="t3-icon fa fa-plus-circle"> </span>
+                                       </a>
                                </td>
                                <td class="sorting_1">{language.label}</td>
                                <td>{language.locale}</td>
@@ -64,8 +66,7 @@
                                        <div class="progressBar">
                                                <div class="progress">
                                                        <div class="progress-text"></div>
-                                                       <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0"
-                                                                aria-valuemax="100" style="width: 0;"></div>
+                                                       <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0;"></div>
                                                </div>
                                        </div>
                                </td>
index 4e1de2c..d4f7f36 100644 (file)
@@ -306,6 +306,7 @@ define(['jquery',
                        paging: false,
                        info: false,
                        ordering: true,
+                       columnDefs: [{targets: 4, orderable: false}],
                        language: LanguageModule.labels,
                        order: [[1, 'asc']]
                });