"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["switch_button-SwitchButton"],{6618:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SwitchButtonIcon\": () => (/* binding */ SwitchButtonIcon)\n/* harmony export */ });\n/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.SwitchButton = function( options ) {\n\n\t\tGlobal.addCss( 'global/widgets/switch_button/SwitchButton.css' );\n\t\tvar opts = $.extend( {}, $.fn.SwitchButton.defaults, options );\n\n\t\tvar $this = this;\n\n\t\tvar btn = 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.setEnable = function( val ) {\n\t\t\tenabled = val;\n\n\t\t\tif ( !val ) {\n\t\t\t\tthis.removeClass( 'disable-element' ).addClass( 'disable-element' );\n\t\t\t} else {\n\t\t\t\tthis.removeClass( 'disable-element' );\n\t\t\t}\n\n\t\t};\n\n\t\t//Error: TypeError: btn is null in /interface/html5/global/widgets/switch_button/SwitchButton.js?v=9.0.0-20150822-212724 line 31\n\t\tthis.getValue = function( return_number ) {\n\t\t\tif ( return_number ) {\n\t\t\t\treturn ( btn && btn.hasClass( 'selected' ) ) ? 1 : 0;\n\t\t\t} else {\n\t\t\t\treturn ( btn && btn.hasClass( 'selected' ) ) ? true : false;\n\t\t\t}\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\n\t\t\t//Error: TypeError: btn is null in /interface/html5/global/widgets/switch_button/SwitchButton.js?v=8.0.0-20141230-130626 line 35\n\t\t\tif ( !btn ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tbtn.removeClass( 'selected' );\n\n\t\t\tif ( val ) {\n\t\t\t\tbtn.addClass( 'selected' );\n\t\t\t}\n\t\t};\n\n\t\tthis.setIcon = function( val ) {\n\t\t\tbtn.addClass( 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\tbtn = $( '
' );\n\n\t\t\t$this.append( btn );\n\n\t\t\tif ( o.tooltip ) {\n\t\t\t\tbtn.attr( 'title', o.tooltip );\n\t\t\t}\n\n\t\t\t$this.setIcon( o.icon );\n\n\t\t\tbtn.click( function( e ) {\n\n\t\t\t\tif ( !enabled ) {\n\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$this.setValue( !$this.getValue() );\n\t\t\t} );\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.SwitchButton.defaults = {};\n\n} )( jQuery );\n\nvar SwitchButtonIcon = function() {\n\n};\n\nSwitchButtonIcon.daily_total = 'daily';\nSwitchButtonIcon.weekly_total = 'weekly';\nSwitchButtonIcon.all_employee = 'all-employee';\nSwitchButtonIcon.strict_range = 'strict-range';\nSwitchButtonIcon.wages = 'strict-range';//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjYxOC5qcyIsIm1hcHBpbmdzIjoiOzs7OztBQUFBOztBQUVBOztBQUVBO0FBQ0EseUJBQXlCOztBQUV6Qjs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQSxLQUFLO0FBQ0w7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQSxnQ0FBZ0M7O0FBRWhDOztBQUVBOztBQUVBO0FBQ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