File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 215
215
background : # FFF7D7 ;
216
216
}
217
217
218
+ .lpt-sortDesc : before {
219
+ content : "▼ " ;
220
+ }
221
+
222
+ .lpt-sortAsc : before {
223
+ content : "▲ " ;
224
+ }
225
+
218
226
/*.lpt .lpt-leftHeader table {*/
219
227
/*margin-bottom: 10em;*/
220
228
/*}*/
Original file line number Diff line number Diff line change @@ -537,6 +537,12 @@ DataController.prototype.sortByColumn = function (columnIndex) {
537
537
this . SORT_STATE . order = order ;
538
538
this . SORT_STATE . column = columnIndex ;
539
539
540
+ for ( var i in data . rawData [ data . info . topHeaderRowsNumber - 1 ] ) {
541
+ if ( data . rawData [ data . info . topHeaderRowsNumber - 1 ] [ i ] . className ) {
542
+ delete data . rawData [ data . info . topHeaderRowsNumber - 1 ] [ i ] . className ;
543
+ }
544
+ }
545
+
540
546
if ( order === 0 ) {
541
547
data . rawData = data . _rawDataOrigin ;
542
548
this . _trigger ( ) ;
@@ -554,6 +560,9 @@ DataController.prototype.sortByColumn = function (columnIndex) {
554
560
data . rawData = data . _rawDataOrigin . slice ( 0 , data . info . topHeaderRowsNumber )
555
561
. concat ( newRawData )
556
562
. concat ( this . SUMMARY_SHOWN ? [ data . _rawDataOrigin [ data . _rawDataOrigin . length - 1 ] ] : [ ] ) ;
563
+ data . rawData [ data . info . topHeaderRowsNumber - 1 ] [ data . info . leftHeaderColumnsNumber + columnIndex ]
564
+ . className = order === 0 ? "" : order === 1 ? "lpt-sortDesc" : "lpt-sortAsc" ;
565
+
557
566
558
567
this . _trigger ( ) ;
559
568
Original file line number Diff line number Diff line change @@ -614,6 +614,7 @@ PivotView.prototype.renderRawData = function (data) {
614
614
tr . appendChild ( th = document . createElement ( "th" ) ) ;
615
615
th . textContent = rawData [ y ] [ x ] . value ;
616
616
if ( rawData [ y ] [ x ] . style ) th . setAttribute ( "style" , rawData [ y ] [ x ] . style ) ;
617
+ if ( rawData [ y ] [ x ] . className ) th . className = rawData [ y ] [ x ] . className ;
617
618
if ( rawData [ y ] [ x ] . group ) renderedGroups [ rawData [ y ] [ x ] . group ] = {
618
619
x : x ,
619
620
y : y ,
You can’t perform that action at this time.
0 commit comments