'use strict';
oml.ui.folderList = function(options) {
var ui = oml.user.ui,
that = Ox.TableList({
columns: [
{
format: function(value, data) {
return $('')
.attr({
src: Ox.UI.getImageURL(
value == 'libraries' ? 'symbolData'
: value == 'library' ? 'symbolUser'
: data.name == 'Public' ? 'symbolPublish'
: value == 'static' ? 'symbolClick'
: 'symbolFind'
)
})
.css({
width: '10px',
height: '10px',
margin: '2px -2px 2px 0'
});
},
id: 'type',
visible: true,
width: 16
},
{
format: Ox.encodeHTMLEntities,
id: 'name',
visible: true,
width: ui.sidebarSize - 16 - 48,
},
{
align: 'right',
format: function(value) {
return value > -1
? ''
+ Ox.formatNumber(value)
+ ''
: '';
},
id: 'items',
visible: true,
width: 48
}
],
draggable: options.draggable,
items: Ox.clone(options.items, true),
sort: [{key: 'index', operator: '+'}],
sortable: options.sortable,
selected: [],
unique: 'id'
})
.css({
width: ui.sidebarSize + 'px',
height: '16px'
});
that.resizeElement = function() {
// ...
};
return that;
};