2013-06-22 08:24:24 +02:00
|
|
|
'use strict';
|
2013-06-09 22:51:32 +02:00
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
define(
|
|
|
|
[
|
|
|
|
'backgrid',
|
|
|
|
'Shared/FormatHelpers'
|
|
|
|
], function (Backgrid, FormatHelpers) {
|
|
|
|
return Backgrid.Cell.extend({
|
2013-06-09 22:51:32 +02:00
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
className: 'file-size-cell',
|
2013-06-09 22:51:32 +02:00
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
render: function () {
|
|
|
|
var size = this.model.get(this.column.get('name'));
|
2013-06-25 06:43:16 +02:00
|
|
|
this.$el.html(FormatHelpers.Bytes(size));
|
2013-06-25 01:41:59 +02:00
|
|
|
this.delegateEvents();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
});
|
2013-06-09 22:51:32 +02:00
|
|
|
});
|