From 9d17dc8dab12aa661ab321567f024406f4972abb Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 20 Feb 2012 15:34:14 -0800 Subject: cleanup of the breadcrumb Signed-off-by: Valerio Virgillito --- .../bread-crumb-button.reel/bread-crumb-button.js | 35 +++++++++------------- 1 file changed, 14 insertions(+), 21 deletions(-) (limited to 'js/components/layout/bread-crumb-button.reel/bread-crumb-button.js') 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 @@ var Montage = require("montage/core/core").Montage; var Component = require("montage/ui/component").Component; - exports.BreadcrumbButton = Montage.create(Component, { - button: { value: null }, + button: { + value: null + }, - data: { value: null }, + data: { + value: null + }, prepareForDraw: { - enumerable: false, value: function() { this.element.addEventListener("mousedown", this, false); } }, draw: { - enumerable: false, value: function() { - - if(this.data.element.id==="UserContent"){ - - this.button.innerHTML = "Body"; - } - - else{ - this.button.innerHTML=this.data.element.nodeName; - } - + if(this.data.element.id === "UserContent") { + this.button.innerHTML = "Body"; + } else { + this.button.innerHTML = this.data.element.nodeName; + } } }, handleMousedown: { value: function(event) { - if(event.which===1){ - - this.data.selected=true; - NJevent('breadCrumbTrail',this.data); - this.data.selected=false; - } + //this.data.selected=true; + NJevent('breadCrumbTrail',this.data); + //this.data.selected=false; } } -- cgit v1.2.3