diff -r b0dd75e285d2 -r 0954f5dd2cd0 ginebra2/chrome/js/SimpleButton.js --- a/ginebra2/chrome/js/SimpleButton.js Fri May 14 15:40:36 2010 +0300 +++ b/ginebra2/chrome/js/SimpleButton.js Tue Jun 29 00:46:29 2010 -0400 @@ -1,5 +1,5 @@ // Call SimpleButton to wire an HTML button (typically an tag) to a JS callback -// +// // (As opposed to ActionButton which is served all the way through QT Actions) // // Params: @@ -74,7 +74,7 @@ // //window.chrome.alert("SimpleButton::onClick: " + this); // this.handler(); // } - + this.onMouseDown = function() { this.isDown = true; this.updateButton.call(this); @@ -82,7 +82,7 @@ this.handler(); } } - + this.onMouseUp = function() { this.isDown = false; this.updateButton.call(this); @@ -95,13 +95,13 @@ if (this.isDown) { this.isDown = false; this.updateButton.call(this); - + if (this.triggerOnMouseOut && this.enabled) { this.handler(); } } } - + // Set up element event handlers. this.element().onmousedown = this.onMouseDown.bind(this); this.element().onmouseup = this.onMouseUp.bind(this);