init
This commit is contained in:
		
							
								
								
									
										25
									
								
								KretaWeb/Scripts/KendoHelper/KretaSwitchButtonHelper.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								KretaWeb/Scripts/KendoHelper/KretaSwitchButtonHelper.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| /*Kreta switch button helper | ||||
| Ez a function állítja a kreate switch button mogotti bindolt checkboxot. | ||||
| */ | ||||
| var SwitchButtonHelper = (function () { | ||||
|   var switchButtonHelper = function () {}; | ||||
|  | ||||
|   switchButtonHelper.switchButtonChange = function switchButtonChange( | ||||
|     fieldnameId, | ||||
|     hiddenNameId | ||||
|   ) { | ||||
|     if ($('#' + fieldnameId).prop('disabled') == true) { | ||||
|       return; | ||||
|     } | ||||
|     if ($('#' + fieldnameId).is(':checked')) { | ||||
|       $('#' + fieldnameId).prop('checked', false); | ||||
|       $('#' + fieldnameId).val(false); | ||||
|       $('#' + hiddenNameId).val(false); | ||||
|     } else { | ||||
|       $('#' + fieldnameId).prop('checked', true); | ||||
|       $('#' + fieldnameId).val(true); | ||||
|       $('#' + hiddenNameId).val(true); | ||||
|     } | ||||
|   }; | ||||
|   return switchButtonHelper; | ||||
| })(); | ||||
		Reference in New Issue
	
	Block a user