Changeset 267 for ether_megapoli/trunk/web/resources/js
- Timestamp:
- 11/29/11 17:07:45 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ether_megapoli/trunk/web/resources/js/classesForJQuery/Button.js
r240 r267 24 24 this.callbackOnMouseOver = param.onMouseOver ? param.onMouseOver : false; 25 25 this.callbackOnMouseOut = param.onMouseOut ? param.onMouseOut : false; 26 this.contextToSave = param.contextToSave ? param.contextToSave : false; 26 27 this.boolDisabled = false; 27 28 this.boolSelected = false; … … 43 44 44 45 // Define button events 45 this.divContainer.bind( 'click', this, this.onClick ); 46 if( this.contextToSave ) 47 this.divContainer.bind( 'click', [this, this.contextToSave], this.onClick ); 48 else 49 this.divContainer.bind( 'click', this, this.onClick ); 46 50 this.divContainer.bind( 'mouseover', this, this.onHover ); 47 51 this.divContainer.bind( 'mouseout', this, this.onOut ); … … 114 118 { 115 119 var contextButton = event.data; 120 var isContextToPut = false; 121 if( jQuery.isArray( event.data ) ) 122 { 123 isContextToPut = true; 124 contextButton = event.data[0]; 125 } 126 116 127 if( !contextButton.isDisable() && (undefined == event.detail || 1 == event.detail) && contextButton.callbackOnClick ) 117 contextButton.callbackOnClick(); 128 if( isContextToPut ) 129 contextButton.callbackOnClick( event.data[1] ); 130 else 131 contextButton.callbackOnClick(); 118 132 }, 119 133
Note: See TracChangeset
for help on using the changeset viewer.