diff options
author | Pushkar Joshi | 2012-02-24 12:08:49 -0800 |
---|---|---|
committer | Pushkar Joshi | 2012-02-24 12:08:49 -0800 |
commit | 03ca7a5ed13c25faaa9100bb666e062fd15335e6 (patch) | |
tree | c51112223ceb9121cd595a60335eb2795215590f /js/components/layout/bread-crumb-button.reel/bread-crumb-button.js | |
parent | fcb12cc09eb3cd3b42bd215877ba18f449275b75 (diff) | |
parent | 053fc63a2950c7a5ee4ebf98033b64d474a3c46e (diff) | |
download | ninja-03ca7a5ed13c25faaa9100bb666e062fd15335e6.tar.gz |
Merge branch 'pentool' into brushtool
Conflicts:
imports/codemirror/mode/scheme/scheme.js
js/tools/BrushTool.js
Diffstat (limited to 'js/components/layout/bread-crumb-button.reel/bread-crumb-button.js')
-rwxr-xr-x[-rw-r--r--] | js/components/layout/bread-crumb-button.reel/bread-crumb-button.js | 35 |
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 100644..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 @@ | |||
7 | var Montage = require("montage/core/core").Montage; | 7 | var Montage = require("montage/core/core").Montage; |
8 | var Component = require("montage/ui/component").Component; | 8 | var Component = require("montage/ui/component").Component; |
9 | 9 | ||
10 | |||
11 | exports.BreadcrumbButton = Montage.create(Component, { | 10 | exports.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 | } |