forked from joaool/MotherGithub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_Database.html
72 lines (70 loc) · 2.67 KB
/
test_Database.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<html>
<head>
<!--
<script type="text/javascript" src="Dojo Toolkit/dojo-release-1.7.1/dojo/dojo.js" djconfig="parseOnLoad: true, isDebug: true" >
</script>
<link href="Dojo Toolkit/dojo-release-1.7.1/dijit/themes/claro/claro.css" rel="stylesheet">
-->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Test flDatabase 1.0</title>
<script>
dojoConfig= {
has: {
"dojo-firebug": true
},
parseOnLoad: false,
debugAtAllCosts: true,
foo: "bar",
async: true
};
</script>
<script type="text/javascript" src="../dojo1.9.2/dojo/dojo.js"></script>
<!--<script src="Mother/jquery-1.8.1.min.js"></script> -->
<!--<script src="Mother/bootstrap.js"></script>-->
<link href="../dojo1.9.2/dijit/themes/claro/claro.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="Mother/MotherBuilder.css" />
<!--- For Mother Forms A -BlueHills, B-Simple Green C- Tree D-Chess E-light blue F(A+C)=>(fz,f0)-->
<!--<link rel="stylesheet" type="text/css" href="Mother1/MotherF.css"/> -->
<link rel="stylesheet" type="text/css" href="Mother/Mother.css"/>
<script>
require([
"dojo/parser",
"dojo/_base/kernel",
"dojo/_base/window",
"dojo/_base/lang",
"dojo/_base/event",
"dojo/on",
"dojo/parser",//recomendation from JS
"dojo/dom",
"Mother/flDatabase.js",
"dojo/domReady!"
],
function(parser,kernel,Win,Lang,Event,On,Parser,Dom,Database){
//TEST DESCRIPTION v1:
var db = new Database("nico");//by default a base container (the full screen) is defined
console.log("The name is "+db.name);
// alert("The name is "+db.name);
if(db.loadCSVTable("clients").isOk){
var csv = db.loadCSVTable("clients");
var arrayOfKeys = Object.keys(csv.header);//an array
for(var i = 0; i < arrayOfKeys.length; i++){
//console.log("Header "+i+" - "+arrayOfKeys[i]);
console.log("Header "+i+" - "+csv.header[arrayOfKeys[i]]);
}
// alert("OK LOADING CSV "+Object.keys(csv.header));//alert(Object.keys(obj)); // will output ["a", "b", "c"]
}else{
alert("ERROR LOADING CSV");
}
function test(){
alert("test message in function test - this call is defined in menu object exterior to the class...");
}
//--------------------------------------------------------------------------------------------------------------------------
console.log("--------------------------------------- container done.... -----------------------------------------------");
console.log(document.title+"...... END..");
}//closing of main function
);//closing of require function
</script>
</head>
<body class="claro">
</body>
</html>