From e876941eaa6cf5adf0e028d0f3f9402284ea5de2 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Mon, 2 Apr 2012 10:39:12 -0700 Subject: Setting up document rework --- js/document/controllers/base-controller.js | 32 ------------------------------ js/document/controllers/document.js | 24 ++++++++++++++++++++++ js/document/document-html.js | 24 ++++++++++++++++++++++ js/document/document-text.js | 24 ++++++++++++++++++++++ js/document/mediators/base-mediator.js | 32 ------------------------------ js/document/mediators/io.js | 24 ++++++++++++++++++++++ js/document/mediators/template.js | 24 ++++++++++++++++++++++ js/document/models/base-model.js | 32 ------------------------------ js/document/models/html.js | 25 +++++++++++++++++++++++ js/document/models/text.js | 24 ++++++++++++++++++++++ js/document/views/base-view.js | 32 ------------------------------ js/document/views/base.js | 24 ++++++++++++++++++++++ js/document/views/code.js | 25 +++++++++++++++++++++++ js/document/views/design.js | 25 +++++++++++++++++++++++ 14 files changed, 243 insertions(+), 128 deletions(-) delete mode 100755 js/document/controllers/base-controller.js create mode 100755 js/document/controllers/document.js create mode 100755 js/document/document-html.js create mode 100755 js/document/document-text.js delete mode 100755 js/document/mediators/base-mediator.js create mode 100755 js/document/mediators/io.js create mode 100755 js/document/mediators/template.js delete mode 100755 js/document/models/base-model.js create mode 100755 js/document/models/html.js create mode 100755 js/document/models/text.js delete mode 100755 js/document/views/base-view.js create mode 100755 js/document/views/base.js create mode 100755 js/document/views/code.js create mode 100755 js/document/views/design.js (limited to 'js/document') diff --git a/js/document/controllers/base-controller.js b/js/document/controllers/base-controller.js deleted file mode 100755 index be441da2..00000000 --- a/js/document/controllers/base-controller.js +++ /dev/null @@ -1,32 +0,0 @@ -/* -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. -
*/ - -//////////////////////////////////////////////////////////////////////// -// -var Montage = require("montage/core/core").Montage, - Component = require("montage/ui/component").Component; -//////////////////////////////////////////////////////////////////////// -// -exports.ENTERNAME = Montage.create(Montage, { - //////////////////////////////////////////////////////////////////// - // - hasTemplate: { - enumerable: false, - value: false - }, - //////////////////////////////////////////////////////////////////// - // - deserializedFromTemplate: { - enumerable: false, - value: function () { - // - } - } - //////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////// -}); -//////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/js/document/controllers/document.js b/js/document/controllers/document.js new file mode 100755 index 00000000..45377b76 --- /dev/null +++ b/js/document/controllers/document.js @@ -0,0 +1,24 @@ +/* +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. +
*/ + +//////////////////////////////////////////////////////////////////////// +// +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component; +//////////////////////////////////////////////////////////////////////// +// +exports.DocumentController = Montage.create(Component, { + //////////////////////////////////////////////////////////////////// + // + hasTemplate: { + enumerable: false, + value: false + } + //////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////// +}); +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/js/document/document-html.js b/js/document/document-html.js new file mode 100755 index 00000000..b48e004a --- /dev/null +++ b/js/document/document-html.js @@ -0,0 +1,24 @@ +/* +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. +
*/ + +//////////////////////////////////////////////////////////////////////// +// +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component; +//////////////////////////////////////////////////////////////////////// +// +exports.HtmlDocument = Montage.create(Component, { + //////////////////////////////////////////////////////////////////// + // + hasTemplate: { + enumerable: false, + value: false + } + //////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////// +}); +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/js/document/document-text.js b/js/document/document-text.js new file mode 100755 index 00000000..2a469144 --- /dev/null +++ b/js/document/document-text.js @@ -0,0 +1,24 @@ +/* +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. +
*/ + +//////////////////////////////////////////////////////////////////////// +// +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component; +//////////////////////////////////////////////////////////////////////// +// +exports.TextDocument = Montage.create(Component, { + //////////////////////////////////////////////////////////////////// + // + hasTemplate: { + enumerable: false, + value: false + } + //////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////// +}); +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/js/document/mediators/base-mediator.js b/js/document/mediators/base-mediator.js deleted file mode 100755 index be441da2..00000000 --- a/js/document/mediators/base-mediator.js +++ /dev/null @@ -1,32 +0,0 @@ -/* -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. -
*/ - -//////////////////////////////////////////////////////////////////////// -// -var Montage = require("montage/core/core").Montage, - Component = require("montage/ui/component").Component; -//////////////////////////////////////////////////////////////////////// -// -exports.ENTERNAME = Montage.create(Montage, { - //////////////////////////////////////////////////////////////////// - // - hasTemplate: { - enumerable: false, - value: false - }, - //////////////////////////////////////////////////////////////////// - // - deserializedFromTemplate: { - enumerable: false, - value: function () { - // - } - } - //////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////// -}); -//////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/js/document/mediators/io.js b/js/document/mediators/io.js new file mode 100755 index 00000000..972a25e2 --- /dev/null +++ b/js/document/mediators/io.js @@ -0,0 +1,24 @@ +/* +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. +
*/ + +//////////////////////////////////////////////////////////////////////// +// +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component; +//////////////////////////////////////////////////////////////////////// +// +exports.IoDocumentMediator = Montage.create(Component, { + //////////////////////////////////////////////////////////////////// + // + hasTemplate: { + enumerable: false, + value: false + } + //////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////// +}); +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/js/document/mediators/template.js b/js/document/mediators/template.js new file mode 100755 index 00000000..c5b45ba1 --- /dev/null +++ b/js/document/mediators/template.js @@ -0,0 +1,24 @@ +/* +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. +
*/ + +//////////////////////////////////////////////////////////////////////// +// +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component; +//////////////////////////////////////////////////////////////////////// +// +exports.TemplateDocumentMediator = Montage.create(Component, { + //////////////////////////////////////////////////////////////////// + // + hasTemplate: { + enumerable: false, + value: false + } + //////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////// +}); +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/js/document/models/base-model.js b/js/document/models/base-model.js deleted file mode 100755 index be441da2..00000000 --- a/js/document/models/base-model.js +++ /dev/null @@ -1,32 +0,0 @@ -/* -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. -
*/ - -//////////////////////////////////////////////////////////////////////// -// -var Montage = require("montage/core/core").Montage, - Component = require("montage/ui/component").Component; -//////////////////////////////////////////////////////////////////////// -// -exports.ENTERNAME = Montage.create(Montage, { - //////////////////////////////////////////////////////////////////// - // - hasTemplate: { - enumerable: false, - value: false - }, - //////////////////////////////////////////////////////////////////// - // - deserializedFromTemplate: { - enumerable: false, - value: function () { - // - } - } - //////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////// -}); -//////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/js/document/models/html.js b/js/document/models/html.js new file mode 100755 index 00000000..0ac09f3b --- /dev/null +++ b/js/document/models/html.js @@ -0,0 +1,25 @@ +/* +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. +
*/ + +//////////////////////////////////////////////////////////////////////// +// +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component, + TextDocumentModel = require("js/document/models/text").TextDocumentModel; +//////////////////////////////////////////////////////////////////////// +// +exports.HtmlDocumentModel = Montage.create(TextDocumentModel, { + //////////////////////////////////////////////////////////////////// + // + hasTemplate: { + enumerable: false, + value: false + } + //////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////// +}); +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/js/document/models/text.js b/js/document/models/text.js new file mode 100755 index 00000000..c8fba911 --- /dev/null +++ b/js/document/models/text.js @@ -0,0 +1,24 @@ +/* +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. +
*/ + +//////////////////////////////////////////////////////////////////////// +// +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component; +//////////////////////////////////////////////////////////////////////// +// +exports.TextDocumentModel = Montage.create(Component, { + //////////////////////////////////////////////////////////////////// + // + hasTemplate: { + enumerable: false, + value: false + } + //////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////// +}); +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/js/document/views/base-view.js b/js/document/views/base-view.js deleted file mode 100755 index be441da2..00000000 --- a/js/document/views/base-view.js +++ /dev/null @@ -1,32 +0,0 @@ -/* -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. -
*/ - -//////////////////////////////////////////////////////////////////////// -// -var Montage = require("montage/core/core").Montage, - Component = require("montage/ui/component").Component; -//////////////////////////////////////////////////////////////////////// -// -exports.ENTERNAME = Montage.create(Montage, { - //////////////////////////////////////////////////////////////////// - // - hasTemplate: { - enumerable: false, - value: false - }, - //////////////////////////////////////////////////////////////////// - // - deserializedFromTemplate: { - enumerable: false, - value: function () { - // - } - } - //////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////// -}); -//////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/js/document/views/base.js b/js/document/views/base.js new file mode 100755 index 00000000..50c0a78d --- /dev/null +++ b/js/document/views/base.js @@ -0,0 +1,24 @@ +/* +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. +
*/ + +//////////////////////////////////////////////////////////////////////// +// +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component; +//////////////////////////////////////////////////////////////////////// +// +exports.BaseDocumentView = Montage.create(Component, { + //////////////////////////////////////////////////////////////////// + // + hasTemplate: { + enumerable: false, + value: false + } + //////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////// +}); +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/js/document/views/code.js b/js/document/views/code.js new file mode 100755 index 00000000..cd3e02d4 --- /dev/null +++ b/js/document/views/code.js @@ -0,0 +1,25 @@ +/* +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. +
*/ + +//////////////////////////////////////////////////////////////////////// +// +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component, + BaseDocumentView = require("js/document/views/base").BaseDocumentView; +//////////////////////////////////////////////////////////////////////// +// +exports.CodeDocumentView = Montage.create(BaseDocumentView, { + //////////////////////////////////////////////////////////////////// + // + hasTemplate: { + enumerable: false, + value: false + } + //////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////// +}); +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/js/document/views/design.js b/js/document/views/design.js new file mode 100755 index 00000000..84871257 --- /dev/null +++ b/js/document/views/design.js @@ -0,0 +1,25 @@ +/* +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. +
*/ + +//////////////////////////////////////////////////////////////////////// +// +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component, + CodeDocumentView = require("js/document/views/code").CodeDocumentView; +//////////////////////////////////////////////////////////////////////// +// +exports.DesignDocumentView = Montage.create(CodeDocumentView, { + //////////////////////////////////////////////////////////////////// + // + hasTemplate: { + enumerable: false, + value: false + } + //////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////// +}); +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// \ No newline at end of file -- cgit v1.2.3 From bc04ee998de7aaadc457f4e932cc4be8327a2a03 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Wed, 4 Apr 2012 11:35:12 -0700 Subject: Backup for merge --- js/document/controllers/document.js | 21 ++++++++++++++++++++ js/document/models/base.js | 38 +++++++++++++++++++++++++++++++++++++ js/document/models/html.js | 1 - js/document/models/text.js | 4 ++-- 4 files changed, 61 insertions(+), 3 deletions(-) create mode 100755 js/document/models/base.js (limited to 'js/document') diff --git a/js/document/controllers/document.js b/js/document/controllers/document.js index 45377b76..f7260957 100755 --- a/js/document/controllers/document.js +++ b/js/document/controllers/document.js @@ -16,6 +16,27 @@ exports.DocumentController = Montage.create(Component, { hasTemplate: { enumerable: false, value: false + } + //////////////////////////////////////////////////////////////////// + // + save: { + value: function () { + // + } + }, + //////////////////////////////////////////////////////////////////// + // + saveAs: { + value: function () { + // + } + }, + //////////////////////////////////////////////////////////////////// + // + close: { + value: function () { + // + } } //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/js/document/models/base.js b/js/document/models/base.js new file mode 100755 index 00000000..96156e64 --- /dev/null +++ b/js/document/models/base.js @@ -0,0 +1,38 @@ +/* +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. +
*/ + +//////////////////////////////////////////////////////////////////////// +// +var Montage = require("montage/core/core").Montage; +//////////////////////////////////////////////////////////////////////// +// +exports.BaseDocumentModel = Montage.create(Montage, { + //////////////////////////////////////////////////////////////////// + // + hasTemplate: { + enumerable: false, + value: false + }, + //////////////////////////////////////////////////////////////////// + // + file: { + value: null + }, + //////////////////////////////////////////////////////////////////// + // + njdata: { + value: null + }, + //////////////////////////////////////////////////////////////////// + // + views: { + value: null + } + //////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////// +}); +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/js/document/models/html.js b/js/document/models/html.js index 0ac09f3b..5882d389 100755 --- a/js/document/models/html.js +++ b/js/document/models/html.js @@ -7,7 +7,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot //////////////////////////////////////////////////////////////////////// // var Montage = require("montage/core/core").Montage, - Component = require("montage/ui/component").Component, TextDocumentModel = require("js/document/models/text").TextDocumentModel; //////////////////////////////////////////////////////////////////////// // diff --git a/js/document/models/text.js b/js/document/models/text.js index c8fba911..ebf9993e 100755 --- a/js/document/models/text.js +++ b/js/document/models/text.js @@ -7,10 +7,10 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot //////////////////////////////////////////////////////////////////////// // var Montage = require("montage/core/core").Montage, - Component = require("montage/ui/component").Component; + BaseDocumentModel = require("js/document/models/text").BaseDocumentModel; //////////////////////////////////////////////////////////////////////// // -exports.TextDocumentModel = Montage.create(Component, { +exports.TextDocumentModel = Montage.create(BaseDocumentModel, { //////////////////////////////////////////////////////////////////// // hasTemplate: { -- cgit v1.2.3