diff options
author | Remco Brenninkmeijer <requist1@starmail.nl> | 2014-07-16 22:53:14 +0200 |
---|---|---|
committer | Remco Brenninkmeijer <requist1@starmail.nl> | 2014-07-16 22:53:14 +0200 |
commit | e307572e8db487461a659fc0191256b2452f799e (patch) | |
tree | 62e5951db918f86e28301a88def8eb81a5ba3a5a /apps/files | |
parent | c8c00d27c4240b4067594316b4657fde9a338e28 (diff) | |
download | nextcloud-server-e307572e8db487461a659fc0191256b2452f799e.tar.gz nextcloud-server-e307572e8db487461a659fc0191256b2452f799e.zip |
Fixed comments from PVince81
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/js/filelist.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 12af5593898..67a3de9a5b0 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -369,7 +369,7 @@ this.setSort(sort, (this._sortDirection === 'desc')?'asc':'desc'); } else { - if ( sort == 'name' ) { //default sorting of name is opposite to size and mtime + if ( sort === 'name' ) { //default sorting of name is opposite to size and mtime this.setSort(sort, 'asc'); } else { @@ -908,10 +908,9 @@ * @param sort sort attribute name * @param direction sort direction, one of "asc" or "desc" */ - setSort: function(sort, direction, show) { + setSort: function(sort, direction ) { var comparator = FileList.Comparators[sort] || FileList.Comparators.name; - this._show = true; - this._sort = sort; + this._sort = sort; this._sortDirection = (direction === 'desc')?'desc':'asc'; this._sortComparator = comparator; @@ -923,13 +922,13 @@ this.$el.find('thead th .sort-indicator') .removeClass(this.SORT_INDICATOR_ASC_CLASS) .removeClass(this.SORT_INDICATOR_DESC_CLASS) - .toggleClass('hidden', !show) + .toggleClass('hidden', true) .addClass(this.SORT_INDICATOR_DESC_CLASS); this.$el.find('thead th.column-' + sort + ' .sort-indicator') .removeClass(this.SORT_INDICATOR_ASC_CLASS) .removeClass(this.SORT_INDICATOR_DESC_CLASS) - .toggleClass('hidden', show) + .toggleClass('hidden', false) .addClass(direction === 'desc' ? this.SORT_INDICATOR_DESC_CLASS : this.SORT_INDICATOR_ASC_CLASS); }, |