]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixed comments from PVince81
authorRemco Brenninkmeijer <requist1@starmail.nl>
Wed, 16 Jul 2014 20:53:14 +0000 (22:53 +0200)
committerRemco Brenninkmeijer <requist1@starmail.nl>
Wed, 16 Jul 2014 20:53:14 +0000 (22:53 +0200)
apps/files/js/filelist.js

index 12af5593898c51b008c32fc390ac400484f07c1f..67a3de9a5b0d638190522fa3b708938f9449a10d 100644 (file)
                                        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 {
                 * @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;
                         
                        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);
                },