From 3a754133dbc138390503341fd2e9beba3e43aa4b Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 27 Jan 2012 12:05:17 -0800 Subject: Merged old FileIO --- js/stage/layout.js | 0 js/stage/stage-deps.js | 0 js/stage/stage-view.reel/stage-view.css | 36 +++++++++++++++ js/stage/stage-view.reel/stage-view.html | 31 +++++++++++++ js/stage/stage-view.reel/stage-view.js | 77 ++++++++++++++++++++++++++++++++ js/stage/stage.reel/stage.css | 0 js/stage/stage.reel/stage.html | 14 ++++-- js/stage/stage.reel/stage.js | 0 js/stage/tool-handle.js | 0 9 files changed, 155 insertions(+), 3 deletions(-) mode change 100644 => 100755 js/stage/layout.js mode change 100644 => 100755 js/stage/stage-deps.js create mode 100755 js/stage/stage-view.reel/stage-view.css create mode 100755 js/stage/stage-view.reel/stage-view.html create mode 100755 js/stage/stage-view.reel/stage-view.js mode change 100644 => 100755 js/stage/stage.reel/stage.css mode change 100644 => 100755 js/stage/stage.reel/stage.html mode change 100644 => 100755 js/stage/stage.reel/stage.js mode change 100644 => 100755 js/stage/tool-handle.js (limited to 'js/stage') diff --git a/js/stage/layout.js b/js/stage/layout.js old mode 100644 new mode 100755 diff --git a/js/stage/stage-deps.js b/js/stage/stage-deps.js old mode 100644 new mode 100755 diff --git a/js/stage/stage-view.reel/stage-view.css b/js/stage/stage-view.reel/stage-view.css new file mode 100755 index 00000000..f15f74a0 --- /dev/null +++ b/js/stage/stage-view.reel/stage-view.css @@ -0,0 +1,36 @@ +/* + This file contains proprietary software owned by Motorola Mobility, Inc.
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ + +.codeViewContainer { + position: absolute; + top: 0px; + left: 0px; + margin: 0px; + padding: 0px; + background: black; + width: 100%; + height: 100%; + /*display: none;*/ +} + +/* OLD CSS for reference +#mainContent #codeMirror_1 { + height:100%; +} +*/ + +.CodeMirror { + width: 100%; + height: 100%; + background: white; +} + +.CodeMirror .CodeMirror-scroll { + height: 100%; + overflow: scroll; + overflow-x: auto; + overflow-y: auto; +} diff --git a/js/stage/stage-view.reel/stage-view.html b/js/stage/stage-view.reel/stage-view.html new file mode 100755 index 00000000..ee8fa315 --- /dev/null +++ b/js/stage/stage-view.reel/stage-view.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + + +
+ + + diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js new file mode 100755 index 00000000..63fe88ba --- /dev/null +++ b/js/stage/stage-view.reel/stage-view.js @@ -0,0 +1,77 @@ +/* +This file contains proprietary software owned by Motorola Mobility, Inc.
+No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ + +/** +@requires montage/core/core +@requires montage/ui/component +*/ +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component; + +exports.StageView = Montage.create(Component, { + _documents: { + value : [] + }, + + docs: { + get: function() { + return this._documents; + }, + set: function(value) { + //console.log(value); + } + }, + + templateDidLoad: { + value: function() { + this.eventManager.addEventListener("appLoaded", this, false); + //console.log(this.application.ninja.documentController._documents); + } + }, + + handleAppLoaded: { + value: function() { + + // Don't bind for now + /* + Object.defineBinding(this, "docs", { + boundObject: this.application.ninja.documentController, + boundObjectPropertyPath: "_documents" + }); + */ + + } + }, + + // Temporary function to create a Codemirror text view + createTextView: { + value: function(doc) { +// DocumentManager._hideCurrentDocument(); + + this.application.ninja.currentDocument.container.parentNode.style["display"] = "none"; + +// stageManagerModule.stageManager._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe +// DocumentManager.activeDocument = doc; + + this.element.appendChild(doc.textArea); + + + var codeM = CodeMirror.fromTextArea(doc.textArea, { + lineNumbers: true, + mode: "javascript" +// onCursorActivity: function() { +// DocumentManager._codeEditor.editor.setLineClass(DocumentManager._codeEditor.hline, null); +// DocumentManager._codeEditor.hline = DocumentManager._codeEditor.editor.setLineClass(DocumentManager._codeEditor.editor.getCursor().line, "activeline"); +// } + }); + +// DocumentManager._codeEditor.hline = DocumentManager._codeEditor.editor.setLineClass(0, "activeline"); + + this.application.ninja.stage.hideCanvas(true); + + } + } +}); \ No newline at end of file diff --git a/js/stage/stage.reel/stage.css b/js/stage/stage.reel/stage.css old mode 100644 new mode 100755 diff --git a/js/stage/stage.reel/stage.html b/js/stage/stage.reel/stage.html old mode 100644 new mode 100755 index 49d10baf..f28d9800 --- a/js/stage/stage.reel/stage.html +++ b/js/stage/stage.reel/stage.html @@ -11,6 +11,14 @@