File tree 3 files changed +33
-5
lines changed
3 files changed +33
-5
lines changed Original file line number Diff line number Diff line change @@ -264,6 +264,15 @@ Template.mfTransLang.helpers({
264
264
caseInsensitiveOrdering : function ( ) {
265
265
return Session . get ( 'caseInsensitiveOrdering' ) ;
266
266
} ,
267
+ sortOrderHeaderClass : function ( headerSortField ) {
268
+ var classes = '' ;
269
+ var sortField = Session . get ( 'translationSortField' ) ;
270
+ var sortOrder = Session . get ( 'translationSortOrder' ) ;
271
+ if ( headerSortField === sortField ) {
272
+ classes += ' active-sort ' + sortOrder ;
273
+ }
274
+ return classes
275
+ } ,
267
276
stateClass : function ( ) {
268
277
if ( this . fuzzy )
269
278
return 'fuzzy' ;
Original file line number Diff line number Diff line change @@ -77,6 +77,18 @@ div.mfTransGraph.untrans { background: #800; border-right: 1px solid black; }
77
77
78
78
# mfTransLang .options label { margin-right : 10px ; }
79
79
80
+ # mfTransLang th { position : relative; }
81
+ # mfTransLang th .active-sort { background-color : # CCC ; }
82
+ # mfTransLang th .active-sort a { font-weight : 500 ; }
83
+ # mfTransLang th .active-sort ::after {
84
+ font-size : 0.6em ;
85
+ position : absolute;
86
+ top : 5px ;
87
+ right : 10px ;
88
+ }
89
+ # mfTransLang th .active-sort .asc ::after { content : '▲' ; }
90
+ # mfTransLang th .active-sort .desc ::after { content : '▼' ; }
91
+
80
92
# mfTransLang textarea {
81
93
font-family : monospace;
82
94
height : 5em ; width : 100% ;
Original file line number Diff line number Diff line change @@ -74,10 +74,16 @@ <h2>{{mf 'mf_site_translations' 'Site Translations'}}</h2>
74
74
< thead >
75
75
< tr >
76
76
{{#if showKey}}
77
- < th > < a href ="# " class ="translationSort " data-sortField ="key "> Key</ a > </ th >
77
+ < th class ="{{sortOrderHeaderClass 'key'}} ">
78
+ < a href ="# " class ='translationSort ' data-sortField ="key "> Key</ a >
79
+ </ th >
78
80
{{/if}}
79
- < th > < a href ="# " class ="translationSort " data-sortField ="orig "> Original String ({{origLang}})</ a > </ th >
80
- < th > < a href ="# " class ="translationSort " data-sortField ="trans "> Translation ({{destLang}})</ a > </ th >
81
+ < th class ="{{sortOrderHeaderClass 'orig'}} ">
82
+ < a href ="# " class ="translationSort " data-sortField ="orig "> Original String ({{origLang}})</ a >
83
+ </ th >
84
+ < th class ="{{sortOrderHeaderClass 'trans'}} ">
85
+ < a href ="# " class ="translationSort " data-sortField ="trans "> Translation ({{destLang}})</ a >
86
+ </ th >
81
87
</ tr >
82
88
</ thead >
83
89
</ table >
@@ -104,9 +110,10 @@ <h2>{{mf 'mf_site_translations' 'Site Translations'}}</h2>
104
110
</ label >
105
111
< label >
106
112
< input type ='checkbox ' id ='translationCaseInsensitiveOrdering ' {{isCheckboxChecked caseInsensitiveOrdering}} >
107
- Case Insensitive Ordering
113
+ Case insensitive ordering
108
114
</ label >
109
- Use ctrl-up and ctrl-down to quickly change keys
115
+ < br />
116
+ Use ctrl-up and ctrl-down to quickly change keys & click on headers to reorder the columns.
110
117
</ p >
111
118
< span > < b > {{keyInfo.key}}</ b > in {{keyInfo.file}}:{{keyInfo.line
112
119
}}{{#if keyInfo.template}} (template
You can’t perform that action at this time.
0 commit comments