Skip to content

Commit

Permalink
Merge branch 'HEAD' of https://catalindumitru@github.com/catalindumit…
Browse files Browse the repository at this point in the history
…ru/Proiect-AI-2012---GUI.git
  • Loading branch information
colin-dumitru committed Jan 19, 2012
2 parents a5abab1 + 4829ca7 commit c450cf7
Show file tree
Hide file tree
Showing 16 changed files with 18,625 additions and 56 deletions.
27 changes: 27 additions & 0 deletions WebServer/AfisareaEntitatilor/css/ForceDirected.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#inner-details {
font-size:12px;
}

span.close {
color:#FF5555;
cursor:pointer;
font-weight:bold;
margin-left:3px;
}

span.name {
cursor: pointer;
}

/*TOOLTIPS*/
.tip {
text-align: left;
width:auto;
max-width:500px;
}

.tip-title {
font-size: 11px;
text-align:center;
margin-bottom:2px;
}
123 changes: 123 additions & 0 deletions WebServer/AfisareaEntitatilor/css/base.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
html, body {
margin:0;
padding:0;
font-family: "Lucida Grande", Verdana;
font-size: 0.9em;
text-align: center;
background-color:#F2F2F2;
}

input, select {
font-size:0.9em;
}

table {
margin-top:-10px;
margin-left:7px;
}

h4 {
font-size:1.1em;
text-decoration:none;
font-weight:normal;
color:#23A4FF;
}

a {
color:#23A4FF;
}

#container {
width: 1000px;
height: 600px;
margin:0 auto;
position:relative;
}

#left-container,
#right-container,
#center-container {
height:600px;
position:absolute;
top:0;
}

#left-container, #right-container {
width:200px;
color:#686c70;
text-align: left;
overflow: auto;
background-color:#fff;
background-repeat:no-repeat;
border-bottom:1px solid #ddd;
}

#left-container {
left:0;
background-image:url('col2.png');
background-position:center right;
border-left:1px solid #ddd;

}

#right-container {
right:0;
background-image:url('col1.png');
background-position:center left;
border-right:1px solid #ddd;
}

#right-container h4{
text-indent:8px;
}

#center-container {
width:600px;
left:200px;
background-color:#1a1a1a;
color:#ccc;
}

.text {
margin: 7px;
}

#inner-details {
font-size:0.8em;
list-style:none;
margin:7px;
}

#log {
position:absolute;
top:10px;
font-size:1.0em;
font-weight:bold;
color:#23A4FF;
}


#infovis {
position:relative;
width:600px;
height:600px;
margin:auto;
overflow:hidden;
}

/*TOOLTIPS*/
.tip {
color: #111;
width: 139px;
background-color: white;
border:1px solid #ccc;
-moz-box-shadow:#555 2px 2px 8px;
-webkit-box-shadow:#555 2px 2px 8px;
-o-box-shadow:#555 2px 2px 8px;
box-shadow:#555 2px 2px 8px;
opacity:0.9;
filter:alpha(opacity=90);
font-size:10px;
font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
padding:7px;
}
38 changes: 38 additions & 0 deletions WebServer/AfisareaEntitatilor/example1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ForceDirected - Force Directed Static Graph</title>

<!-- CSS Files -->
<link type="text/css" href="css/base.css" rel="stylesheet" />
<link type="text/css" href="css/ForceDirected.css" rel="stylesheet" />

<!--[if IE]><script language="javascript" type="text/javascript" src="../../Extras/excanvas.js"></script><![endif]-->

<!-- JIT Library File -->
<script language="javascript" type="text/javascript" src="js/jit.js"></script>

<!-- Example File -->
<script language="javascript" type="text/javascript" src="js/example1.js"></script>
</head>

<body onload="init();">
<div id="container">



<div id="center-container">
<div id="infovis"></div>
</div>

<div id="right-container">

<div id="inner-details"></div>

</div>

<div id="log"></div>
</div>
</body>
</html>
104 changes: 104 additions & 0 deletions WebServer/AfisareaEntitatilor/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<html>
<head>
<title>Parsing XML in Javascript</title>
<!-- CSS Files -->
<link type="text/css" href="css/base.css" rel="stylesheet" />
<link type="text/css" href="css/ForceDirected.css" rel="stylesheet" />

<!--[if IE]><script language="javascript" type="text/javascript" src="../../Extras/excanvas.js"></script><![endif]-->

<!-- JIT Library File -->
<script language="javascript" type="text/javascript" src="js/jit.js"></script>

<!-- Example File -->
<script language="javascript" type="text/javascript" src="js/example1.js"></script>
<script type="text/javascript">
var xmlpath = "http://localhost/iuliana/myxml1.xml"

// AICI TREBUIE SCHIMBATA CALEA
//var xmlpath = "file:///D:/lucru/iuliana/graph_js/myxml1.xml";
var json= new Array();
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", xmlpath, false);
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
xmlhttp.send("");
xmlDoc = xmlhttp.responseXML;
readXML();

function WriteLine(input)
{
document.write(input + "<br>");
}

function f()
{
WriteLine("Merge");
}

function readXML() {

var persons = new Array();
for(var i = 0 ; i < xmlDoc.documentElement.childNodes.length ; i++)
{ var b = true;
var person1 = xmlDoc.documentElement.childNodes[i].attributes[0].nodeValue;
for (var k =0; k< persons.length; k++) {
if (person1 == persons[k]) {
b = false;
}
}
if (b) {
persons[persons.length] = person1;
var adjacencies = new Array();

for(var j = 0 ; j < xmlDoc.documentElement.childNodes.length ; j++){
var person1Aux = xmlDoc.documentElement.childNodes[j].attributes[0].nodeValue;

if ( person1 == person1Aux ) {
var person2 = xmlDoc.documentElement.childNodes[j].attributes[1].nodeValue;
var rel = xmlDoc.documentElement.childNodes[j].attributes[2].nodeValue;
adjacencies[adjacencies.length] = { "nodeTo": person2,
"nodeFrom": person1,
"data": {"$color": "#557EAA",
"relation": rel }};
}
}

json[json.length] = {"adjacencies" : adjacencies,
"data": {
"$color": "#416D9C",
"$type": "square",
"$dim": 10
},
"id": person1,
"name": person1};
}
//var person1 = xmlDoc.documentElement.childNodes[i].attributes[0].nodeValue;
//var person2 = xmlDoc.documentElement.childNodes[i].attributes[1].nodeValue;
//var relationship = xmlDoc.documentElement.childNodes[i].attributes[2].nodeValue;
//WriteLine(person1 + " and " + person2 + " are " + relationship);
}
}
//document.body.onload = function() { init(json); }
</script>


</head>
<body onload=" init(json)">
<div id="container">



<div id="center-container">
<div id="infovis"></div>
</div>

<div id="right-container">

<div id="inner-details"></div>

</div>

<div id="log"></div>
</div>
</body>
</html>
Loading

0 comments on commit c450cf7

Please sign in to comment.