()
| 13 | |
| 14 | // Public methods |
| 15 | public run(): void{ |
| 16 | // We copy the render link so we can use it in the functions below |
| 17 | var renderLink: RenderLinkCheckbox = this; |
| 18 | |
| 19 | // We set the change event |
| 20 | $(this.element).change(function(event){ |
| 21 | if($(this).is(':checked')){ |
| 22 | // We fire the callback collection |
| 23 | renderLink.callbackCollectionWhenChecked.fire(); |
| 24 | } |
| 25 | else{ |
| 26 | renderLink.callbackCollectionWhenUnchecked.fire(); |
| 27 | } |
| 28 | |
| 29 | return false; // Avoid event bubbling |
| 30 | }); |
| 31 | } |
| 32 | } |