aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/components/layout/bread-crumb-button.reel/bread-crumb-button.js35
-rwxr-xr-xjs/components/layout/bread-crumb.reel/bread-crumb.js112
-rwxr-xr-xjs/components/layout/document-entry.reel/document-entry.html1
-rwxr-xr-xjs/components/layout/document-entry.reel/document-entry.js24
-rwxr-xr-xjs/components/layout/documents-tab.reel/documents-tab.html4
-rwxr-xr-xjs/controllers/document-controller.js29
-rwxr-xr-xjs/controllers/elements/element-controller.js3
-rwxr-xr-xjs/controllers/selection-controller.js36
-rwxr-xr-xjs/document/html-document.js74
-rwxr-xr-xjs/document/text-document.js36
-rwxr-xr-xjs/io/ui/file-picker/file-input-field.reel/file-input-field.js21
-rwxr-xr-xjs/io/ui/file-picker/file-picker-controller.js36
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js60
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-workflow-controller.js12
-rwxr-xr-xjs/mediators/element-mediator.js13
-rwxr-xr-xjs/ninja.reel/ninja.html10
-rwxr-xr-xjs/ninja.reel/ninja.js9
-rwxr-xr-xjs/panels/Timeline/TimelinePanel.reel/TimelinePanel.js11
-rwxr-xr-xjs/stage/layout.js29
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.js4
-rwxr-xr-xjs/stage/stage.reel/stage.js48
-rwxr-xr-xjs/tools/SelectionTool.js36
-rwxr-xr-xjs/tools/modifier-tool-base.js3
23 files changed, 294 insertions, 352 deletions
diff --git a/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js b/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js
index 65e5b7c8..3f5b87e1 100755
--- a/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js
+++ b/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js
@@ -7,45 +7,38 @@
7var Montage = require("montage/core/core").Montage; 7var Montage = require("montage/core/core").Montage;
8var Component = require("montage/ui/component").Component; 8var Component = require("montage/ui/component").Component;
9 9
10
11exports.BreadcrumbButton = Montage.create(Component, { 10exports.BreadcrumbButton = Montage.create(Component, {
12 11
13 button: { value: null }, 12 button: {
13 value: null
14 },
14 15
15 data: { value: null }, 16 data: {
17 value: null
18 },
16 19
17 prepareForDraw: { 20 prepareForDraw: {
18 enumerable: false,
19 value: function() { 21 value: function() {
20 this.element.addEventListener("mousedown", this, false); 22 this.element.addEventListener("mousedown", this, false);
21 } 23 }
22 }, 24 },
23 25
24 draw: { 26 draw: {
25 enumerable: false,
26 value: function() { 27 value: function() {
27 28 if(this.data.element.id === "UserContent") {
28 if(this.data.element.id==="UserContent"){ 29 this.button.innerHTML = "Body";
29 30 } else {
30 this.button.innerHTML = "Body"; 31 this.button.innerHTML = this.data.element.nodeName;
31 } 32 }
32
33 else{
34 this.button.innerHTML=this.data.element.nodeName;
35 }
36
37 } 33 }
38 }, 34 },
39 35
40 handleMousedown: { 36 handleMousedown: {
41 value: function(event) { 37 value: function(event) {
42 38
43 if(event.which===1){ 39 //this.data.selected=true;
44 40 NJevent('breadCrumbTrail',this.data);
45 this.data.selected=true; 41 //this.data.selected=false;
46 NJevent('breadCrumbTrail',this.data);
47 this.data.selected=false;
48 }
49 42
50 } 43 }
51 } 44 }
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js
index ead7c764..1290aaac 100755
--- a/js/components/layout/bread-crumb.reel/bread-crumb.js
+++ b/js/components/layout/bread-crumb.reel/bread-crumb.js
@@ -1,6 +1,6 @@
1 1
2var Montage = require("montage/core/core").Montage 2var Montage = require("montage/core/core").Montage,
3var Component = require("montage/ui/component").Component 3 Component = require("montage/ui/component").Component;
4 4
5var Breadcrumb = exports.Breadcrumb = Montage.create(Component, { 5var Breadcrumb = exports.Breadcrumb = Montage.create(Component, {
6 6
@@ -8,15 +8,12 @@ var Breadcrumb = exports.Breadcrumb = Montage.create(Component, {
8 value:null 8 value:null
9 }, 9 },
10 10
11
12 container: { 11 container: {
13 set: function(value) { 12 set: function(value) {
14 if(this._container !== value) { 13 if(this._container !== value) {
15 this._container = value; 14 this._container = value;
16 this.createContainerElements(); 15 this.createContainerElements();
17 } 16 }
18
19
20 }, 17 },
21 get: function() { 18 get: function() {
22 return this._container; 19 return this._container;
@@ -25,7 +22,6 @@ var Breadcrumb = exports.Breadcrumb = Montage.create(Component, {
25 22
26 containerElements: { 23 containerElements: {
27 value: [] 24 value: []
28
29 }, 25 },
30 26
31 27
@@ -33,14 +29,12 @@ var Breadcrumb = exports.Breadcrumb = Montage.create(Component, {
33 value: function() { 29 value: function() {
34 this.eventManager.addEventListener( "appLoaded", this, false); 30 this.eventManager.addEventListener( "appLoaded", this, false);
35 this.eventManager.addEventListener( "breadCrumbTrail", this, false); 31 this.eventManager.addEventListener( "breadCrumbTrail", this, false);
36 }, 32 }
37 enumerable : false
38 }, 33 },
39 34
40 handleAppLoaded : { 35 handleAppLoaded : {
41 value: function() { 36 value: function() {
42 37
43
44 Object.defineBinding(this, "container", { 38 Object.defineBinding(this, "container", {
45 boundObject: this.application.ninja, 39 boundObject: this.application.ninja,
46 boundObjectPropertyPath: "currentSelectedContainer", 40 boundObjectPropertyPath: "currentSelectedContainer",
@@ -50,107 +44,61 @@ var Breadcrumb = exports.Breadcrumb = Montage.create(Component, {
50 } 44 }
51 }, 45 },
52 46
53 prepareForDraw: {
54 value: function() {
55
56 }
57 },
58
59 draw: {
60 value: function() {
61
62 }
63 },
64
65 didDraw:{
66 value:function(){
67 }
68 },
69
70 createContainerElements: { 47 createContainerElements: {
71 value: function() { 48 value: function() {
72
73 var parentNode; 49 var parentNode;
74 50
75 while(this.containerElements.pop()){ 51 this.containerElements.length = 0
76 // To empty the array to get the new parentNode of the new currentLevel
77 }
78
79 if(this.container.id === "UserContent"){
80
81 this.containerElements.push({selected:false,element:this.container});
82
83 52
84 } 53 if(this.container.id === "UserContent") {
85 else{ 54 this.containerElements.push({selected:false, element:this.container});
86 55 } else {
87 parentNode= this.container; 56 parentNode = this.container;
88