corrade-nucleus-nucleons
/pack-rat/003_pack_rat/pack-rat/index.html |
@@ -358,15 +358,24 @@ |
path: node.id |
} |
}).done(function(response) { |
var data = wasCSVToArray(response.data); |
alert(JSON.stringify(data.chunk(10), 4, null)); |
$.each(data.chunk(10), function(i, e) { |
alert(wasKeyValueObjectify(e)); |
/*data.push({ |
x: time + ++j * updateInterval, |
y: parseInt(e) |
});*/ |
var list = []; |
$.each(wasCSVToArray(response.data) |
.chunk(10), function(i, e) { |
e = wasKeyValueObjectify(e); |
list.push({ |
'id' : node.id === '/' ? '/' + e['item'] : node.id + '/' + e['item'], |
'parent' : node.id, |
'data' : { |
'type' : e['type'], |
'time' : e['time'] |
}, |
'text' : e['name'], |
'children' : e['type'] === 'folder', |
'icon' : '/pack-rat/img/icons/' + e['type'] + '.png', |
'opened' : 'false' |
}); |
}); |
callback.call(this, list); |
}); |
} |
} |