aboutsummaryrefslogtreecommitdiff
path: root/node_modules
diff options
context:
space:
mode:
authorValerio Virgillito2012-03-08 13:56:09 -0800
committerValerio Virgillito2012-03-08 13:56:09 -0800
commit22a66cb6e243a3f1c867b62e3942fd2e828019d9 (patch)
tree4b2f8bf0d8306964f35435dac3d1f6592b3dee19 /node_modules
parentcef07085443b7c31e878daaad083b7408c57e104 (diff)
downloadninja-22a66cb6e243a3f1c867b62e3942fd2e828019d9.tar.gz
integrating v0.7 montage into ninja
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'node_modules')
-rwxr-xr-xnode_modules/montage/bin/montage3
-rwxr-xr-xnode_modules/montage/core/core.js20
-rwxr-xr-xnode_modules/montage/core/deserializer.js115
-rwxr-xr-xnode_modules/montage/core/serializer.js45
-rwxr-xr-xnode_modules/montage/montage.js68
-rw-r--r--node_modules/montage/node.js140
-rwxr-xr-xnode_modules/montage/package.json33
-rwxr-xr-xnode_modules/montage/require/browser.js90
-rw-r--r--node_modules/montage/require/node.js49
-rwxr-xr-xnode_modules/montage/require/require.js205
-rwxr-xr-xnode_modules/montage/ui/application.js4
-rw-r--r--node_modules/montage/ui/bluemoon/progress.reel/progress.js20
-rw-r--r--node_modules/montage/ui/check-input.js2
-rw-r--r--node_modules/montage/ui/checkbox.reel/checkbox.js2
-rwxr-xr-xnode_modules/montage/ui/component.js115
-rw-r--r--node_modules/montage/ui/composer/press-composer.js9
-rw-r--r--node_modules/montage/ui/composer/translate-composer.js77
-rwxr-xr-xnode_modules/montage/ui/condition.reel/condition.js24
-rwxr-xr-xnode_modules/montage/ui/controller/array-controller.js8
-rwxr-xr-xnode_modules/montage/ui/list.reel/list.html10
-rwxr-xr-xnode_modules/montage/ui/loader.reel/loader.js6
-rwxr-xr-xnode_modules/montage/ui/loading-panel.reel/loading-panel.css38
-rwxr-xr-xnode_modules/montage/ui/loading-panel.reel/loading-panel.html6
-rw-r--r--node_modules/montage/ui/native-control.js3
-rwxr-xr-xnode_modules/montage/ui/popup/confirm.reel/confirm.js4
-rwxr-xr-xnode_modules/montage/ui/popup/popup.reel/popup.js159
-rwxr-xr-xnode_modules/montage/ui/progress.reel/progress.css51
-rwxr-xr-xnode_modules/montage/ui/progress.reel/progress.html32
-rwxr-xr-xnode_modules/montage/ui/progress.reel/progress.js144
-rwxr-xr-xnode_modules/montage/ui/progress.reel/rule.pngbin956 -> 0 bytes
-rwxr-xr-xnode_modules/montage/ui/progress.reel/scroll.pngbin272 -> 0 bytes
-rwxr-xr-xnode_modules/montage/ui/radio-button.reel/radio-button.js3
-rwxr-xr-xnode_modules/montage/ui/repetition.reel/repetition.js127
-rwxr-xr-xnode_modules/montage/ui/scroll.js820
-rw-r--r--node_modules/montage/ui/scroller.reel/scroller.html1
-rw-r--r--node_modules/montage/ui/scroller.reel/scroller.js36
-rw-r--r--node_modules/montage/ui/select-input.reel/select-input.js115
-rw-r--r--node_modules/montage/ui/skeleton/range-input.reel/range-input.css27
-rw-r--r--node_modules/montage/ui/skeleton/range-input.reel/range-input.html62
-rw-r--r--node_modules/montage/ui/skeleton/range-input.reel/range-input.js234
-rwxr-xr-xnode_modules/montage/ui/slot.reel/slot.js19
-rwxr-xr-xnode_modules/montage/ui/template.js4
-rw-r--r--node_modules/montage/ui/text-input.js16
-rw-r--r--node_modules/montage/ui/textarea.reel/textarea.js2
-rw-r--r--node_modules/montage/ui/toggle-button.reel/toggle-button.js9
-rwxr-xr-xnode_modules/montage/ui/toggle-switch.reel/toggle-switch.css162
-rwxr-xr-xnode_modules/montage/ui/toggle-switch.reel/toggle-switch.html16
-rw-r--r--node_modules/montage/ui/toggle-switch.reel/toggle-switch.js424
48 files changed, 1994 insertions, 1565 deletions
diff --git a/node_modules/montage/bin/montage b/node_modules/montage/bin/montage
new file mode 100755
index 00000000..aaa84003
--- /dev/null
+++ b/node_modules/montage/bin/montage
@@ -0,0 +1,3 @@
1#!/usr/bin/env node
2// --harmony_weakmaps --harmony_proxies
3require("../montage.js").initMontage();
diff --git a/node_modules/montage/core/core.js b/node_modules/montage/core/core.js
index ff94f303..8fcf7977 100755
--- a/node_modules/montage/core/core.js
+++ b/node_modules/montage/core/core.js
@@ -71,14 +71,14 @@ Object.defineProperty(M, "create", {
71 71
72 var newObject = Object.create(typeof aPrototype === "undefined" ? this : aPrototype); 72 var newObject = Object.create(typeof aPrototype === "undefined" ? this : aPrototype);
73 73
74 if (typeof newObject.didCreate === "function") {
75 newObject.didCreate();
76 }
77
78 if (newObject._dependenciesForProperty) { 74 if (newObject._dependenciesForProperty) {
79 newObject._dependencyListeners = {}; 75 newObject._dependencyListeners = {};
80 } 76 }
81 77
78 if (typeof newObject.didCreate === "function") {
79 newObject.didCreate();
80 }
81
82 return newObject; 82 return newObject;
83 } else { 83 } else {
84 var result = Object.create(aPrototype); 84 var result = Object.create(aPrototype);
@@ -713,13 +713,17 @@ if (!Object.seal) {
713 */ 713 */
714Object.defineProperty(M, "callDelegateMethod", { 714Object.defineProperty(M, "callDelegateMethod", {
715 value: function(name) { 715 value: function(name) {
716 var delegate, delegateFunctionName, delegateFunction; 716 var delegate = this.delegate, delegateFunctionName, delegateFunction;
717 if (typeof this.identifier === "string") { 717 if (typeof this.identifier === "string") {
718 delegateFunctionName = this.identifier + name.toCapitalized(); 718 delegateFunctionName = this.identifier + name.toCapitalized();
719 } else { 719 if (delegate && typeof (delegateFunction = delegate[delegateFunctionName]) === "function") {
720 delegateFunctionName = name; 720 // remove first argument
721 Array.prototype.shift.call(arguments);
722 return delegateFunction.apply(delegate, arguments);
723 }
721 } 724 }
722 if ((delegate = this.delegate) && typeof (delegateFunction = delegate[delegateFunctionName]) === "function") { 725
726 if (delegate && typeof (delegateFunction = delegate[name]) === "function") {
723 // remove first argument 727 // remove first argument
724 Array.prototype.shift.call(arguments); 728 Array.prototype.shift.call(arguments);
725 return delegateFunction.apply(delegate, arguments); 729 return delegateFunction.apply(delegate, arguments);
diff --git a/node_modules/montage/core/deserializer.js b/node_modules/montage/core/deserializer.js
index 0abc924b..7e812235 100755
--- a/node_modules/montage/core/deserializer.js
+++ b/node_modules/montage/core/deserializer.js
@@ -18,6 +18,14 @@ var Montage = require("montage").Montage,
18// By rebinding eval to a new name, it loses its ability to 18// By rebinding eval to a new name, it loses its ability to
19// capture the calling scope. 19// capture the calling scope.
20var globalEval = eval; 20var globalEval = eval;
21var canEval = true;
22
23// CSP doesn't let you eval
24try {
25 eval("");
26} catch(ex) {
27 canEval = false;
28}
21 29
22/** 30/**
23 @class module:montage/core/deserializer.Deserializer 31 @class module:montage/core/deserializer.Deserializer
@@ -81,6 +89,7 @@ var Deserializer = Montage.create(Montage, /** @lends module:montage/core/deseri
81 _reset: {value: function() { 89 _reset: {value: function() {
82 this._serializationString = null; 90 this._serializationString = null;
83 this._requiredModuleIds = null; 91 this._requiredModuleIds = null;
92 this._areModulesLoaded = false;
84 this._parseFunction = null; 93 this._parseFunction = null;
85 this._serialization = null; 94 this._serialization = null;
86 this._compiledDeserializationFunction = null; 95 this._compiledDeserializationFunction = null;
@@ -342,7 +351,12 @@ var Deserializer = Montage.create(Montage, /** @lends module:montage/core/deseri
342 this._parseForModules(); 351 this._parseForModules();
343 } 352 }
344 353
345 this._loadModules(this._requiredModuleIds, callback); 354 if (this._requiredModuleIds.length > 0) {
355 this._loadModules(this._requiredModuleIds, callback);
356 } else {
357 this._areModulesLoaded = true;
358 return callback();
359 }
346 }}, 360 }},
347 361
348 /** 362 /**
@@ -356,16 +370,40 @@ var Deserializer = Montage.create(Montage, /** @lends module:montage/core/deseri
356/** 370/**
357 @private 371 @private
358*/ 372*/
373 _findObjectNameRegExp: {
374 value: /([^\/]+?)(\.reel)?$/
375 },
376 _toCamelCaseRegExp: {
377 value: /(?:^|-)([^-])/g
378 },
379 _replaceToCamelCase: {
380 value: function(_, g1) { return g1.toUpperCase() }
381 },
359 _parseForModules: {value: function() { 382 _parseForModules: {value: function() {
360 var serialization = this._serialization, 383 var serialization = this._serialization,
361 moduleIds = this._requiredModuleIds = [], 384 moduleIds = this._requiredModuleIds = [],
362 modules = this._modules; 385 modules = this._modules,
386 desc, moduleId;
363 387
364 for (var label in serialization) { 388 for (var label in serialization) {
365 var desc = serialization[label]; 389 desc = serialization[label];
366 var moduleId = desc.module; 390 moduleId = null;
391
392 if ("module" in desc) {
393 moduleId = desc.module;
394 } else if (name = /*assignment*/(desc.prototype || desc.object)) {
395 objectLocation = name.split("[");
396 moduleId = objectLocation[0];
397 desc.module = moduleId;
398 if (objectLocation.length == 2) {
399 desc.name = objectLocation[1].slice(0, -1);
400 } else {
401 this._findObjectNameRegExp.test(moduleId);
402 desc.name = RegExp.$1.replace(this._toCamelCaseRegExp, this._replaceToCamelCase);
403 }
404 }