aboutsummaryrefslogtreecommitdiff
path: root/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-21 14:36:41 -0800
committerValerio Virgillito2012-02-21 14:36:41 -0800
commit1d2c928c35ccc7cd875a329b2e235f34eb4f0c0d (patch)
treefebe5a23c3667523e90de031987a11764f417da7 /js/components/layout/bread-crumb-button.reel/bread-crumb-button.js
parentb1daf0b285a4a96bfd0086709c20e3682d75551a (diff)
parentf9d34a54baf61ccdf77732b1aaedb29d296b8c2e (diff)
downloadninja-1d2c928c35ccc7cd875a329b2e235f34eb4f0c0d.tar.gz
Merge branch 'nested-selection' of https://github.com/mencio/ninja-internal into file-io
Conflicts: js/controllers/document-controller.js Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/components/layout/bread-crumb-button.reel/bread-crumb-button.js')
-rwxr-xr-xjs/components/layout/bread-crumb-button.reel/bread-crumb-button.js35
1 files changed, 14 insertions, 21 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 }