(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["timepicker-TTimePicker"],{9680:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TTimePicker = function( options ) {\n\t\tvar opts = $.extend( {}, $.fn.TTimePicker.defaults, options );\n\t\t//Global.addCss( 'global/widgets/timepicker/TTimePicker.css' );\n\t\tvar $this = this;\n\t\tvar field;\n\t\tvar validation_field;\n\t\tvar time_picker_input;\n\t\tvar icon;\n\t\tvar error_string = '';\n\t\tvar error_tip_box;\n\t\tvar mass_edit_mode = false;\n\t\tvar check_box = null;\n\t\tvar enabled = true;\n\t\tvar is_open = false;\n\t\tvar focus_out_timer;\n\t\tvar can_open = false; //default when the calender can be open, we only open it when click on the icon\n\t\tvar is_static_width = false;\n\t\tvar stepMinute = 15;\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\ttime_picker_input.addClass( 't-time-picker-readonly' );\n\t\t\t\ticon.css( 'display', 'none' );\n\t\t\t\ttime_picker_input.attr( 'readonly', 'readonly' );\n\t\t\t} else {\n\t\t\t\ttime_picker_input.removeClass( 't-time-picker-readonly' );\n\t\t\t\ticon.css( 'display', 'inline' );\n\t\t\t\ttime_picker_input.removeAttr( 'readonly' );\n\t\t\t}\n\t\t};\n\n\t\tthis.setCheckBox = function( val ) {\n\t\t\tcheck_box.children().eq( 0 )[0].checked = val;\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\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\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\ttime_picker_input.addClass( 'warning-tip' );\n\t\t\t} else {\n\t\t\t\ttime_picker_input.addClass( 'error-tip' );\n\t\t\t}\n\t\t\terror_string = errStr;\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\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 ( time_picker_input.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\t// Error: TypeError: time_picker_input is undefined in /interface/html5/global/widgets/datepicker/TTimePicker.js?v=8.0.3-20150313-161037 line 122\n\t\tthis.clearErrorStyle = function() {\n\t\t\tif ( !time_picker_input ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttime_picker_input.removeClass( 'error-tip' );\n\t\t\ttime_picker_input.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.getValidationField = function() {\n\t\t\treturn validation_field;\n\t\t};\n\n\t\tthis.getDefaultFormatValue = function() {\n\t\t\tvar val = time_picker_input.val();\n\n\t\t\tval = Global.strToDate( val ).format( 'YYYY-MM-DD' );\n\n\t\t\treturn val;\n\t\t};\n\n\t\tthis.setPlaceHolder = function( val ) {\n\t\t\ttime_picker_input.attr( 'placeholder', val );\n\t\t};\n\n\t\tthis.getValue = function() {\n\t\t\treturn time_picker_input.val();\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\t\t\t//Error: Uncaught TypeError: Cannot read property 'val' of undefined in /interface/html5/global/widgets/datepicker/TTimePicker.js?v=8.0.0-20141230-130626 line 144\n\t\t\tif ( !time_picker_input ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( !val ) {\n\t\t\t\tval = '';\n\t\t\t}\n\t\t\ttime_picker_input.val( val );\n\t\t\tthis.autoResize();\n\t\t};\n\n\t\tthis.setDefaultWidgetValue = function() {\n\t\t\tif ( $( this ).attr( 'widget-value' ) ) {\n\t\t\t\tthis.setValue( $( this ).attr( 'widget-value' ) );\n\t\t\t}\n\t\t};\n\n\t\tthis.autoResize = function() {\n\t\t\tvar content_width, example_width;\n\t\t\tif ( !is_static_width ) {\n\t\t\t\texample_width = Global.calculateTextWidth( LocalCacheData.getLoginUserPreference().time_format_display );\n\t\t\t\tcontent_width = Global.calculateTextWidth( time_picker_input.val(), {\n\t\t\t\t\tmin_width: example_width,\n\t\t\t\t\tmax_width: ( example_width + 100 ),\n\t\t\t\t\tpadding: 28\n\t\t\t\t} );\n\t\t\t\t$this.width( content_width + 'px' );\n\t\t\t}\n\t\t};\n\n\t\tthis.each( function() {\n\t\t\tvar o = $.meta ? $.extend( {}, opts, $( this ).data() ) : opts;\n\t\t\tvar time_format = 'h:mm TT';\n\t\t\tif ( LocalCacheData.getLoginUserPreference() ) {\n\t\t\t\ttime_format = LocalCacheData.getLoginUserPreference().time_format_1;\n\t\t\t}\n\t\t\tfield = o.field;\n\t\t\tif ( o.validation_field ) {\n\t\t\t\tvalidation_field = o.validation_field;\n\t\t\t}\n\t\t\ticon = $( this ).find( '.t-time-picker-icon' );\n\t\t\ttime_picker_input = $( this ).find( '.t-time-picker' );\n\t\t\ticon.attr( 'src', Global.getRealImagePath( 'images/time.png' ) );\n\t\t\ticon.bind( 'mouseup', function() {\n\t\t\t\tif ( !enabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( !is_open ) {\n\t\t\t\t\ttime_picker_input.timepicker( 'show' );\n\t\t\t\t\tis_open = true;\n\t\t\t\t} else {\n\t\t\t\t\tis_open = false;\n\t\t\t\t\tif ( focus_out_timer ) {\n\t\t\t\t\t\tclearTimeout( focus_out_timer );\n\t\t\t\t\t\tfocus_out_timer = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tif ( o.stepMinute ) {\n\t\t\t\tstepMinute = o.stepMinute;\n\t\t\t}\n\n\t\t\tvar close_text = $.i18n._( 'Close' );\n\t\t\ttime_picker_input = time_picker_input.timepicker( {\n\t\t\t\tshowMillisec: false,\n\t\t\t\tshowMicrosec: false,\n\t\t\t\tshowTimezone: false,\n\t\t\t\tshowHeader: false,\n\t\t\t\ttimeFormat: time_format,\n\t\t\t\tshowOn: '',\n\t\t\t\tstepMinute: stepMinute,\n\t\t\t\tcloseText: close_text,\n\t\t\t\tshowAnim: '',\n\t\t\t\tbeforeShow: function() {\n\t\t\t\t\tif ( o.beforeShow ) {\n\t\t\t\t\t\to.beforeShow();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tonClose: function() {\n\t\t\t\t\tfocus_out_timer = setTimeout( function() {\n\t\t\t\t\t\tis_open = false;\n\t\t\t\t\t\t$this.autoResize();\n\t\t\t\t\t\tif ( o.onClose ) {\n\t\t\t\t\t\t\to.onClose();\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 100 );\n\t\t\t\t}\n\t\t\t} );\n\t\t\t$this.setPlaceHolder( LocalCacheData.loginUserPreference.time_format_display );\n\n\t\t\t//hack to stop automatic rounding of typed dates to stepMinute increment\n\t\t\ttime_picker_input.off( 'keyup' ).off( 'keydown' ).off( 'keypress' );\n\n\t\t\ttime_picker_input.off( 'change' ).on( 'change', function( e ) {\n\t\t\t\tif ( check_box ) {\n\t\t\t\t\t$this.setCheckBox( true );\n\t\t\t\t}\n\t\t\t\t$this.trigger( 'formItemChange', [$this] );\n\t\t\t\t$this.autoResize();\n\t\t\t} );\n\t\t\ttime_picker_input.mouseover( function() {\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\t\t\t} );\n\t\t\ttime_picker_input.mouseout( function() {\n\t\t\t\tif ( !$( $this ).is( ':focus' ) ) {\n\t\t\t\t\t$this.hideErrorTip();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\ttime_picker_input.focusin( function( e ) {\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} else {\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\t\t\t} );\n\n\t\t\ttime_picker_input.focusout( function() {\n\t\t\t\t$this.hideErrorTip();\n\n\t\t\t} );\n\t\t\tif ( o.width > 0 ) {\n\t\t\t\t$this.width( o.width );\n\t\t\t\tis_static_width = true;\n\t\t\t} else {\n\t\t\t\t$this.autoResize();\n\t\t\t\tis_static_width = false;\n\t\t\t}\n\t\t\t$this.setDefaultWidgetValue();\n\t\t} );\n\t\treturn this;\n\t};\n\n\t$.fn.TTimePicker.defaults = {};\n\t$.fn.TTimePicker.html_template = `\n\t
\n\t\t\n\t\t\n\t
\n\t`;\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTY4MC5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7QUFDQSx5QkFBeUI7QUFDekI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSx3QkFBd0I7QUFDeEI7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsTUFBTTs7QUFFTixLQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Q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