Sort deleted files by most recently deleted firsttags/v21.0.0beta1
var result = OCA.Files.FileList.prototype.initialize.apply(this, arguments) | var result = OCA.Files.FileList.prototype.initialize.apply(this, arguments) | ||||
this.$el.find('.undelete').click('click', _.bind(this._onClickRestoreSelected, this)) | this.$el.find('.undelete').click('click', _.bind(this._onClickRestoreSelected, this)) | ||||
this.setSort('mtime', 'desc') | |||||
// Sort by most recently deleted first | |||||
this.setSort('mtime', 'asc') | |||||
/** | /** | ||||
* Override crumb making to add "Deleted Files" entry | * Override crumb making to add "Deleted Files" entry | ||||
* and convert files with ".d" extensions to a more | * and convert files with ".d" extensions to a more |
describe('Initialization', function () { | describe('Initialization', function () { | ||||
it('Sorts by mtime by default', function () { | it('Sorts by mtime by default', function () { | ||||
expect(fileList._sort).toEqual('mtime'); | expect(fileList._sort).toEqual('mtime'); | ||||
expect(fileList._sortDirection).toEqual('desc'); | |||||
expect(fileList._sortDirection).toEqual('asc'); | |||||
}); | }); | ||||
it('Always returns read and delete permission', function () { | it('Always returns read and delete permission', function () { | ||||
expect(fileList.getDirectoryPermissions()).toEqual(OC.PERMISSION_READ | OC.PERMISSION_DELETE); | expect(fileList.getDirectoryPermissions()).toEqual(OC.PERMISSION_READ | OC.PERMISSION_DELETE); |