aboutsummaryrefslogtreecommitdiff
path: root/user-document-templates
diff options
context:
space:
mode:
Diffstat (limited to 'user-document-templates')
-rw-r--r--user-document-templates/montage-application-cloud/main.reel/main.js32
1 files changed, 8 insertions, 24 deletions
diff --git a/user-document-templates/montage-application-cloud/main.reel/main.js b/user-document-templates/montage-application-cloud/main.reel/main.js
index 90262073..b4ed049f 100644
--- a/user-document-templates/montage-application-cloud/main.reel/main.js
+++ b/user-document-templates/montage-application-cloud/main.reel/main.js
@@ -37,36 +37,20 @@ exports.Main = Montage.create(Component, {
37 switch(componentType.type){ 37 switch(componentType.type){
38 case "Button": 38 case "Button":
39 39
40 //var tmpFix = ("montage/ui/button.reel"); 40 var button = require.async(componentType.path)
41 //var str = "montage/ui/button.reel";
42 var stro = componentType.path;
43
44// var button = (stro);
45
46 var button = require.async(stro)
47 .then(function (button) { 41 .then(function (button) {
48 var btIns = button["Button"]; 42 var buttonObj = button["Button"];
43 var btIns = buttonObj.create();
49 44
50 btIns.element = containerElement; 45 btIns.element = containerElement;
51 btIns.deserializedFromTemplate(); 46 btIns.deserializedFromTemplate();
52 47
53 btIns.needsDraw = true; 48 btIns.needsDraw = true;
54 btIns.label = "Button"; 49 btIns.label = "Button";
55 callback(btIns, containerElement); 50 callback(btIns, containerElement);
56 }) 51 })
57 .end(); 52 .end();
58 53
59 /*
60 var buttonInstance = button[componentType.name];
61
62 buttonInstance.element = containerElement;
63 buttonInstance.deserializedFromTemplate();
64
65 buttonInstance.needsDraw = true;
66 buttonInstance.label = "Button";
67
68 return buttonInstance;
69 */
70 break; 54 break;
71 case "Checkbox": 55 case "Checkbox":
72 component = Checkbox.create(); 56 component = Checkbox.create();