diff options
Diffstat (limited to 'js')
56 files changed, 2117 insertions, 1431 deletions
diff --git a/js/components/converter/string-units-converter.js b/js/components/converter/string-units-converter.js index 6b97d5c5..9f6e4112 100644 --- a/js/components/converter/string-units-converter.js +++ b/js/components/converter/string-units-converter.js | |||
@@ -9,7 +9,6 @@ var Montage = require("montage").Montage, | |||
9 | 9 | ||
10 | exports.StringUnitsConverter = Montage.create(Converter, { | 10 | exports.StringUnitsConverter = Montage.create(Converter, { |
11 | 11 | ||
12 | // convert fahrenheit to celsius (showing our non-metric heritage here) | ||
13 | convert: { | 12 | convert: { |
14 | value: function(value) { | 13 | value: function(value) { |
15 | if(value) { | 14 | if(value) { |
@@ -20,7 +19,6 @@ exports.StringUnitsConverter = Montage.create(Converter, { | |||
20 | } | 19 | } |
21 | }, | 20 | }, |
22 | 21 | ||
23 | // revert celsius to fahrenheit | ||
24 | revert: { | 22 | revert: { |
25 | value: function(value) { | 23 | value: function(value) { |
26 | console.log("revert string to unit ", value); | 24 | console.log("revert string to unit ", value); |
diff --git a/js/components/converter/string-value-converter.js b/js/components/converter/string-value-converter.js index 28d7dd29..f397f731 100644 --- a/js/components/converter/string-value-converter.js +++ b/js/components/converter/string-value-converter.js | |||
@@ -9,7 +9,6 @@ var Montage = require("montage").Montage, | |||
9 | 9 | ||
10 | exports.StringValueConverter = Montage.create(Converter, { | 10 | exports.StringValueConverter = Montage.create(Converter, { |
11 | 11 | ||
12 | // convert fahrenheit to celsius (showing our non-metric heritage here) | ||
13 | convert: { | 12 | convert: { |
14 | value: function(value) { | 13 | value: function(value) { |
15 | console.log(value); | 14 | console.log(value); |
@@ -18,7 +17,6 @@ exports.StringValueConverter = Montage.create(Converter, { | |||
18 | } | 17 | } |
19 | }, | 18 | }, |
20 | 19 | ||
21 | // revert celsius to fahrenheit | ||
22 | revert: { | 20 | revert: { |
23 | value: function(value) { | 21 | value: function(value) { |
24 | console.log("revert string to value ", value); | 22 | console.log("revert string to value ", value); |
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index d525c813..2f493102 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js | |||
@@ -56,22 +56,6 @@ exports.Breadcrumb = Montage.create(Component, { | |||
56 | } | 56 | } |
57 | }, | 57 | }, |
58 | 58 | ||
59 | _container:{ | ||
60 | value:null | ||
61 | }, | ||
62 | |||
63 | container: { | ||
64 | set: function(value) { | ||
65 | if(this._container !== value) { | ||
66 | this._container = value; | ||
67 | this.createContainerElements(); | ||
68 | } | ||
69 | }, | ||
70 | get: function() { | ||
71 | return this._container; | ||
72 | } | ||
73 | }, | ||
74 | |||
75 | containerElements: { | 59 | containerElements: { |
76 | value: [] | 60 | value: [] |
77 | }, | 61 | }, |
@@ -79,31 +63,37 @@ exports.Breadcrumb = Montage.create(Component, { | |||
79 | prepareForDraw: { | 63 | prepareForDraw: { |
80 | value: function() { | 64 | value: function() { |
81 | this.breadcrumbBt.addEventListener("action", this, false); | 65 | this.breadcrumbBt.addEventListener("action", this, false); |
66 | this.addPropertyChangeListener("currentDocument.model.domContainer", this) | ||
82 | } | 67 | } |
83 | }, | 68 | }, |
84 | 69 | ||
85 | createContainerElements: { | 70 | handleChange: { |
86 | value: function() { | 71 | value: function() { |
87 | var parentNode; | 72 | if(this.currentDocument && this.currentDocument.model.getProperty("domContainer")) { |
73 | this.createContainerElements(this.currentDocument.model.getProperty("domContainer")); | ||
74 | } | ||
75 | } | ||
76 | }, | ||
77 | |||
78 | createContainerElements: { | ||
79 | value: function(container) { | ||
88 | 80 | ||
89 | // delete this.containerElements; | 81 | // delete this.containerElements; |
90 | this.containerElements = []; | 82 | this.containerElements = []; |
91 | 83 | ||
92 | parentNode = this.container; | 84 | while(container !== this.currentDocument.model.documentRoot) { |
93 | 85 | this.containerElements.unshift({"node": container, "nodeUuid":container.uuid, "label": container.nodeName}); | |
94 | while(parentNode !== this.currentDocument.model.documentRoot) { | 86 | container = container.parentNode; |
95 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); | ||
96 | parentNode = parentNode.parentNode; | ||
97 | } | 87 | } |
98 | 88 | ||
99 | // This is always the top container which is now hardcoded to body | 89 | // This is always the top container which is now hardcoded to body |
100 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); | 90 | this.containerElements.unshift({"node": container, "nodeUuid":container.uuid, "label": container.nodeName}); |
101 | } | 91 | } |
102 | }, | 92 | }, |
103 | 93 | ||
104 | handleAction: { | 94 | handleAction: { |