[BUGFIX] Fix sorting in language list 40/51040/3
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:41:34 +0000 (00:41 +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/51040
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Sommer <markussom@posteo.de>
Tested-by: Markus Sommer <markussom@posteo.de>
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 219f12b..8e37458 100644 (file)
        <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 />
+       <br/>
        <table id="typo3-language-list" class="table table-striped table-hover t3-datatable">
                <thead>
                <tr>
                <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>
@@ -68,8 +70,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 e8f9555..0d8d2e9 100644 (file)
@@ -334,6 +334,7 @@ define(['jquery',
                        paging: false,
                        info: false,
                        ordering: true,
+                       columnDefs: [{targets: 4, orderable: false}],
                        language: LanguageModule.labels,
                        order: [[1, 'asc']]
                });