From ce8fdcdb864c552d0d18c0fb5a1b03bc36522b43 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Tue, 1 May 2012 15:41:08 -0700 Subject: Fixing bindings to new model --- js/components/layout/documents-tab.reel/documents-tab.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/documents-tab.reel/documents-tab.html b/js/components/layout/documents-tab.reel/documents-tab.html index 1516a8ce..a2070471 100755 --- a/js/components/layout/documents-tab.reel/documents-tab.html +++ b/js/components/layout/documents-tab.reel/documents-tab.html @@ -33,17 +33,17 @@ }, "name": { "boundObject": {"@": "repetition1"}, - "boundObjectPropertyPath": "objectAtCurrentIteration.name", + "boundObjectPropertyPath": "objectAtCurrentIteration.model.file.name", "oneway": true }, "saveFlag": { "boundObject": {"@": "repetition1"}, - "boundObjectPropertyPath": "objectAtCurrentIteration.needsSave", + "boundObjectPropertyPath": "objectAtCurrentIteration.model.needsSave", "oneway": true }, "active": { "boundObject": {"@": "repetition1"}, - "boundObjectPropertyPath": "objectAtCurrentIteration.isActive", + "boundObjectPropertyPath": "objectAtCurrentIteration.model.isActive", "oneway": true } } -- cgit v1.2.3 From 29ad6355ef60cfb3b3fc7f780504f3ed30845883 Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Mon, 7 May 2012 14:30:47 -0700 Subject: More implementation of moving color chips to the individual subtools. Removed the tool color bar Added new icons for inkbottle Removed Pencil tool Removed Inkbottle tool Added chips to the pen, brush and tag tools Aligned controls in several subtools --- js/components/layout/tools-list.reel/tools-list.html | 10 ---------- js/components/layout/tools-list.reel/tools-list.js | 4 ---- .../layout/tools-properties.reel/tools-properties.html | 16 ---------------- 3 files changed, 30 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html index acee20b2..f559e748 100755 --- a/js/components/layout/tools-list.reel/tools-list.html +++ b/js/components/layout/tools-list.reel/tools-list.html @@ -85,9 +85,6 @@ "LineTool1": { "prototype": "js/tools/LineTool" }, - "PencilTool1": { - "prototype": "js/tools/PencilTool" - }, "BrushTool1": { "prototype": "js/tools/BrushTool" }, @@ -97,9 +94,6 @@ "InkBottleTool1": { "prototype": "js/tools/InkBottleTool" }, - "EyedropperTool1": { - "prototype": "js/tools/EyedropperTool" - }, "EraserTool1": { "prototype": "js/tools/EraserTool" }, @@ -142,11 +136,9 @@ "OvalTool": {"@": "OvalTool1"}, "RectTool": {"@": "RectTool1"}, "LineTool": {"@": "LineTool1"}, - "PencilTool": {"@": "PencilTool1"}, "BrushTool": {"@": "BrushTool1"}, "FillTool": {"@": "FillTool1"}, "InkBottleTool": {"@": "InkBottleTool1"}, - "EyedropperTool": {"@": "EyedropperTool1"}, "EraserTool": {"@": "EraserTool1"}, "RotateStageTool3D": {"@": "RotateStageTool3D1"}, "PanTool": {"@": "PanTool1"}, @@ -169,8 +161,6 @@
- -
diff --git a/js/components/layout/tools-list.reel/tools-list.js b/js/components/layout/tools-list.reel/tools-list.js index d68e8a56..ed4ee45f 100755 --- a/js/components/layout/tools-list.reel/tools-list.js +++ b/js/components/layout/tools-list.reel/tools-list.js @@ -20,11 +20,9 @@ exports.ToolsList = Montage.create(Component, { OvalTool: { value: null }, RectTool: { value: null }, LineTool: { value: null }, - PencilTool: { value: null }, BrushTool: { value: null }, FillTool: { value: null }, InkBottleTool: { value: null }, - EyedropperTool: { value: null }, EraserTool: { value: null }, RotateStageTool3D: { value: null }, PanTool: { value: null }, @@ -68,10 +66,8 @@ exports.ToolsList = Montage.create(Component, { this.OvalTool.options = this.application.ninja.toolsProperties.shapeProperties.ovalProperties; this.RectTool.options = this.application.ninja.toolsProperties.shapeProperties.rectProperties; this.LineTool.options = this.application.ninja.toolsProperties.shapeProperties.lineProperties; - this.PencilTool.options = this.application.ninja.toolsProperties.pencilProperties; this.BrushTool.options = this.application.ninja.toolsProperties.brushProperties; - this.EyedropperTool.options = this.application.ninja.toolsProperties.eyedropperProperties; this.EraserTool.options = this.application.ninja.toolsProperties.eraserProperties; this.RotateStageTool3D.options = this.application.ninja.toolsProperties.rotateStageProperties; this.PanTool.options = this.application.ninja.toolsProperties.panProperties; diff --git a/js/components/layout/tools-properties.reel/tools-properties.html b/js/components/layout/tools-properties.reel/tools-properties.html index 8dd0f713..c51ab27d 100755 --- a/js/components/layout/tools-properties.reel/tools-properties.html +++ b/js/components/layout/tools-properties.reel/tools-properties.html @@ -66,12 +66,6 @@ } } }, - "pencilProperties1": { - "prototype": "js/components/tools-properties/pencil-properties.reel", - "properties": { - "element": {"#": "pencilProperties"} - } - }, "brushProperties1": { "prototype": "js/components/tools-properties/brush-properties.reel", "properties": { @@ -90,12 +84,6 @@ "element": {"#": "inkbottleProperties"} } }, - "eyedropperProperties1": { - "prototype": "js/components/tools-properties/eyedropper-properties.reel", - "properties": { - "element": {"#": "eyedropperProperties"} - } - }, "eraserProperties1": { "prototype": "js/components/tools-properties/eraser-properties.reel", "properties": { @@ -147,11 +135,9 @@ "penProperties": {"@": "penProperties1"}, "textProperties": {"@": "textProperties1"}, "shapeProperties": {"@": "shapeProperties1"}, - "pencilProperties": {"@": "pencilProperties1"}, "brushProperties": {"@": "brushProperties1"}, "fillProperties": {"@": "fillProperties1"}, "inkbottleProperties": {"@": "inkbottleProperties1"}, - "eyedropperProperties": {"@": "eyedropperProperties1"}, "eraserProperties": {"@": "eraserProperties1"}, "rotateStageProperties": {"@": "rotateStageProperties1"}, "panProperties": {"@": "panProperties1"}, @@ -179,11 +165,9 @@
-
-
-- cgit v1.2.3 From dd663d8fe9191cc57c9cebe6d425562cb45982c2 Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Tue, 8 May 2012 07:25:09 -0700 Subject: Removed unused SubSelect Tool --- js/components/layout/tools-list.reel/tools-list.html | 4 ---- js/components/layout/tools-list.reel/tools-list.js | 2 -- js/components/layout/tools-properties.reel/tools-properties.html | 8 -------- 3 files changed, 14 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html index 0c51aa9a..d5c33624 100755 --- a/js/components/layout/tools-list.reel/tools-list.html +++ b/js/components/layout/tools-list.reel/tools-list.html @@ -55,9 +55,6 @@ "SelectionTool1": { "prototype": "js/tools/SelectionTool" }, - "SubselectionTool1": { - "prototype": "js/tools/SubSelectTool" - }, "Rotate3DTool1": { "prototype": "js/tools/RotateObject3DTool" }, @@ -126,7 +123,6 @@ "properties": { "element": {"#": "toolsList"}, "SelectionTool": {"@": "SelectionTool1"}, - "SubselectionTool": {"@": "SubselectionTool1"}, "Rotate3DTool": {"@": "Rotate3DTool1"}, "Translate3DTool": {"@": "Translate3DTool1"}, "TagTool": {"@": "TagTool1"}, diff --git a/js/components/layout/tools-list.reel/tools-list.js b/js/components/layout/tools-list.reel/tools-list.js index ed4ee45f..a10b6c3e 100755 --- a/js/components/layout/tools-list.reel/tools-list.js +++ b/js/components/layout/tools-list.reel/tools-list.js @@ -10,7 +10,6 @@ var Component = require("montage/ui/component").Component; exports.ToolsList = Montage.create(Component, { SelectionTool: { value: null }, - SubselectionTool: { value: null }, Rotate3DTool: { value: null }, Translate3DTool: { value: null }, TagTool: { value: null }, @@ -51,7 +50,6 @@ exports.ToolsList = Montage.create(Component, { this.PenTool.options = this.application.ninja.toolsProperties.shapeProperties.lineProperties;//this.application.Ninja.toolsProperties.penProperties; this.SelectionTool.options = this.application.ninja.toolsProperties.selectionProperties; - this.SubselectionTool.options = this.application.ninja.toolsProperties.subSelectionProperties; this.Rotate3DTool.options = this.application.ninja.toolsProperties.rotate3DProperties; this.Translate3DTool.options = this.application.ninja.toolsProperties.rotate3DProperties; diff --git a/js/components/layout/tools-properties.reel/tools-properties.html b/js/components/layout/tools-properties.reel/tools-properties.html index a24ce658..e7d1ac8b 100755 --- a/js/components/layout/tools-properties.reel/tools-properties.html +++ b/js/components/layout/tools-properties.reel/tools-properties.html @@ -18,12 +18,6 @@ "element": {"#": "selectionProperties"} } }, - "subSelectionProperties1": { - "prototype": "js/components/tools-properties/subselection-properties.reel[SubSelectionProperties]", - "properties": { - "element": {"#": "subSelectionProperties"} - } - }, "object3DProperties1": { "prototype": "js/components/tools-properties/object3d-properties.reel[Object3DProperties]", "properties": { @@ -128,7 +122,6 @@ "properties": { "element": {"#": "toolsProperties"}, "selectionProperties": {"@": "selectionProperties1"}, - "subSelectionProperties": {"@": "subSelectionProperties1"}, "rotate3DProperties": {"@": "object3DProperties1"}, "translate3DProperties": {"@": "object3DProperties1"}, "tagProperties": {"@": "tagProperties1"}, @@ -159,7 +152,6 @@
-
-- cgit v1.2.3 From f6f722feecf88c8afe59327eaf8557ce4012abc7 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 10 May 2012 22:40:02 -0700 Subject: Fixing the dirty document flag. Disabling the stylesheets dirty flag because === true on document open. Signed-off-by: Valerio Virgillito --- .../layout/documents-tab.reel/documents-tab.html | 24 ++++------------------ 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/documents-tab.reel/documents-tab.html b/js/components/layout/documents-tab.reel/documents-tab.html index cf3dbbf5..304c8871 100755 --- a/js/components/layout/documents-tab.reel/documents-tab.html +++ b/js/components/layout/documents-tab.reel/documents-tab.html @@ -26,26 +26,10 @@ "element": {"#": "document"} }, "bindings": { - "document": { - "boundObject": {"@": "repetition1"}, - "boundObjectPropertyPath": "objectAtCurrentIteration", - "oneway": true - }, - "name": { - "boundObject": {"@": "repetition1"}, - "boundObjectPropertyPath": "objectAtCurrentIteration.model.file.name", - "oneway": true - }, - "saveFlag": { - "boundObject": {"@": "repetition1"}, - "boundObjectPropertyPath": "objectAtCurrentIteration.model.needsSave", - "oneway": true - }, - "active": { - "boundObject": {"@": "repetition1"}, - "boundObjectPropertyPath": "objectAtCurrentIteration.model.isActive", - "oneway": true - } + "document": {"<-": "@repetition1.objectAtCurrentIteration"}, + "name": {"<-": "@repetition1.objectAtCurrentIteration.model.file.name"}, + "saveFlag": {"<-": "@repetition1.objectAtCurrentIteration.model.needsSave"}, + "active": {"<-": "@repetition1.objectAtCurrentIteration.model.isActive"} } }, -- cgit v1.2.3 From ba5b8238784a41099d0eb76795de2a7e5abde226 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 14 May 2012 13:44:27 -0700 Subject: code cleanup Signed-off-by: Valerio Virgillito --- js/components/layout/document-entry.reel/document-entry.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 9e4110e2..81a63c90 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -7,8 +7,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot var Montage = require("montage/core/core").Montage; var Component = require("montage/ui/component").Component; -//var documentManagerModule = ("js/document/documentManager"); - exports.DocumentEntry = Montage.create(Component, { dirty: { value: null }, -- cgit v1.2.3 From 919a0d0ed35c24b1047281723ddde2ac98fc9a3e Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 15 May 2012 22:36:44 -0700 Subject: document close handler. initial working draft Signed-off-by: Valerio Virgillito --- js/components/layout/document-entry.reel/document-entry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components/layout') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 81a63c90..4d09a362 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -117,7 +117,7 @@ exports.DocumentEntry = Montage.create(Component, { handleClick: { value: function(event) { if(event._event.target.nodeName === "IMG") { - this.application.ninja.documentController.closeDocument(this._uuid); + this.application.ninja.documentController.closeFile(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } else { if(!this._document.isActive) { this.application.ninja.stage.stageView.switchDocument(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); -- cgit v1.2.3 From 2c9ed2068b12884fc026fe3a7b57021e7e591f1c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 16 May 2012 16:04:22 -0700 Subject: fixing a null value for the document entry bar Signed-off-by: Valerio Virgillito --- js/components/layout/document-entry.reel/document-entry.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 4d09a362..ad0236c6 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -33,8 +33,10 @@ exports.DocumentEntry = Montage.create(Component, { } this._document = value; - this._uuid = value.uuid; - //this.needsDraw = true; + + if(value) { + this._uuid = value.uuid; + } } }, -- cgit v1.2.3 From b97570f5daff9d0c40f274c2c29a457079da1c1a Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 17 May 2012 12:23:31 -0700 Subject: fixing the breadcrumb Signed-off-by: Valerio Virgillito --- .../layout/bread-crumb.reel/bread-crumb.html | 37 ++++++++-------------- .../layout/bread-crumb.reel/bread-crumb.js | 24 ++++---------- 2 files changed, 19 insertions(+), 42 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.html b/js/components/layout/bread-crumb.reel/bread-crumb.html index ae3e2022..0dabc781 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.html +++ b/js/components/layout/bread-crumb.reel/bread-crumb.html @@ -32,30 +32,23 @@ } ], "bindings": { - "label": { - "boundObject": {"@": "repetition1"}, - "boundObjectPropertyPath": "objectAtCurrentIteration.label", - "oneway": true - }, - "value": { - "boundObject": {"@": "repetition1"}, - "boundObjectPropertyPath": "objectAtCurrentIteration.nodeUuid", - "oneway": true - } + "label": {"<-": "@buttonsList.objectAtCurrentIteration.label"}, + "value": {"<-": "@buttonsList.objectAtCurrentIteration.nodeUuid"} + } + }, + + "buttonsListController": { + "prototype": "montage/ui/controller/array-controller", + "bindings": { + "content": {"<<->": "@owner.containerElements"} } }, - "repetition1": { + "buttonsList": { "prototype": "montage/ui/repetition.reel", "properties": { - "element": {"#": "breadcrumb_container"} - }, - "bindings": { - "objects": { - "boundObject": {"@": "owner"}, - "boundObjectPropertyPath": "containerElements", - "oneway": true - } + "element": {"#": "breadcrumb_container"}, + "contentController": {"@": "buttonsListController"} } }, @@ -65,11 +58,7 @@ "element": {"#": "disabledCondition"} }, "bindings": { - "condition": { - "boundObject": {"@": "owner"}, - "boundObjectPropertyPath": "disabled", - "oneway": true - } + "condition": {"<-": "@owner.disabled"} } } } diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index c1b021a3..d2a6b1e4 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js @@ -60,30 +60,18 @@ exports.Breadcrumb = Montage.create(Component, { value: function() { var parentNode; - this.containerElements.length = 0; +// delete this.containerElements; + this.containerElements = []; parentNode = this.container; - // This is for the old template support. - // TODO: Remove marker for old template: NINJA-STAGE-REWORK - if(this.application.ninja.currentDocument.documentRoot.id === "UserContent") { - while(parentNode.id !== "UserContent") { - this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); - parentNode = parentNode.parentNode; - } - - // This is always the top container which is now hardcoded to body - this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": "Body"}); - } else { - while(parentNode !== this.application.ninja.currentDocument.documentRoot) { - this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); - parentNode = parentNode.parentNode; - } - - // This is always the top container which is now hardcoded to body + while(parentNode !== this.application.ninja.currentDocument.documentRoot) { this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); + parentNode = parentNode.parentNode; } + // This is always the top container which is now hardcoded to body + this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); } }, -- cgit v1.2.3 From 7a94696e19b14e15261df516e2ba75e693b1313d Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 18 May 2012 00:21:56 -0700 Subject: enabling basic document switching Signed-off-by: Valerio Virgillito --- js/components/layout/document-entry.reel/document-entry.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index ad0236c6..50b3624c 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -121,8 +121,8 @@ exports.DocumentEntry = Montage.create(Component, { if(event._event.target.nodeName === "IMG") { this.application.ninja.documentController.closeFile(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } else { - if(!this._document.isActive) { - this.application.ninja.stage.stageView.switchDocument(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); + if(!this.active) { + this.application.ninja.documentController.switchDocuments(this.application.ninja.currentDocument, this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } } } -- cgit v1.2.3 From 8247cddcc7ddce25a6282e97d304cad9a0f0c4f3 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 18 May 2012 01:06:31 -0700 Subject: fixed the shape subtool not refreshing the icon Signed-off-by: Valerio Virgillito --- js/components/layout/tool-button.reel/tool-button.html | 4 ++++ js/components/layout/tool-button.reel/tool-button.js | 11 ----------- js/components/layout/tools-list.reel/tools-list.html | 12 ++---------- 3 files changed, 6 insertions(+), 21 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/tool-button.reel/tool-button.html b/js/components/layout/tool-button.reel/tool-button.html index 84a6d34e..a329f646 100755 --- a/js/components/layout/tool-button.reel/tool-button.html +++ b/js/components/layout/tool-button.reel/tool-button.html @@ -16,6 +16,10 @@ "prototype": "js/components/layout/tool-button.reel", "properties": { "element": {"#": "toolBarButton"} + }, + "bindings": { + "selected": {"<<->": "@owner.data.selected"}, + "subselected": {"<-": "@owner.data.subtools.selected"} } } } diff --git a/js/components/layout/tool-button.reel/tool-button.js b/js/components/layout/tool-button.reel/tool-button.js index 6cea0dc3..6008c4ec 100755 --- a/js/components/layout/tool-button.reel/tool-button.js +++ b/js/components/layout/tool-button.reel/tool-button.js @@ -48,19 +48,8 @@ exports.ToolButton = Montage.create(Component, { this.element.addEventListener("mousedown", this, false); this.element.addEventListener("dblclick", this, false); - Object.defineBinding(this, "selected", { - boundObject: this.data, - boundObjectPropertyPath: "selected", - oneway: false - }); - if(this.data.container) { this.element.title = this.data.subtools[this._subselected].toolTip; - Object.defineBinding(this, "subselected", { - boundObject: this.data.subtools, - boundObjectPropertyPath: "selected", - oneway: true - }); } this.element.classList.add(this.data.id) diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html index d5c33624..df603bf8 100755 --- a/js/components/layout/tools-list.reel/tools-list.html +++ b/js/components/layout/tools-list.reel/tools-list.html @@ -16,11 +16,7 @@ "element": {"#": "toolbutton"} }, "bindings": { - "data": { - "boundObject": {"@": "repetition1"}, - "boundObjectPropertyPath": "objectAtCurrentIteration", - "oneway": true - } + "data": {"<-": "@repetition1.objectAtCurrentIteration"} } }, @@ -30,11 +26,7 @@ "element": {"#": "groupLine"} }, "bindings": { - "condition": { - "boundObject": {"@": "repetition1"}, - "boundObjectPropertyPath": "objectAtCurrentIteration.lastInGroup", - "oneway": true - } + "condition": {"<-": "@repetition1.objectAtCurrentIteration.lastInGroup"} } }, -- cgit v1.2.3 From 2cc8e58f6bb9f64a7473e62aecd013fa55167231 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Mon, 21 May 2012 16:42:26 -0700 Subject: - added opening multiple code and design view documents - switching between multiple code and design view documents - Note: closing of documents, when multiple documents are open, is not yet implemented Signed-off-by: Ananya Sen --- js/components/layout/document-entry.reel/document-entry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components/layout') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 50b3624c..24c7737c 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -122,7 +122,7 @@ exports.DocumentEntry = Montage.create(Component, { this.application.ninja.documentController.closeFile(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } else { if(!this.active) { - this.application.ninja.documentController.switchDocuments(this.application.ninja.currentDocument, this.application.ninja.documentController._findDocumentByUUID(this._uuid)); + this.application.ninja.documentController.switchDocuments(this.application.ninja.documentController.activeDocument, this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } } } -- cgit v1.2.3 From 9b6da637d9654727426c6d78f17e3804bbd84ce5 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 22 May 2012 14:42:43 -0700 Subject: fixing a few document switching issues. Signed-off-by: Valerio Virgillito --- js/components/layout/document-entry.reel/document-entry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components/layout') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 24c7737c..50b3624c 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -122,7 +122,7 @@ exports.DocumentEntry = Montage.create(Component, { this.application.ninja.documentController.closeFile(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } else { if(!this.active) { - this.application.ninja.documentController.switchDocuments(this.application.ninja.documentController.activeDocument, this.application.ninja.documentController._findDocumentByUUID(this._uuid)); + this.application.ninja.documentController.switchDocuments(this.application.ninja.currentDocument, this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } } } -- cgit v1.2.3 From 0ca1910df1c78116139664bf39a95cf0ec7c8dc8 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 23 May 2012 15:35:15 -0700 Subject: adding document views checks for the timeline and breadcrumb Signed-off-by: Valerio Virgillito --- js/components/layout/bread-crumb.reel/bread-crumb.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components/layout') diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index d2a6b1e4..aaefd923 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js @@ -21,7 +21,7 @@ exports.Breadcrumb = Montage.create(Component, { handleCloseDocument: { value: function(){ - if(!this.application.ninja.documentController.activeDocument) { + if(!this.application.ninja.documentController.activeDocument && this.application.ninja.currentDocument.currentView !== "code") { this.disabled = true; this.application.ninja.currentSelectedContainer = (this.application.ninja.currentDocument ? this.application.ninja.currentDocument.documentRoot : null); } -- cgit v1.2.3 From 5914c5b2209c4b8daac4249bb76cda5c9314c4e6 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 24 May 2012 00:07:23 -0700 Subject: Cleaning up referencing to 'documentRoot' and '_document' Moved to reference new model in DOM architecture rework. This should not affect anything, just moving the references, and also the setting to the render methods in the design view. --- js/components/layout/bread-crumb.reel/bread-crumb.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index d2a6b1e4..2db775eb 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js @@ -23,7 +23,7 @@ exports.Breadcrumb = Montage.create(Component, { value: function(){ if(!this.application.ninja.documentController.activeDocument) { this.disabled = true; - this.application.ninja.currentSelectedContainer = (this.application.ninja.currentDocument ? this.application.ninja.currentDocument.documentRoot : null); + this.application.ninja.currentSelectedContainer = (this.application.ninja.currentDocument ? this.application.ninja.currentDocument.model.documentRoot : null); } } }, @@ -65,7 +65,7 @@ exports.Breadcrumb = Montage.create(Component, { parentNode = this.container; - while(parentNode !== this.application.ninja.currentDocument.documentRoot) { + while(parentNode !== this.application.ninja.currentDocument.model.documentRoot) { this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); parentNode = parentNode.parentNode; } -- cgit v1.2.3