diff options
Diffstat (limited to 'js')
63 files changed, 2534 insertions, 1708 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 ac131f2c..260922b3 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js | |||
@@ -51,22 +51,6 @@ exports.Breadcrumb = Montage.create(Component, { | |||
51 | } | 51 | } |
52 | }, | 52 | }, |
53 | 53 | ||
54 | _container:{ | ||
55 | value:null | ||
56 | }, | ||
57 | |||
58 | container: { | ||
59 | set: function(value) { | ||
60 | if(this._container !== value) { | ||
61 | this._container = value; | ||
62 | this.createContainerElements(); | ||
63 | } | ||
64 | }, | ||
65 | get: function() { | ||
66 | return this._container; | ||
67 | } | ||
68 | }, | ||
69 | |||
70 | containerElements: { | 54 | containerElements: { |
71 | value: [] | 55 | value: [] |
72 | }, | 56 | }, |
@@ -74,31 +58,37 @@ exports.Breadcrumb = Montage.create(Component, { | |||
74 | prepareForDraw: { | 58 | prepareForDraw: { |
75 | value: function() { | 59 | value: function() { |
76 | this.breadcrumbBt.addEventListener("action", this, false); | 60 | this.breadcrumbBt.addEventListener("action", this, false); |
61 | this.addPropertyChangeListener("currentDocument.model.domContainer", this) | ||
77 | } | 62 | } |
78 | }, | 63 | }, |
79 | 64 | ||
80 | createContainerElements: { | 65 | handleChange: { |
81 | value: function() { | 66 | value: function() { |
82 | var parentNode; | 67 | if(this.currentDocument && this.currentDocument.model.getProperty("domContainer")) { |
68 | this.createContainerElements(this.currentDocument.model.getProperty("domContainer")); | ||
69 | } | ||
70 | } | ||
71 | }, | ||
72 | |||
73 | createContainerElements: { | ||
74 | value: function(container) { | ||
83 | 75 | ||
84 | // delete this.containerElements; | 76 | // delete this.containerElements; |
85 | this.containerElements = []; | 77 | this.containerElements = []; |
86 | 78 | ||
87 | parentNode = this.container; | 79 | while(container !== this.currentDocument.model.documentRoot) { |
88 | 80 | this.containerElements.unshift({"node": container, "nodeUuid":container.uuid, "label": container.nodeName}); | |
89 | while(parentNode !== this.currentDocument.model.documentRoot) { | 81 | container = container.parentNode; |
90 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); | ||
91 | parentNode = parentNode.parentNode; | ||
92 | } | 82 | } |
93 | 83 | ||
94 | // This is always the top container which is now hardcoded to body |