(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["list-TList"],{802:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TList = function( options ) {\n\t\tvar opts = $.extend( {}, $.fn.TList.defaults, options );\n\t\tvar $this = this;\n\t\tvar field;\n\t\tvar source_data = null;\n\n\t\tvar select_value = null;\n\n\t\tvar set_empty = false;\n\n\t\tvar set_any = false;\n\n\t\tvar set_select_item_when_set_source_data = false;\n\n\t\tvar error_string = '';\n\t\tvar error_tip_box;\n\n\t\tvar mass_edit_mode = false;\n\n\t\tvar check_box = null;\n\n\t\tvar enabled = true;\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\n\t\t\tif ( val === false || val === '' ) {\n\t\t\t\t$this.attr( 'disabled', 'true' );\n\t\t\t\t$this.addClass( 't-select-readonly' );\n\t\t\t} else {\n\t\t\t\t$this.removeAttr( 'disabled' );\n\t\t\t\t$this.removeClass( 't-select-readonly' );\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\n\t\t\t\tcheck_box.change( function() {\n\t\t\t\t\t$this.trigger( 'formItemChange', [$this] );\n\t\t\t\t} );\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\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\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\n\t\t\tif ( Global.isSet( error_tip_box ) ) {\n\t\t\t\terror_tip_box.remove();\n\t\t\t}\n\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\tvar result = [];\n\t\t\tvar select_items = $( this ).children( 'option:selected' );\n\t\t\tvar len = select_items.length;\n\t\t\tif ( len > 0 ) {\n\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\t\tvar item = select_items.eq( i );\n\t\t\t\t\tresult.push( item.attr( 'value' ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\n\t\t\tselect_value = val;\n\n\t\t\tif ( !source_data || ( set_empty && source_data.length === 1 ) || ( set_any && source_data.length === 1 ) ) {\n\t\t\t\tset_select_item_when_set_source_data = true;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( !val ) {\n\t\t\t\tif ( set_empty ) {\n\t\t\t\t\tval = '0';\n\t\t\t\t} else if ( set_any ) {\n\t\t\t\t\tval = '-1';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$( $( this ).find( 'option' ) ).removeAttr( 'selected' );\n\n\t\t\t$( $( this ).find( 'option' ) ).filter( function() {\n\n\t\t\t\tif ( val === null || val === undefined ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tvar result = false;\n\t\t\t\tif ( $.type( val ) === 'array' ) {\n\t\t\t\t\tfor ( var i = 0; i < val.length; i++ ) {\n\t\t\t\t\t\tvar item = val[i];\n\n\t\t\t\t\t\tif ( item.toString() === $( this ).attr( 'value' ) ) {\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tresult = ( $( this ).attr( 'value' ) === val.toString() );\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\n\t\t\t} ).prop( 'selected', true ).attr( 'selected', true );\n\n\t\t};\n\n\t\tthis.setSourceData = function( val ) {\n\n\t\t\t$( this ).empty();\n\n\t\t\tif ( !Global.isSet( val ) || val.length < 1 ) {\n\t\t\t\tif ( set_empty ) {\n\t\t\t\t\tval = Global.addFirstItemToArray( val, 'empty' );\n\t\t\t\t} else if ( set_any ) {\n\t\t\t\t\tval = Global.addFirstItemToArray( val, 'any' );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( set_empty ) {\n\n\t\t\t\t\tif ( val[0].value !== '0' ) {\n\t\t\t\t\t\tval = Global.addFirstItemToArray( val, 'empty' );\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( set_any ) {\n\t\t\t\t\tif ( val[0].value !== '-1' ) {\n\t\t\t\t\t\tval = Global.addFirstItemToArray( val, 'any' );\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsource_data = val;\n\n\t\t\tvar len = val.length;\n\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\tvar item = val[i];\n\t\t\t\t$( this ).append( '' );\n\t\t\t}\n\n\t\t\tif ( set_select_item_when_set_source_data ) {\n\t\t\t\tthis.setValue( select_value );\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\tif ( o.set_empty ) {\n\t\t\t\tset_empty = o.set_empty;\n\t\t\t}\n\n\t\t\tif ( o.set_any ) {\n\t\t\t\tset_any = o.set_any;\n\t\t\t}\n\n\t\t\tif ( o.mass_edit_mode ) {\n\t\t\t\tmass_edit_mode = o.mass_edit_mode;\n\t\t\t}\n\n\t\t\tfield = o.field;\n\n\t\t\t$( this ).change( function() {\n\n\t\t\t\tif ( !enabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\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$this.trigger( 'formItemChange', [$this] );\n\t\t\t} );\n\n\t\t\t$( this ).click( function() {\n\t\t\t\tif ( !enabled ) {\n\t\t\t\t\tif ( !check_box ) {\n\t\t\t\t\t\tif ( LocalCacheData.current_open_sub_controller &&\n\t\t\t\t\t\t\tLocalCacheData.current_open_sub_controller.edit_view &&\n\t\t\t\t\t\t\tLocalCacheData.current_open_sub_controller.is_viewing ) {\n\t\t\t\t\t\t\terror_string = LocalCacheData.current_open_sub_controller.getViewModeErrorMessage();\n\t\t\t\t\t\t\t$this.showErrorTip( 10 );\n\t\t\t\t\t\t} else if ( LocalCacheData.current_open_primary_controller &&\n\t\t\t\t\t\t\tLocalCacheData.current_open_primary_controller.edit_view &&\n\t\t\t\t\t\t\tLocalCacheData.current_open_primary_controller.is_viewing ) {\n\t\t\t\t\t\t\terror_string = LocalCacheData.current_open_primary_controller.getViewModeErrorMessage();\n\t\t\t\t\t\t\t$this.showErrorTip( 10 );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t$( this ).mouseover( function() {\n\n\t\t\t\tif ( enabled ) {\n\t\t\t\t\tif ( error_string && error_string.length > 0 ) {\n\t\t\t\t\t\t$this.showErrorTip( 20 );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\t$( this ).mouseout( function() {\n\t\t\t\t$this.hideErrorTip();\n\t\t\t} );\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.TList.defaults = {};\n\t$.fn.TList.html_template = `\n\t\n\t`;\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODAyLmpzIiwibWFwcGluZ3MiOiI7QUFBQTs7QUFFQTtBQUNBLHlCQUF5QjtBQUN6QjtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxLQUFLO0FBQ0w7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsTUFBTTtBQUNOLE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