diff options
Diffstat (limited to 'js/components/layout')
-rwxr-xr-x | js/components/layout/document-entry.reel/close_button.gif | bin | 139 -> 0 bytes | |||
-rwxr-xr-x | js/components/layout/document-entry.reel/document-entry.css | 8 | ||||
-rwxr-xr-x | js/components/layout/document-entry.reel/document-entry.html | 15 | ||||
-rwxr-xr-x | js/components/layout/document-entry.reel/document-entry.js | 37 |
4 files changed, 20 insertions, 40 deletions
diff --git a/js/components/layout/document-entry.reel/close_button.gif b/js/components/layout/document-entry.reel/close_button.gif deleted file mode 100755 index 00b5904b..00000000 --- a/js/components/layout/document-entry.reel/close_button.gif +++ /dev/null | |||
Binary files differ | |||
diff --git a/js/components/layout/document-entry.reel/document-entry.css b/js/components/layout/document-entry.reel/document-entry.css index 010e1da7..6a2900be 100755 --- a/js/components/layout/document-entry.reel/document-entry.css +++ b/js/components/layout/document-entry.reel/document-entry.css | |||
@@ -19,17 +19,13 @@ | |||
19 | min-width:0px; | 19 | min-width:0px; |
20 | } | 20 | } |
21 | 21 | ||
22 | .mybutton { | 22 | .documentCloseButton { |
23 | display: inline; | 23 | display: inline; |
24 | -webkit-appearance: none; | 24 | -webkit-appearance: none; |
25 | outline: none; | 25 | outline: none; |
26 | |||
27 | font-size: 9px; | ||
28 | cursor: pointer; | 26 | cursor: pointer; |
29 | border: 0px; | 27 | border: 0px; |
30 | background-color: #474747; | 28 | background: #474747 url(../../../../images/documentsTab/close_button.gif) center center no-repeat; |
31 | background-image: -webkit-linear-gradient(top, #505050 0%, #3c3c3c 100%); | ||
32 | |||
33 | } | 29 | } |
34 | 30 | ||
35 | .documentEntry button { | 31 | .documentEntry button { |
diff --git a/js/components/layout/document-entry.reel/document-entry.html b/js/components/layout/document-entry.reel/document-entry.html index bd8c25cb..e68d17c5 100755 --- a/js/components/layout/document-entry.reel/document-entry.html +++ b/js/components/layout/document-entry.reel/document-entry.html | |||
@@ -22,8 +22,16 @@ | |||
22 | "closeButton": { | 22 | "closeButton": { |
23 | "prototype": "montage/ui/button.reel", | 23 | "prototype": "montage/ui/button.reel", |
24 | "properties": { | 24 | "properties": { |
25 | "element": {"#": "close-btn"} | 25 | "element": {"#": "close-btn"}, |
26 | } | 26 | "identifier": "closeButton" |
27 | }, | ||
28 | "listeners": [ | ||
29 | { | ||
30 | "type": "action", | ||
31 | "listener": {"@": "owner"}, | ||
32 | "capture": false | ||
33 | } | ||
34 | ] | ||
27 | } | 35 | } |
28 | } | 36 | } |
29 | </script> | 37 | </script> |
@@ -31,8 +39,7 @@ | |||
31 | <body> | 39 | <body> |
32 | <li data-montage-id="documentEntry" class="documentEntry"> | 40 | <li data-montage-id="documentEntry" class="documentEntry"> |
33 | <span data-montage-id="name"></span> | 41 | <span data-montage-id="name"></span> |
34 | <!--<img src="js/components/layout/document-entry.reel/close_button.gif" data-montage-id="close-btn">--> | 42 | <button type="button" class="documentCloseButton" data-montage-id="close-btn"></button> |
35 | <button type="button" class="mybutton" data-montage-id="close-btn"></button> | ||
36 | </li> | 43 | </li> |
37 | </body> | 44 | </body> |
38 | </html> \ No newline at end of file | 45 | </html> \ No newline at end of file |
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 | ||
10 | exports.DocumentEntry = Montage.create(Component, { | 10 | exports.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 | ||