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