vendor/assets/elfinder_OLD/js/elfinder.full.js
function(file1, file2) {
		var self  = this,
			type  = self.sortType,
			asc   = self.sortOrder == 'asc',
			stick = self.sortStickFolders,
			rules = self.sortRules,
			sort  = rules[type],
			d1    = file1.mime == 'directory',
			d2    = file2.mime == 'directory',
			res;
			
		if (stick) {
			if (d1 && !d2) {
				return -1;
			} else if (!d1 && d2) {
				return 1;
			}
		}
		
		res = asc ? sort(file1, file2) : sort(file2, file1);
		
		return type !== 'name' && res === 0
			? res = asc ? rules.name(file1, file2) : rules.name(file2, file1)
			: res;
	}
function(file1, file2) {
		var self  = this,
			type  = self.sortType,
			asc   = self.sortOrder == 'asc',
			stick = self.sortStickFolders,
			rules = self.sortRules,
			sort  = rules[type],
			d1    = file1.mime == 'directory',
			d2    = file2.mime == 'directory',
			res;
			
		if (stick) {
			if (d1 && !d2) {
				return -1;
			} else if (!d1 && d2) {
				return 1;
			}
		}
		
		res = asc ? sort(file1, file2) : sort(file2, file1);
		
		return type !== 'name' && res === 0
			? res = asc ? rules.name(file1, file2) : rules.name(file2, file1)
			: res;
	}
function ( file1 , file2 ) { var self = this , type = self . sortType , asc = self . sortOrder == 'asc' , stick = self . sortStickFolders , rules = self . sortRules , sort = rules [ type ] , d1 = file1 . mime == 'directory' , d2 = file2 . mime == 'directory' , res ; if ( stick ) { if ( d1 && ! d2 ) { return - 1 ; } else if ( ! d1 && d2 ) { return 1 ; } } res = asc ? sort ( file1 , file2 ) : sort ( file2 , file1 ) ; return type !== 'name' && res === 0 ? res = asc ? rules . name ( file1 , file2 ) : rules . name ( file2 , file1 ) : res ; }
Compare files based on elFinder.sort

@param  Object  file
@param  Object  file
@return Number
Compare files based on elFinder . sort