aboutsummaryrefslogtreecommitdiff
path: root/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-02-22 11:04:18 -0800
committerNivesh Rajbhandari2012-02-22 11:04:18 -0800
commitecd0dc6ffd21aedfb5ae8f617af36e48a2ba72ce (patch)
treedf63accaeccb899ab1ecc107ab361629a5ca3452 /js/components/layout/bread-crumb-button.reel/bread-crumb-button.js
parent96a0a8c916533eb5625816192ed38488f639326d (diff)
parent2f24dafec79583547fe663d5a387d8ef15aae3bf (diff)
downloadninja-ecd0dc6ffd21aedfb5ae8f617af36e48a2ba72ce.tar.gz
Merge branch 'refs/heads/ninja-internal' into WebGLMaterials
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 }