aboutsummaryrefslogtreecommitdiff
path: root/js/components/layout/document-entry.reel/document-entry.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-29 11:43:55 -0700
committerValerio Virgillito2012-05-29 11:43:55 -0700
commit4fa08fe2ce439a5f5c248c568f72d3828ee11b36 (patch)
tree3fb2977a349c01c5b8cdbd2ab686a0099e3c3999 /js/components/layout/document-entry.reel/document-entry.js
parent0c9c719acb9381e147b90abbf733ad7eb3beb7f7 (diff)
downloadninja-4fa08fe2ce439a5f5c248c568f72d3828ee11b36.tar.gz
fix for the document tab close button and rulers on initial document
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/components/layout/document-entry.reel/document-entry.js')
-rwxr-xr-xjs/components/layout/document-entry.reel/document-entry.js37
1 files changed, 7 insertions, 30 deletions
diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js
index 2e66c7cd..34e307cb 100755
--- a/js/components/layout/document-entry.reel/document-entry.js
+++ b/js/components/layout/document-entry.reel/document-entry.js
@@ -9,15 +9,11 @@ var Component = require("montage/ui/component").Component;
9 9
10exports.DocumentEntry = Montage.create(Component, { 10exports.DocumentEntry = Montage.create(Component, {
11 11
12 dirty: { value: null },
13
14 _uuid: { 12 _uuid: {
15 value: null, 13 value: null
16 enumerable: false
17 }, 14 },
18 15
19 _document: { 16 _document: {
20 enumerable: false,
21 value: null 17 value: null
22 }, 18 },
23 19
@@ -40,7 +36,9 @@ exports.DocumentEntry = Montage.create(Component, {
40 } 36 }
41 }, 37 },
42 38
43 _name: { value: null }, 39 _name: {
40 value: null
41 },
44 42
45 name: { 43 name: {
46 enumerable: false, 44 enumerable: false,
@@ -74,22 +72,11 @@ exports.DocumentEntry = Montage.create(Component, {
74 } 72 }
75 }, 73 },
76 74
77 prepareForDraw: {
78 enumerable: false,
79 value: function() {
80// this.element.addEventListener("click", this, false);
81// this.closeBtn.addEventListener("click", this, true);
82 }
83 },
84
85
86 draw: { 75 draw: {
87 enumerable: false, 76 enumerable: false,
88 value: function() { 77 value: function() {
89 this.label.innerText = this._name ? this._name : ""; 78 this.label.innerText = this._name ? this._name : "";
90 79
91// this._active ? this.element.classList.add("activeTab") : this.element.classList.remove("activeTab");
92
93 if(this.saveFlag) { 80 if(this.saveFlag) {
94 this.label.classList.add("dirty"); 81 this.label.classList.add("dirty");
95 } else { 82 } else {
@@ -98,19 +85,9 @@ exports.DocumentEntry = Montage.create(Component, {
98 } 85 }
99 }, 86 },
100 87
101 captureClick: { 88 handleCloseButtonAction: {
102 value: function(event) { 89 value: function() {
103 console.log("clicked on the X"); 90 //this.application.ninja.documentController.closeFile(this.application.ninja.documentController._findDocumentByUUID(this._uuid));
104 event.preventDefault();
105 event.stopImmediatePropagation();
106 event.stopPropagation();
107// if(event._event.target.nodeName === "IMG") {
108// this.application.ninja.documentController.closeFile(this.application.ninja.documentController._findDocumentByUUID(this._uuid));
109// } else {
110// if(!this.active) {
111// this.application.ninja.documentController.switchDocuments(this.application.ninja.currentDocument, this.application.ninja.documentController._findDocumentByUUID(this._uuid));
112// }
113// }
114 } 91 }
115 } 92 }
116 93