Files
Studio-42-elFinder/js/commands/sort.js
T
Dmitry (dio) Levashov 49feb83a69 cleanup code
2012-06-20 21:59:04 +04:00

32 lines
573 B
JavaScript

"use strict"
/**
* @class elFinder command "sort"
* Change sort files rule
*
* @author Dmitry (dio) Levashov
**/
elFinder.prototype.commands.sort = function() {
/**
* Command options
*
* @type Object
*/
this.options = {ui : 'sortbutton'};
this.getstate = function() {
return 0;
}
this.exec = function(hashes, sort) {
var fm = this.fm,
sort = $.extend({
type : fm.sortType,
order : fm.sortOrder,
stick : fm.sortStickFolders
}, sort);
this.fm.setSort(sort.type, sort.order, sort.stick);
return $.Deferred().resolve();
}
}