Free space will show shared drives and show drive label

This commit is contained in:
Mark McDowall
2013-10-15 21:11:45 -07:00
parent 741279b596
commit d4fd731b34
8 changed files with 246 additions and 66 deletions
@@ -5,8 +5,9 @@ define([
'backgrid',
'System/Info/DiskSpace/DiskSpaceCollection',
'Shared/LoadingView',
'System/Info/DiskSpace/DiskSpacePathCell',
'Cells/FileSizeCell'
], function (vent,Marionette,Backgrid,DiskSpaceCollection,LoadingView,FileSizeCell) {
], function (vent,Marionette,Backgrid,DiskSpaceCollection,LoadingView, DiskSpacePathCell, FileSizeCell) {
return Marionette.Layout.extend({
template: 'System/Info/DiskSpace/DiskSpaceLayoutTemplate',
@@ -16,21 +17,19 @@ define([
columns:
[
{
name: 'driveLetter',
label: 'Drive',
cell: 'string'
name: 'path',
label: 'Location',
cell: DiskSpacePathCell
},
{
name: 'freeSpace',
label: 'Free Space',
cell: FileSizeCell,
sortable:true
cell: FileSizeCell
},
{
name: 'totalSpace',
label: 'Total Space',
cell: FileSizeCell,
sortable:true
cell: FileSizeCell
}
],
@@ -0,0 +1,28 @@
'use strict';
define(
[
'backgrid'
], function (Backgrid) {
return Backgrid.Cell.extend({
className: 'disk-space-path-cell',
render: function () {
this.$el.empty();
var path = this.model.get('path');
var label = this.model.get('label');
var contents = path;
if (label) {
contents += ' ({0})'.format(label);
}
this.$el.html(contents);
return this;
}
});
});