organigramm test
This commit is contained in:
parent
780f84d318
commit
9f35e89748
|
|
@ -17,7 +17,10 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
div.diagram_class {
|
#diagram {
|
||||||
|
min-width: 768px;
|
||||||
|
min-height: 1200px;
|
||||||
|
padding-left: 120px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
@ -56,6 +59,10 @@ for(i = 0; i < data.length; i++){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Creates nested array from data
|
//Creates nested array from data
|
||||||
function unflatten(arr) {
|
function unflatten(arr) {
|
||||||
var tree = [],
|
var tree = [],
|
||||||
|
|
@ -87,7 +94,6 @@ function unflatten(arr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var html = ['<ul class="tree" >'];
|
var html = ['<ul class="tree" >'];
|
||||||
|
|
||||||
//Create UL-LI-List for tree
|
//Create UL-LI-List for tree
|
||||||
function createList(arr) {
|
function createList(arr) {
|
||||||
html.push('<ul>');
|
html.push('<ul>');
|
||||||
|
|
@ -105,7 +111,6 @@ function createList(arr) {
|
||||||
});
|
});
|
||||||
html.push('</ul>');
|
html.push('</ul>');
|
||||||
}
|
}
|
||||||
|
|
||||||
createList(unflatten(data));
|
createList(unflatten(data));
|
||||||
|
|
||||||
//Remove double ul/ul-Elements at the End
|
//Remove double ul/ul-Elements at the End
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue