aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels')
-rw-r--r--js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js28
1 files changed, 27 insertions, 1 deletions
diff --git a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
index d9decd2c..51822150 100644
--- a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
+++ b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
@@ -43,17 +43,34 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component
43 didCreate: { 43 didCreate: {
44 value: function() { 44 value: function() {
45 this._loadComponents(); 45 this._loadComponents();
46
47// var req = new XMLHttpRequest();
48// req.identifier = "searchRequest";
49// req.open("GET", url);
50// req.addEventListener("load", this, false);
51// req.addEventListener("error", this, false);
52// req.send();
53
46 } 54 }
47 }, 55 },
48 56
49 _loadComponents: { 57 _loadComponents: {
50 value: function() { 58 value: function() {
51 this.components = [ 59 this.components = [
52 {name: "Button", data: "montage/ui/button.reel/button.json"} 60 {name: "Button", data: "node_modules/components-data/button.json"},
61 {name: "Textfield", data: "node_modules/components-data/textfield.json"}
53 ]; 62 ];
54 63
55 // Build the PI objects for each component 64 // Build the PI objects for each component
56 for(var i = 0, component; component = this.components[i]; i++) { 65 for(var i = 0, component; component = this.components[i]; i++) {
66 var req = new XMLHttpRequest();
67 //req.identifier = "searchRequest";
68 req.open("GET", component.data);
69 req.addEventListener("load", this, false);
70 req.addEventListener("error", this, false);
71 req.send();
72
73/*
57 var piIdentifier = component.name + "Pi"; 74 var piIdentifier = component.name + "Pi";
58 var piObj = []; 75 var piObj = [];
59 var section = {}; 76 var section = {};
@@ -75,12 +92,21 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component
75 92
76 PIData[piIdentifier] = []; 93 PIData[piIdentifier] = [];
77 PIData[piIdentifier].push(section); 94 PIData[piIdentifier].push(section);
95 */
78 96
79 } 97 }
80 98
81 } 99 }
82 }, 100 },
83 101
102 handleLoad: {
103 value: function(evt) {
104 var response = JSON.parse(evt.target.responseText);
105 console.log(response);
106
107 }
108 },
109
84 getControlType: { 110 getControlType: {
85 value: function(type) { 111 value: function(type) {
86 switch(type) { 112 switch(type) {