1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-31 11:19:40 +02:00

Refactoring, moved all assets into /assets, all angular files moved to /app.

This commit is contained in:
Kevan Ahlquist 2014-11-02 23:56:39 -06:00
parent 2b2d4152a5
commit a9a36323eb
18 changed files with 12 additions and 429 deletions

15
assets/js/legend.js Normal file
View file

@ -0,0 +1,15 @@
function legend(parent, data) {
parent.className = 'legend';
var datas = data.hasOwnProperty('datasets') ? data.datasets : data;
datas.forEach(function(d) {
var title = document.createElement('span');
title.className = 'title';
title.style.borderColor = d.hasOwnProperty('strokeColor') ? d.strokeColor : d.color;
title.style.borderStyle = 'solid';
parent.appendChild(title);
var text = document.createTextNode(d.title);
title.appendChild(text);
});
}