mirror of
https://github.com/webodf/WebODF.git
synced 2026-11-30 16:47:58 +01:00
31 lines
776 B
JavaScript
31 lines
776 B
JavaScript
/*global Ext*/
|
|
Ext.define('WebODFApp.store.FileStore', {
|
|
extend: 'Ext.data.Store',
|
|
config: {
|
|
storeId: 'FileStore',
|
|
model: 'WebODFApp.model.FileSystem',
|
|
autoLoad: true,
|
|
grouper: {
|
|
groupFn: function (record) {
|
|
"use strict";
|
|
return record.get('fileName')[0].toUpperCase();
|
|
}
|
|
},
|
|
proxy: {
|
|
xtype: 'filesystemproxy'
|
|
},
|
|
sorters: function (a, b) {
|
|
"use strict";
|
|
a = a.get('fileName').toUpperCase();
|
|
b = b.get('fileName').toUpperCase();
|
|
if (a > b) {
|
|
return 1;
|
|
}
|
|
if (a < b) {
|
|
return -1;
|
|
}
|
|
return 0;
|
|
}
|
|
}
|
|
});
|