aboutsummaryrefslogtreecommitdiff
path: root/js/io/document
diff options
context:
space:
mode:
Diffstat (limited to 'js/io/document')
-rwxr-xr-xjs/io/document/html-document.js38
-rwxr-xr-xjs/io/document/text-document.js2
2 files changed, 12 insertions, 28 deletions
diff --git a/js/io/document/html-document.js b/js/io/document/html-document.js
index 520906ab..ac556c2d 100755
--- a/js/io/document/html-document.js
+++ b/js/io/document/html-document.js
@@ -4,11 +4,14 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. 4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */ 5</copyright> */
6 6
7var Montage = require("montage/core/core").Montage, 7////////////////////////////////////////////////////////////////////////
8 baseDocumentModule = require("js/io/document/base-document"), 8//
9 NJUtils = require("js/lib/NJUtils").NJUtils; 9var Montage = require("montage/core/core").Montage,
10 10 BaseDocument = require("js/io/document/base-document").BaseDocument,
11var HTMLDocument = exports.HTMLDocument = Montage.create(baseDocumentModule.BaseDocument, { 11 NJUtils = require("js/lib/NJUtils").NJUtils;
12////////////////////////////////////////////////////////////////////////
13//
14exports.HTMLDocument = Montage.create(BaseDocument, {
12 // PRIVATE MEMBERS 15 // PRIVATE MEMBERS
13 _selectionExclude: { value: null, enumerable: false }, 16 _selectionExclude: { value: null, enumerable: false },
14 _htmlTemplateUrl: { value: "user-document-templates/montage-application-cloud/index.html", enumerable: false}, 17 _htmlTemplateUrl: { value: "user-document-templates/montage-application-cloud/index.html", enumerable: false},
@@ -477,32 +480,13 @@ var HTMLDocument = exports.HTMLDocument = Montage.create(baseDocumentModule.Base
477 //TODO: Add code view logic and also styles for HTML 480 //TODO: Add code view logic and also styles for HTML
478 if (this.currentView === 'design') { 481 if (this.currentView === 'design') {
479 return {mode: 'html', document: this._userDocument, style: this._styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; 482 return {mode: 'html', document: this._userDocument, style: this._styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML};
480 } else if(this.currentView === "code"){ 483 } else if (this.currentView === "code"){
481 //TODO: Would this get call when we are in code of HTML? 484 //TODO: Would this get call when we are in code of HTML?
485 } else {
486 //Error
482 } 487 }
483 } 488 }
484 } 489 }
485 //////////////////////////////////////////////////////////////////// 490 ////////////////////////////////////////////////////////////////////
486 //////////////////////////////////////////////////////////////////// 491 ////////////////////////////////////////////////////////////////////
487
488
489 /*
490save:{
491 value:function(){
492 try{
493 if(this.currentView === "design"){
494 //generate html and save
495 }else if((this.currentView === "code") && (this.codeViewDocument !== null)){
496 this.codeViewDocument.editor.save();
497 //persist to filesystem
498 }
499 this.dirtyFlag=false;
500 }catch(e){
501 console.log("Error while saving "+this.uri);
502 console.log(e.stack);
503 }
504 }
505 }
506*/
507
508}); \ No newline at end of file 492}); \ No newline at end of file
diff --git a/js/io/document/text-document.js b/js/io/document/text-document.js
index e149c479..87fcc551 100755
--- a/js/io/document/text-document.js
+++ b/js/io/document/text-document.js
@@ -10,7 +10,7 @@ var Montage = require("montage/core/core").Montage,
10 BaseDocument = require("js/io/document/base-document").BaseDocument; 10 BaseDocument = require("js/io/document/base-document").BaseDocument;
11//////////////////////////////////////////////////////////////////////// 11////////////////////////////////////////////////////////////////////////
12// 12//
13var TextDocument = exports.TextDocument = Montage.create(BaseDocument, { 13exports.TextDocument = Montage.create(BaseDocument, {
14 // PRIVATE MEMBERS 14 // PRIVATE MEMBERS
15 _codeEditor: { 15 _codeEditor: {
16 value: { 16 value: {