diff options
author | Eric Guzman | 2012-04-23 11:55:55 -0700 |
---|---|---|
committer | Eric Guzman | 2012-04-23 11:55:55 -0700 |
commit | cdd1189e349e2974681e2c451e861e5b0db570e4 (patch) | |
tree | d8823c3d050e011032c563d20c1a5f61e67ae740 /node_modules | |
parent | c0fce534c255ef1e25779e2f0e8de95bb4e160cf (diff) | |
parent | 5a0331fc26fcc2cdc6200086109e34440a2dec6a (diff) | |
download | ninja-cdd1189e349e2974681e2c451e861e5b0db570e4.tar.gz |
Merge branch 'refs/heads/master' into CSSPanelUpdates
Diffstat (limited to 'node_modules')
72 files changed, 6981 insertions, 2736 deletions
diff --git a/node_modules/components-data/textarea.json b/node_modules/components-data/textarea.json index 8e780954..0dd7714e 100644 --- a/node_modules/components-data/textarea.json +++ b/node_modules/components-data/textarea.json | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | "module": "montage/ui/textarea.reel", | 4 | "module": "montage/ui/textarea.reel", |
5 | 5 | ||
6 | "name": "TextArea", | 6 | "name": "Textarea", |
7 | 7 | ||
8 | "properties": [ | 8 | "properties": [ |
9 | 9 | ||
diff --git a/node_modules/montage/core/deserializer.js b/node_modules/montage/core/deserializer.js index 7e812235..b8ed5618 100755 --- a/node_modules/montage/core/deserializer.js +++ b/node_modules/montage/core/deserializer.js | |||
@@ -98,6 +98,26 @@ var Deserializer = Montage.create(Montage, /** @lends module:montage/core/deseri | |||
98 | }}, | 98 | }}, |
99 | 99 | ||
100 | /** | 100 | /** |
101 | Initializes the deserializer with a string | ||
102 | @param {String|Object} serialization A string or JSON-style object | ||
103 | describing the serialized objects. | ||
104 | @param {Function} require The module loader for the containing package. | ||
105 | @param {String} origin Usually a file name. | ||
106 | */ | ||
107 | init: { | ||
108 | value: function (serialization, require, origin) { | ||
109 | if (typeof serialization !== "string") { | ||
110 | serialization = JSON.stringify(serialization); | ||
111 | } | ||
112 | this._reset(); | ||
113 | this._serializationString = serialization; | ||
114 | this._require = require; | ||
115 | this._origin = origin; | ||
116 | return this; | ||
117 | } | ||
118 | }, | ||
119 | |||
120 | /** | ||
101 | Initializes the deserializer with a string of serialized objects. | 121 | Initializes the deserializer with a string of serialized objects. |
102 | @function | 122 | @function |
103 | @param {String} string A string of serialized objects. | 123 | @param {String} string A string of serialized objects. |
@@ -122,6 +142,14 @@ var Deserializer = Montage.create(Montage, /** @lends module:montage/core/deseri | |||
122 | return this; | 142 | return this; |
123 | }}, | 143 | }}, |
124 | 144 | ||
145 | initWithObjectAndRequire: {value: function(string, require, origin) { | ||
146 | this._reset(); | ||
147 | this._serializationString = JSON.stringify(object); | ||
148 | this._require = require; | ||
149 | this._origin = origin; | ||
150 | return this; | ||
151 | }}, | ||
152 | |||
125 | /** | 153 | /** |
126 | Initializes the deserializer object with a serialization string and the require object used to load the modules containing the object's prototypes. | 154 | Initializes the deserializer object with a serialization string and the require object used to load the modules containing the object's prototypes. |
127 | @function | 155 | @function |
@@ -168,8 +196,37 @@ var Deserializer = Montage.create(Montage, /** @lends module:montage/core/deseri | |||
168 | 196 | ||
169 | return objectsArray; | 197 | return objectsArray; |
170 | }}, | 198 | }}, |
199 | |||
200 | chainDeserializer: { | ||
201 | value: function(deserializer) { | ||
202 | var chainedSerializations = this._chainedSerializations, | ||
203 | optimizedIds, chainedOptimizedIds; | ||
204 | |||
205 | if (!chainedSerializations) { | ||
206 | this._chainedSerializations = chainedSerializations = []; | ||
207 | } | ||
208 | |||
209 | chainedSerializations.push({ | ||
210 | string: deserializer._serializationString, | ||
211 | compiledFunction: deserializer._compiledDeserializationFunction, | ||
212 | compiledFunctionString: deserializer._compiledDeserializationFunctionString | ||
213 | }); | ||
214 | |||
215 | // need to copy the optimized ids too, ideally all chained templates are optimized for the same document | ||
216 | chainedOptimizedIds = deserializer._optimizedIds; | ||
217 | if (chainedOptimizedIds) { | ||
218 | if (!optimizedIds) { | ||
219 | this._optimizedIds = optimizedIds = {}; | ||
220 | } | ||
221 | for (var id in chainedOptimizedIds) { | ||
222 | optimizedIds[id] = chainedOptimizedIds[id]; | ||
223 | } | ||