1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["textarea-TTextArea"],{8917:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TTextArea = function( options ) {\n\t\tvar opts = $.extend( {}, $.fn.TTextArea.defaults, options );\n\t\tvar $this = this;\n\t\tvar field;\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 static_width;\n\t\tvar is_static_width = false;\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( 'readonly', 'true' );\n\t\t\t\t$this.children().attr( 'disabled', 'true' );\n\t\t\t\t$this.addClass( 't-text-area-readonly' );\n\t\t\t} else {\n\t\t\t\t$this.removeAttr( 'readonly' );\n\t\t\t\t$this.children().removeAttr( 'disabled' );\n\t\t\t\t$this.removeClass( 't-text-area-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 = $( ' <div class=\"mass-edit-checkbox-wrapper textarea--mass-edit-checkbox-wrapper\"><input type=\"checkbox\" class=\"mass-edit-checkbox\"></input>' +\n\t\t\t\t\t'<label for=\"checkbox-input-1\" class=\"input-helper input-helper--checkbox\"></label></div>' );\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\tif ( is_static_width && static_width.toString().indexOf( '%' ) > 0 ) {\n\t\t\t\t\t$this.css( 'width', 'calc(' + static_width + ' - 25px)' );\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.setValue = function( val ) {\n\n\t\t\tif ( !val ) {\n\t\t\t\tval = '';\n\t\t\t}\n\n\t\t\t$this.val( val );\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.setField = function( val ) {\n\t\t\tfield = val;\n\t\t};\n\n\t\tthis.getField = function() {\n\t\t\treturn field;\n\t\t};\n\n\t\tthis.getValue = function() {\n\t\t\treturn $this.val();\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\n\t\t\tif ( !val ) {\n\t\t\t\tval = '';\n\t\t\t}\n\n\t\t\t$this.val( val );\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\tif ( o.width && ( o.width > 0 || o.width.indexOf( '%' ) > 0 ) ) {\n\t\t\t\t$this.width( o.width );\n\t\t\t\tstatic_width = o.width;\n\t\t\t\tis_static_width = true;\n\t\t\t}\n\n\t\t\tif ( o.height && ( o.height > 0 || o.height.indexOf( '%' ) > 0 ) ) {\n\t\t\t\t$this.height( o.height );\n\t\t\t}\n\n\t\t\tif ( o.rows > 0 ) {\n\t\t\t\t$this.attr( 'rows', o.rows );\n\t\t\t} else {\n\t\t\t\t$this.attr( 'rows', 3 );\n\t\t\t}\n\n\t\t\tif ( o.style ) {\n\t\t\t\t$this.css( o.style );\n\t\t\t}\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$this.trigger( 'formItemChange', [$this] );\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\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\t$( this ).bind( 'contextmenu', ( function( e ) {\n//\t\t\t\te.preventDefault();\n//\t\t\t}) );\n\n\t\t\t$( this ).focusin( 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} 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\t$( this ).focusout( 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.TTextArea.defaults = {};\n\t$.fn.TTextArea.html_template = `<textarea class=\"t-text-area\"></textarea>`;\n\t$.fn.TTextArea.tinymce_html_template = `<textarea class=\"t-text-area tinymce-text-area\"><%= description %></textarea>`;\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODkxNy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