(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["checkbox-TCheckbox"],{5529:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TCheckbox = function( options ) {\n\t\tvar opts = $.extend( {}, $.fn.TCheckbox.defaults, options );\n\n\t\tvar $this = this;\n\t\tvar field;\n\n\t\tvar error_string = '';\n\t\tvar error_tip_box;\n\n\t\tvar mass_edit_mode = false;\n\t\tvar check_box = null;\n\n\t\tvar enabled = true;\n\n\t\tthis.clearErrorStyle = function() {\n\n\t\t};\n\n\t\tthis.getEnabled = function() {\n\t\t\treturn enabled;\n\t\t};\n\n\t\tthis.setEnabled = function( val ) {\n\t\t\tenabled = val;\n\t\t\tif ( val === false || val === '' ) {\n\t\t\t\t$this.attr( 'disabled', 'true' );\n\t\t\t} else {\n\t\t\t\t$this.removeAttr( 'disabled' );\n\t\t\t}\n\n\t\t};\n\n\t\tthis.setCheckBox = function( val ) {\n\t\t\tif ( check_box ) {\n\t\t\t\tcheck_box.children().eq( 0 )[0].checked = val;\n\t\t\t}\n\t\t};\n\n\t\tthis.isChecked = function() {\n\t\t\tif ( check_box ) {\n\t\t\t\tif ( check_box.children().eq( 0 )[0].checked === true ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t};\n\n\t\tthis.setMassEditMode = function( val ) {\n\t\t\tmass_edit_mode = val;\n\n\t\t\tif ( mass_edit_mode ) {\n\t\t\t\tcheck_box = $( '
' +\n\t\t\t\t\t'
' );\n\t\t\t\tcheck_box.insertBefore( $( this ) );\n\t\t\t\tcheck_box.change( function() {\n\t\t\t\t\t$this.trigger( 'formItemChange', [$this] );\n\t\t\t\t} );\n\n\t\t\t} else {\n\t\t\t\tif ( check_box ) {\n\t\t\t\t\tcheck_box.remove();\n\t\t\t\t\tcheck_box = null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t};\n\n\t\tthis.setErrorStyle = function( errStr, show, isWarning ) {\n\t\t\tif ( isWarning ) {\n\t\t\t\t$( this ).addClass( 'warning-tip' );\n\t\t\t} else {\n\t\t\t\t$( this ).addClass( 'error-tip' );\n\t\t\t}\n\t\t\terror_string = errStr;\n\n\t\t\tif ( show ) {\n\t\t\t\tthis.showErrorTip();\n\t\t\t}\n\t\t};\n\n\t\tthis.showErrorTip = function( sec ) {\n\t\t\tif ( !Global.isSet( sec ) ) {\n\t\t\t\tsec = 2;\n\t\t\t}\n\n\t\t\tif ( !error_tip_box ) {\n\t\t\t\terror_tip_box = Global.loadWidgetByName( WidgetNamesDic.ERROR_TOOLTIP );\n\t\t\t\terror_tip_box = error_tip_box.ErrorTipBox();\n\t\t\t}\n\t\t\terror_tip_box.cancelRemove();\n\t\t\tif ( $( this ).hasClass( 'warning-tip' ) ) {\n\t\t\t\terror_tip_box.show( this, error_string, sec, true );\n\t\t\t} else {\n\t\t\t\terror_tip_box.show( this, error_string, sec );\n\t\t\t}\n\t\t};\n\n\t\tthis.hideErrorTip = function() {\n\t\t\tif ( Global.isSet( error_tip_box ) ) {\n\t\t\t\terror_tip_box.remove();\n\t\t\t}\n\t\t};\n\n\t\tthis.clearErrorStyle = function() {\n\t\t\t$( this ).removeClass( 'error-tip' );\n\t\t\t$( this ).removeClass( 'warning-tip' );\n\t\t\tthis.hideErrorTip();\n\t\t\terror_string = '';\n\t\t};\n\n\t\tthis.getField = function() {\n\t\t\treturn field;\n\t\t};\n\n\t\tthis.getValue = function() {\n\n\t\t\tif ( this.prop( 'checked' ) || this[0].checked === true ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\n\t\t\tif ( val === true ) {\n\t\t\t\tthis.prop( 'checked', 'checked' );\n\t\t\t\tthis[0].checked = true;\n\t\t\t} else {\n\t\t\t\tthis.removeAttr( 'checked' );\n\t\t\t\tthis[0].checked = false;\n\t\t\t}\n\n\t\t};\n\n\t\tthis.each( function() {\n\n\t\t\tvar o = $.meta ? $.extend( {}, opts, $( this ).data() ) : opts;\n\n\t\t\tfield = o.field;\n\n\t\t\t$( this ).change( function() {\n\t\t\t\tif ( check_box ) {\n\t\t\t\t\t$this.setCheckBox( true );\n\t\t\t\t}\n\n\t\t\t\t//#2353 - Removed for jquery 3.3.1\n\t\t\t\t// if ( $this.prop('checked' ) === 'checked' ) {\n\t\t\t\t// \t$this.removeAttr( 'checked' );\n\t\t\t\t// \t$this[0].checked = false;\n\t\t\t\t// } else {\n\t\t\t\t// \t$this.prop('checked', 'checked' );\n\t\t\t\t// \t$this[0].checked = true;\n\t\t\t\t// }\n\n\t\t\t\t$this.trigger( 'formItemChange', [$this] );\n\t\t\t} );\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.TCheckbox.defaults = {};\n\t$.fn.TCheckbox.html_template = ``;\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTUyOS5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7QUFDQSx5QkFBeUI7O0FBRXpCO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEtBQUs7QUFDTDtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFNOztBQUVOLEtBQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLEtBQUs7QUFDTDtBQUNB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