diff options
author | Valerio Virgillito | 2012-07-09 14:35:44 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-07-09 14:35:44 -0700 |
commit | 84b3327bd92faafab7954b5eb64c7abe24a3fe13 (patch) | |
tree | 3f56cbed2f08c5a81ea79eaf0bcb9bd031d8a627 /js/document | |
parent | c0a42c56f768a873ba637f5b86d5f6a84d4a3312 (diff) | |
parent | 40c6eb2c06b34f65a74d59ef9687251952858bab (diff) | |
download | ninja-84b3327bd92faafab7954b5eb64c7abe24a3fe13.tar.gz |
Merge branch 'normalize' of https://github.com/kriskowal/ninja-internal
Conflicts:
js/components/gradientpicker.reel/gradientpicker.js
js/components/tools-properties/text-properties.reel/text-properties.js
js/document/views/base.js
js/document/views/design.js
js/helper-classes/3D/StageLine.js
js/helper-classes/3D/draw-utils.js
js/lib/drawing/world.js
js/lib/geom/circle.js
js/lib/geom/line.js
js/lib/geom/rectangle.js
js/lib/geom/shape-primitive.js
js/lib/rdge/materials/bump-metal-material.js
js/lib/rdge/materials/flag-material.js
js/lib/rdge/materials/fly-material.js
js/lib/rdge/materials/julia-material.js
js/lib/rdge/materials/keleidoscope-material.js
js/lib/rdge/materials/mandel-material.js
js/lib/rdge/materials/material.js
js/lib/rdge/materials/plasma-material.js
js/lib/rdge/materials/pulse-material.js
js/lib/rdge/materials/radial-gradient-material.js
js/lib/rdge/materials/taper-material.js
js/lib/rdge/materials/twist-vert-material.js
js/lib/rdge/materials/water-material.js
js/panels/Materials/materials-library-panel.reel/materials-library-panel.html
js/panels/Materials/materials-library-panel.reel/materials-library-panel.js
js/panels/Materials/materials-popup.reel/materials-popup.html
js/panels/Materials/materials-popup.reel/materials-popup.js
js/tools/LineTool.js
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/document')
-rwxr-xr-x | js/document/controllers/document.js | 36 | ||||
-rwxr-xr-x | js/document/document-html.js | 136 | ||||
-rwxr-xr-x | js/document/document-text.js | 38 | ||||
-rwxr-xr-x | js/document/helpers/url-parser.js | 118 | ||||
-rwxr-xr-x | js/document/helpers/webgl-helper.js | 318 | ||||
-rwxr-xr-x | js/document/mediators/io.js | 18 | ||||
-rwxr-xr-x | js/document/mediators/template.js | 620 | ||||
-rwxr-xr-x | js/document/models/base.js | 448 | ||||
-rwxr-xr-x | js/document/models/html.js | 46 | ||||
-rwxr-xr-x | js/document/models/text.js | 62 | ||||
-rw-r--r-- | js/document/templates/app/main.js | 10 | ||||
-rwxr-xr-x | js/document/templates/banner/index.html | 136 | ||||
-rwxr-xr-x | js/document/templates/html/index.html | 80 | ||||
-rwxr-xr-x | js/document/templates/preview/banner.html | 100 | ||||
-rwxr-xr-x | js/document/views/base.js | 72 | ||||
-rwxr-xr-x | js/document/views/code.js | 18 | ||||
-rwxr-xr-x | js/document/views/design.js | 644 |
17 files changed, 1450 insertions, 1450 deletions
diff --git a/js/document/controllers/document.js b/js/document/controllers/document.js index 1b1e1b85..d897934a 100755 --- a/js/document/controllers/document.js +++ b/js/document/controllers/document.js | |||
@@ -30,40 +30,40 @@ POSSIBILITY OF SUCH DAMAGE. | |||
30 | 30 | ||
31 | //////////////////////////////////////////////////////////////////////// | 31 | //////////////////////////////////////////////////////////////////////// |
32 | // | 32 | // |
33 | var Montage = require("montage/core/core").Montage, | 33 | var Montage = require("montage/core/core").Montage, |
34 | Component = require("montage/ui/component").Component; | 34 | Component = require("montage/ui/component").Component; |
35 | //////////////////////////////////////////////////////////////////////// | 35 | //////////////////////////////////////////////////////////////////////// |
36 | // | 36 | // |
37 | exports.DocumentController = Montage.create(Component, { | 37 | exports.DocumentController = Montage.create(Component, { |
38 | //////////////////////////////////////////////////////////////////// | 38 | //////////////////////////////////////////////////////////////////// |
39 | // | 39 | // |
40 | hasTemplate: { | 40 | hasTemplate: { |
41 | enumerable: false, | 41 | enumerable: false, |
42 | value: false | 42 | value: false |
43 | }, | 43 | }, |
44 | //////////////////////////////////////////////////////////////////// | 44 | //////////////////////////////////////////////////////////////////// |
45 | // | 45 | // |
46 | save: { | 46 | save: { |
47 | value: function () { | 47 | value: function () { |
48 | // | 48 | // |
49 | } | 49 | } |
50 | }, | 50 | }, |
51 | //////////////////////////////////////////////////////////////////// | 51 | //////////////////////////////////////////////////////////////////// |
52 | // | 52 | // |
53 | saveAs: { | 53 | saveAs: { |
54 | value: function () { | 54 | value: function () { |
55 | // | 55 | // |
56 | } | 56 | } |
57 | }, | 57 | }, |
58 | //////////////////////////////////////////////////////////////////// | 58 | //////////////////////////////////////////////////////////////////// |
59 | // | 59 | // |
60 | close: { | 60 | close: { |
61 | value: function () { | 61 | value: function () { |
62 | // | 62 | // |
63 | } | 63 | } |
64 | } | 64 | } |
65 | //////////////////////////////////////////////////////////////////// | 65 | //////////////////////////////////////////////////////////////////// |
66 | //////////////////////////////////////////////////////////////////// | 66 | //////////////////////////////////////////////////////////////////// |
67 | }); | 67 | }); |
68 | //////////////////////////////////////////////////////////////////////// | 68 | //////////////////////////////////////////////////////////////////////// |
69 | //////////////////////////////////////////////////////////////////////// | 69 | //////////////////////////////////////////////////////////////////////// |
diff --git a/js/document/document-html.js b/js/document/document-html.js index 566e5078..1ebdd28a 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js | |||
@@ -30,40 +30,40 @@ POSSIBILITY OF SUCH DAMAGE. | |||
30 | 30 | ||
31 | //////////////////////////////////////////////////////////////////////// | 31 | //////////////////////////////////////////////////////////////////////// |
32 | // | 32 | // |
33 | var Montage = require("montage/core/core").Montage, | 33 | var Montage = require("montage/core/core").Montage, |
34 | Component = require("montage/ui/component").Component, | 34 | Component = require("montage/ui/component").Component, |
35 | HtmlDocumentModel = require("js/document/models/html").HtmlDocumentModel, | 35 | HtmlDocumentModel = require("js/document/models/html").HtmlDocumentModel, |
36 | DesignDocumentView = require("js/document/views/design").DesignDocumentView; | 36 | DesignDocumentView = require("js/document/views/design").DesignDocumentView; |
37 | //////////////////////////////////////////////////////////////////////// | 37 | //////////////////////////////////////////////////////////////////////// |
38 | // | 38 | // |
39 | exports.HtmlDocument = Montage.create(Component, { | 39 | exports.HtmlDocument = Montage.create(Component, { |
40 | //////////////////////////////////////////////////////////////////// | 40 | //////////////////////////////////////////////////////////////////// |
41 | // | 41 | // |
42 | hasTemplate: { | 42 | hasTemplate: { |
43 | value: false | 43 | value: false |
44 | }, | 44 | }, |
45 | //////////////////////////////////////////////////////////////////// | 45 | //////////////////////////////////////////////////////////////////// |
46 | // | 46 | // |
47 | model: { | 47 | model: { |
48 | value: null | 48 | value: null |
49 | }, | 49 | }, |
50 | //////////////////////////////////////////////////////////////////// | 50 | //////////////////////////////////////////////////////////////////// |
51 | // | 51 | // |
52 | loaded: { | 52 | loaded: { |
53 | value: {callback: null, context: null} | 53 | value: {callback: null, context: null} |
54 | }, | 54 | }, |
55 | //////////////////////////////////////////////////////////////////// | 55 | //////////////////////////////////////////////////////////////////// |
56 | // | 56 | // |
57 | _observer: { | 57 | _observer: { |
58 | value: null | 58 | value: null |
59 | }, | 59 | }, |
60 | //////////////////////////////////////////////////////////////////// | 60 | //////////////////////////////////////////////////////////////////// |
61 | // | 61 | // |
62 | exclusionList: { | 62 | exclusionList: { |
63 | value: ["HTML", "BODY", "NINJA-CONTENT", "NINJA-VIEWPORT"] | 63 | value: ["HTML", "BODY", "NINJA-CONTENT", "NINJA-VIEWPORT"] |
64 | }, | 64 | }, |
65 | //////////////////////////////////////////////////////////////////// | 65 | //////////////////////////////////////////////////////////////////// |
66 | // | 66 | // |
67 | inExclusion: { | 67 | inExclusion: { |
68 | value: function(element) { | 68 | value: function(element) { |
69 | if(this.exclusionList.indexOf(element.nodeName) === -1) { | 69 | if(this.exclusionList.indexOf(element.nodeName) === -1) { |
@@ -72,62 +72,62 @@ exports.HtmlDocument = Montage.create(Component, { | |||
72 | return 1; | 72 | return 1; |
73 | } | 73 | } |
74 | }, | 74 | }, |
75 | //////////////////////////////////////////////////////////////////// | 75 | //////////////////////////////////////////////////////////////////// |
76 | // | 76 | // |
77 | init: { | 77 | init: { |
78 | value:function(file, context, callback, view, template) { | 78 | value:function(file, context, callback, view, template) { |
79 | //Storing callback data for loaded dispatch | 79 | //Storing callback data for loaded dispatch |
80 | this.loaded.callback = callback; | 80 | this.loaded.callback = callback; |
81 | this.loaded.context = context; | 81 | this.loaded.context = context; |
82 | //Creating instance of HTML Document Model | 82 | //Creating instance of HTML Document Model |
83 | this.model = Montage.create(HtmlDocumentModel,{ | 83 | this.model = Montage.create(HtmlDocumentModel,{ |
84 | file: {value: file}, | 84 | file: {value: file}, |
85 | fileTemplate: {value: template}, | 85 | fileTemplate: {value: template}, |
86 | parentContainer: {value: document.getElementById("iframeContainer")}, //Saving reference to parent container of all views (should be changed to buckets approach | 86 | parentContainer: {value: document.getElementById("iframeContainer")}, //Saving reference to parent container of all views (should be changed to buckets approach |
87 | views: {value: {'design': DesignDocumentView.create(), 'code': null}} //TODO: Add code view logic | 87 | views: {value: {'design': DesignDocumentView.create(), 'code': null}} //TODO: Add code view logic |
88 | }); | 88 | }); |
89 | //Calling the any init routines in the model | 89 | //Calling the any init routines in the model |
90 | this.model.init(); | 90 | this.model.init(); |
91 | //Initiliazing views and hiding | 91 | //Initiliazing views and hiding |
92 | if (this.model.views.design.initialize(this.model.parentContainer)) { | 92 | if (this.model.views.design.initialize(this.model.parentContainer)) { |
93 | //Hiding iFrame, just initiliazing | 93 | //Hiding iFrame, just initiliazing |
94 | this.model.views.design.hide(); | 94 | this.model.views.design.hide(); |
95 | //Setting the iFrame property for reference in helper class | 95 | //Setting the iFrame property for reference in helper class |
96 | this.model.webGlHelper.iframe = this.model.views.design.iframe; | 96 | this.model.webGlHelper.iframe = this.model.views.design.iframe; |
97 | } else { | 97 | } else { |
98 | //ERROR: Design View not initialized | 98 | //ERROR: Design View not initialized |
99 | } | 99 | } |
100 | // | 100 | // |
101 | if (view === 'design') { | 101 | if (view === 'design') { |
102 | //TODO: Remove reference and use as part of model | 102 | //TODO: Remove reference and use as part of model |
103 | this.currentView = 'design'; | 103 | this.currentView = 'design'; |
104 | //Setting current view object to design | 104 | //Setting current view object to design |
105 | this.model.currentView = this.model.views.design; | 105 | this.model.currentView = this.model.views.design; |
106 | //Showing design iFrame | 106 | //Showing design iFrame |
107 | this.model.views.design.show(); | 107 | this.model.views.design.show(); |
108 | this.model.views.design.iframe.style.opacity = 0; | 108 | this.model.views.design.iframe.style.opacity = 0; |
109 | this.model.views.design.content = this.model.file.content; | 109 | this.model.views.design.content = this.model.file.content; |
110 | //TODO: Improve reference (probably through binding values) | 110 | //TODO: Improve reference (probably through binding values) |
111 | this.model.views.design._webGlHelper = this.model.webGlHelper; | 111 |