aboutsummaryrefslogtreecommitdiff
path: root/js/components/layout/bread-crumb-button.reel
diff options
context:
space:
mode:
authorEric Guzman2012-02-22 23:19:45 -0800
committerEric Guzman2012-02-22 23:19:45 -0800
commit9e8cd4448a6d0f809a55c3bdea8b45ed75339794 (patch)
treec7b5105153f17aedecd0669c611dbea44be7374c /js/components/layout/bread-crumb-button.reel
parenta5ee11857f923d3e49b44c0a8c480e9d0b026d5b (diff)
parent2afef244a3f8124f8a049e504e9782c05904ce23 (diff)
downloadninja-9e8cd4448a6d0f809a55c3bdea8b45ed75339794.tar.gz
Merge branch 'refs/heads/master' into CSSPanelUpdates
Diffstat (limited to 'js/components/layout/bread-crumb-button.reel')
-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 }