TimeTrex/interface/html5/dist/developer_tools-WidgetTestViewController.bundle.js

1 line
87 KiB
JavaScript

(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["developer_tools-WidgetTestViewController","filebrowser-TImage","filebrowser-TImageAdvBrowser","switch_button-SwitchButton"],{1469:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TImage = function( options ) {\n\n\t\tGlobal.addCss( 'global/widgets/filebrowser/TImageBrowser.css' );\n\t\tvar opts = $.extend( {}, $.fn.TImage.defaults, options );\n\n\t\tvar $this = this;\n\t\tvar field;\n\n\t\tthis.clearErrorStyle = function() {\n\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 null;\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\t\t\tif ( !val ) {\n\t\t\t\tthis.attr( 'src', '' );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar d = new Date();\n\t\t\tthis.attr( 'src', val + '&t=' + d.getTime() );\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} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.TImage.defaults = {};\n\n\t$( document ).on( 'mouseover', '.file-browser img', function( e ) {\n\t\tvar $this_image_widget = $( e.target ).parents( '.file-browser' );\n\n\t\tif ( !$( '.file_browser_overlay' )[0] && $( e.target ).attr( 'enable-delete' ) == 1 ) {\n\t\t\tvar height = $( e.target ).height();\n\t\t\tvar top = ( height - 32 ) / 2;\n\t\t\tvar left = top;\n\n\t\t\tvar file_browser_overlay = $( '<div class=\"file_browser_overlay\"><img src=\"theme/default/images/delete-512.png\" style=\"position:absolute;width:32px;height:32px;top:' + top + 'px;left:' + left + 'px;\"></div>' );\n\t\t\tfile_browser_overlay.css( 'position', 'absolute' );\n\t\t\tfile_browser_overlay.css( 'top', '0px' );\n\t\t\tfile_browser_overlay.css( 'left', '0' );\n\t\t\tfile_browser_overlay.css( 'cursor', 'pointer' );\n\t\t\tfile_browser_overlay.css( 'height', height + 'px' );\n\t\t\tfile_browser_overlay.css( 'width', '100%' );\n\t\t\tfile_browser_overlay.css( 'background', 'rgba(255,255,255,0.85)' );\n\n\t\t\t$( e.target ).parents( '.file-browser' ).append( file_browser_overlay );\n\n\t\t\t$( document ).on( 'click', '.file_browser_overlay', function( e ) {\n\t\t\t\tvar img_src = $( e.target ).parent().find( 'img' ).attr( 'src' );\n\t\t\t\tTAlertManager.showConfirmAlert( $.i18n._( 'This will permanently delete the image. Are you sure?' ), '', function( flag ) {\n\t\t\t\t\tif ( flag ) {\n\t\t\t\t\t\tvar e = { type: 'deleteClick', message: 'Delete image clicked.', time: new Date() };\n\t\t\t\t\t\t$this_image_widget.trigger( e );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\t$( document ).on( 'mouseleave', '.file-browser', function() {\n\t\t\t\t$( document ).off( 'click', '.file_browser_overlay' );\n\t\t\t\tif ( $( '.file_browser_overlay' )[0] ) {\n\t\t\t\t\tvar file_browser_overlay = $( this ).find( '.file_browser_overlay' );\n\t\t\t\t\tfile_browser_overlay.off().remove();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQ2OS5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7O0FBRUE7QUFDQSx5QkFBeUI7O0FBRXpCO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQS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,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TImageAdvBrowser = function( options ) {\n\n\t\tGlobal.addCss( 'global/widgets/filebrowser/TImageBrowser.css' );\n\t\tvar opts = $.extend( {}, $.fn.TImageAdvBrowser.defaults, options );\n\n\t\tvar $this = this;\n\t\tvar field;\n\t\tvar name = 'filedata';\n\n\t\tvar accept_filter = '';\n\n\t\tvar default_width = 177;\n\t\tvar default_height = 42;\n\n\t\tvar callBack = null;\n\n\t\tvar enabled = true;\n\n\t\tvar image;\n\n\t\tvar result_form_data;\n\n\t\tthis.setEnable = function( val ) {\n\t\t\tenabled = val;\n\n\t\t\tvar btn = this.children().eq( 1 );\n\t\t\tif ( !val ) {\n\t\t\t\tbtn.hide();\n\t\t\t} else {\n\t\t\t\tbtn.show();\n\t\t\t}\n\n\t\t};\n\n\t\tthis.clearErrorStyle = function() {\n\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 result_form_data;\n\t\t};\n\n\t\tthis.setImage = function( val ) {\n\t\t\tif ( !val ) {\n\t\t\t\timage.attr( 'src', '' );\n\t\t\t\timage.hide();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar d = new Date();\n\t\t\timage.hide();\n\t\t\timage.attr( 'src', val + '&t=' + d.getTime() + '&X-CSRF-Token=' + getCookie( 'CSRF-Token' ) );\n\t\t\timage.css( 'height', 'auto' );\n\t\t\timage.css( 'width', 'auto' );\n\n\t\t};\n\n\t\tthis.onImageLoad = function( image ) {\n\n\t\t\tvar image_height = $( image ).height() > 0 ? $( image ).height() : image.naturalHeight;\n\t\t\tvar image_width = $( image ).width() > 0 ? $( image ).width() : image.naturalWidth;\n\n\t\t\tif ( image_height > default_height ) {\n\t\t\t\t$( image ).css( 'height', default_height );\n\n\t\t\t}\n\n\t\t\tif ( image_width > default_width ) {\n\t\t\t\t$( image ).css( 'width', default_width );\n\t\t\t\t$( image ).css( 'height', 'auto' );\n\t\t\t}\n\n\t\t\t$this.trigger( 'setSize' );\n\n\t\t\tif ( image_height < 5 ) {\n\t\t\t\t$( image ).hide();\n\t\t\t} else {\n\t\t\t\t$( image ).show();\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};\n\n\t\tthis.setEnableDelete = function( val ) {\n\t\t\tvar image = $this.find( '.image' );\n\t\t\tif ( !val ) {\n\t\t\t\timage.removeAttr( 'enable-delete' );\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\timage.attr( 'enable-delete', 1 );\n\t\t\t}\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\tvar $$this = this;\n\n\t\t\t$( this ).find( '#upload_image' ).text( $.i18n._( 'Upload Image' ) );\n\n\t\t\tif ( o.callBack ) {\n\t\t\t\tcallBack = o.callBack;\n\t\t\t}\n\n\t\t\tif ( o.show_browser === false ) {\n\t\t\t\t$( this ).children().eq( 1 ).hide();\n\t\t\t}\n\n\t\t\tif ( o.default_width > 0 ) {\n\t\t\t\tdefault_width = o.default_width;\n\t\t\t}\n\n\t\t\tif ( o.default_height > 0 ) {\n\t\t\t\tdefault_height = o.default_height;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( o.name ) ) {\n\t\t\t\tname = o.name;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( accept_filter ) ) {\n\t\t\t\taccept_filter = o.accept_filter;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( o.deleteImageHandler ) ) {\n\t\t\t\t$this.find( '.file-browser' ).on( 'deleteClick', function() {\n\t\t\t\t\to.deleteImageHandler();\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\tvar browser = $( this ).children().eq( 1 );\n\t\t\tbrowser.bind( 'click', function() {\n\t\t\t\tIndexViewController.openWizard( 'UserPhotoWizard', null, function( form_data ) {\n\n\t\t\t\t\tif ( callBack ) {\n\t\t\t\t\t\tcallBack( form_data );\n\t\t\t\t\t}\n\n\t\t\t\t\tresult_form_data = form_data;\n\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\timage = $( this ).children().eq( 0 );\n\t\t\timage.on( 'load', function() {\n\t\t\t\t$this.onImageLoad( this );\n\t\t\t} );\n\n\t\t\timage.hide();\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.TImageAdvBrowser.defaults = {};\n\t$.fn.TImageAdvBrowser.html_template = `\n\t<div class=\"file-browser\">\n\t\t<img class=\"image\">\n\t\t<button id=\"upload_image\" class=\"t-button file-browser-btn\" style=\"display: block\"></button>\n\t</div>\n\t`;\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODI0My5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7O0FBRUE7QUFDQSx5QkFBeUI7O0FBRXpCO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBLEtBQUs7QUFDTDtBQUNBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7Q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Fx0cmVzdWx0X2Zvcm1fZGF0YSA9IGZvcm1fZGF0YTtcblxuXHRcdFx0XHR9ICk7XG5cdFx0XHR9ICk7XG5cblx0XHRcdGltYWdlID0gJCggdGhpcyApLmNoaWxkcmVuKCkuZXEoIDAgKTtcblx0XHRcdGltYWdlLm9uKCAnbG9hZCcsIGZ1bmN0aW9uKCkge1xuXHRcdFx0XHQkdGhpcy5vbkltYWdlTG9hZCggdGhpcyApO1xuXHRcdFx0fSApO1xuXG5cdFx0XHRpbWFnZS5oaWRlKCk7XG5cblx0XHR9ICk7XG5cblx0XHRyZXR1cm4gdGhpcztcblxuXHR9O1xuXG5cdCQuZm4uVEltYWdlQWR2QnJvd3Nlci5kZWZhdWx0cyA9IHt9O1xuXHQkLmZuLlRJbWFnZUFkdkJyb3dzZXIuaHRtbF90ZW1wbGF0ZSA9IGBcblx0PGRpdiBjbGFzcz1cImZpbGUtYnJvd3NlclwiPlxuXHRcdDxpbWcgY2xhc3M9XCJpbWFnZVwiPlxuXHRcdDxidXR0b24gaWQ9XCJ1cGxvYWRfaW1hZ2VcIiBjbGFzcz1cInQtYnV0dG9uIGZpbGUtYnJvd3Nlci1idG5cIiBzdHlsZT1cImRpc3BsYXk6IGJsb2NrXCI+PC9idXR0b24+XG5cdDwvZGl2PlxuXHRgO1xuXG59ICkoIGpRdWVyeSApOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///8243\n")},6618:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";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 = $( '<div></div>' );\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjYxOC5qcyIsIm1hcHBpbmdzIjoiOzs7OztBQUFBOztBQUVBOztBQUVBO0FBQ0EseUJBQXlCOztBQUV6Qjs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQSxLQUFLO0FBQ0w7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQSxnQ0FBZ0M7O0FBRWhDOztBQUVBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsS0FBSzs7QUFFTCxJQUFJOztBQUVKOztBQUVBOztBQUVBOztBQUVBLEVBQUUsR0FBRyxNQUFNOztBQUVKOztBQUVQOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9pbnRlcmZhY2UvaHRtbDUvZ2xvYmFsL3dpZGdldHMvc3dpdGNoX2J1dHRvbi9Td2l0Y2hCdXR0b24uanM/N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vb2x0aXAgKSB7XG5cdFx0XHRcdGJ0bi5hdHRyKCAndGl0bGUnLCBvLnRvb2x0aXAgKTtcblx0XHRcdH1cblxuXHRcdFx0JHRoaXMuc2V0SWNvbiggby5pY29uICk7XG5cblx0XHRcdGJ0bi5jbGljayggZnVuY3Rpb24oIGUgKSB7XG5cblx0XHRcdFx0aWYgKCAhZW5hYmxlZCApIHtcblx0XHRcdFx0XHRlLnN0b3BJbW1lZGlhdGVQcm9wYWdhdGlvbigpO1xuXHRcdFx0XHRcdGUuc3RvcFByb3BhZ2F0aW9uKCk7XG5cdFx0XHRcdFx0cmV0dXJuO1xuXHRcdFx0XHR9XG5cblx0XHRcdFx0JHRoaXMuc2V0VmFsdWUoICEkdGhpcy5nZXRWYWx1ZSgpICk7XG5cdFx0XHR9ICk7XG5cblx0XHR9ICk7XG5cblx0XHRyZXR1cm4gdGhpcztcblxuXHR9O1xuXG5cdCQuZm4uU3dpdGNoQnV0dG9uLmRlZmF1bHRzID0ge307XG5cbn0gKSggalF1ZXJ5ICk7XG5cbmV4cG9ydCB2YXIgU3dpdGNoQnV0dG9uSWNvbiA9IGZ1bmN0aW9uKCkge1xuXG59O1xuXG5Td2l0Y2hCdXR0b25JY29uLmRhaWx5X3RvdGFsID0gJ2RhaWx5JztcblN3aXRjaEJ1dHRvbkljb24ud2Vla2x5X3RvdGFsID0gJ3dlZWtseSc7XG5Td2l0Y2hCdXR0b25JY29uLmFsbF9lbXBsb3llZSA9ICdhbGwtZW1wbG95ZWUnO1xuU3dpdGNoQnV0dG9uSWNvbi5zdHJpY3RfcmFuZ2UgPSAnc3RyaWN0LXJhbmdlJztcblN3aXRjaEJ1dHRvbkljb24ud2FnZXMgPSAnc3RyaWN0LXJhbmdlJzsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///6618\n")},2911:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"WidgetTestViewController\": () => (/* binding */ WidgetTestViewController)\n/* harmony export */ });\n/* harmony import */ var _global_widgets_filebrowser_TImage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1469);\n/* harmony import */ var _global_widgets_filebrowser_TImage__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_global_widgets_filebrowser_TImage__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _global_widgets_filebrowser_TImageAdvBrowser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8243);\n/* harmony import */ var _global_widgets_filebrowser_TImageAdvBrowser__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_global_widgets_filebrowser_TImageAdvBrowser__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _global_widgets_color_picker_TColorPicker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3161);\n/* harmony import */ var _global_widgets_switch_button_SwitchButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6618);\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\n\n\n\n\n\nclass WidgetTestViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#awesomebox_test_view_container',\n\n\t\t\t// _required_files: [\n\t\t\t// \t'TColorPicker',\n\t\t\t// \t'TImage',\n\t\t\t// \t'TImageAdvBrowser'\n\t\t\t// ],\n\n\t\t\tuser_api: null,\n\t\t\tuser_group_api: null,\n\t\t\tcompany_api: null,\n\t\t\tuser_id_array: null\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\tthis.edit_view_tpl = 'WidgetTestEditView.html';\n\t\tthis.permission_id = 'user';\n\t\tthis.viewId = 'WidgetTest';\n\t\tthis.script_name = 'WidgetTest';\n\t\tthis.table_name_key = 'awesomebox_test';\n\t\tthis.context_menu_name = $.i18n._( 'Widget Test' );\n\t\tthis.navigation_label = $.i18n._( 'Widget Test' );\n\t\tthis.api = TTAPI.APIUser;\n\t\tthis.select_company_id = LocalCacheData.getCurrentCompany().id;\n\t\tthis.user_group_api = TTAPI.APIUserGroup;\n\t\tthis.company_api = TTAPI.APICompany;\n\t\tthis.user_id_array = [];\n\n\t\tthis.render();\n\t\tthis.buildContextMenu();\n\t\tthis.initData();\n\t}\n\n\tsetCurrentEditRecordData() {\n\t\tthis.collectUIDataToCurrentEditRecord();\n\t\tthis.setEditViewDataDone();\n\t}\n\n\tclearEditViewData() {\n\t\treturn false;\n\t}\n\n\tbuildEditViewUI() {\n\t\tvar $this = this;\n\n\t\tif( ContextMenuManager.getMenu( this.determineContextMenuMountAttributes().id ) === undefined ) {\n\t\t\tthis.buildContextMenu();\n\t\t} else {\n\t\t\tDebug.Warn( 'Context Menu ('+ this.determineContextMenuMountAttributes().id +') already exists for: '+ this.viewId, 'AwesomeBoxTestView.js', 'AwesomeBoxTestView', 'buildEditViewUI', 10 );\n\t\t}\n\n\t\tvar tab_model = {\n\t\t\t'tab_employee': { 'label': $.i18n._( 'Employee' ) },\n\t\t};\n\t\tthis.setTabModel( tab_model );\n\n\t\t//Tab 0 start\n\n\t\tvar tab_employee = this.edit_view_tab.find( '#tab_employee' );\n\n\t\tvar tab_employee_column1 = tab_employee.find( '.first-column' );\n\t\tvar tab_employee_column2 = tab_employee.find( '.second-column' );\n\n\t\tthis.edit_view_tabs[0] = [];\n\t\tthis.edit_view_tabs[0].push( tab_employee_column1 );\n\n\t\tvar form_item_input = Global.loadWidgetByName( FormItemType.SEPARATED_BOX );\n\t\tform_item_input.SeparatedBox( { label: $.i18n._( 'Separated_box: if you see this, the test is passing.' ) } );\n\t\tthis.addEditFieldToColumn( null, form_item_input, tab_employee_column1 );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\tform_item_input.TCheckbox( { field: 'checkbox' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'TCheckbox' ), form_item_input, tab_employee_column1, '' );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COLOR_PICKER );\n\t\tform_item_input.TColorPicker( { field: 'color_picker' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'TColorPicker' ), form_item_input, tab_employee_column1 );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.TDatePicker( { field: 'datepicker' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'TDatePicker' ), form_item_input, tab_employee_column1, '', null );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.TRangePicker( { field: 'daterange', validation_field: 'date_stamp' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'TDateRange' ), form_item_input, tab_employee_column1, '', null, true );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TIME_PICKER );\n\t\tform_item_input.TTimePicker( { field: 'timepicker' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'TTimePicker' ), form_item_input, tab_employee_column1 );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.IMAGE_AVD_BROWSER );\n\t\tthis.file_browser = form_item_input.TImageAdvBrowser( {\n\t\t\tfield: 'imagebrowser',\n\t\t\tdefault_width: 128,\n\t\t\tdefault_height: 128,\n\t\t\tenable_delete: true,\n\t\t\tcallBack: function( form_data ) {\n\t\t\t\tnew ServiceCaller().uploadFile( form_data, 'object_type=user_photo&object_id=' + $this.current_edit_record.id, {\n\t\t\t\t\tonResult: function( result ) {\n\n\t\t\t\t\t\tif ( result.toLowerCase() === 'true' ) {\n\t\t\t\t\t\t\t$this.file_browser.setImage( ServiceCaller.getURLByObjectType( 'user_photo' ) + '&object_id=' + $this.current_edit_record.id );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tTAlertManager.showAlert( result, 'Error' );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t},\n\t\t\tdeleteImageHandler: function( e ) {\n\t\t\t\t$this.onDeleteImage();\n\t\t\t}\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'TImageAdvBrowser' ), this.file_browser, tab_employee_column1, '', null, false, true );\n\n\t\tGlobal.loadScript( 'global/widgets/formula_builder/FormulaBuilder.js', function() {\n\t\t\t// Dynamic Field 11\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.FORMULA_BUILDER );\n\t\t\tform_item_input.FormulaBuilder( {\n\t\t\t\tfield: 'formula', width: '100%', onFormulaBtnClick: function() {\n\n\t\t\t\t\tvar custom_column_api = TTAPI.APIReportCustomColumn;\n\n\t\t\t\t\tcustom_column_api.getOptions( 'formula_functions', {\n\t\t\t\t\t\tonResult: function( fun_result ) {\n\t\t\t\t\t\t\tvar fun_res_data = fun_result.getResult();\n\n\t\t\t\t\t\t\t$this.api.getOptions( 'formula_variables', { onResult: onColumnsResult } );\n\n\t\t\t\t\t\t\tfunction onColumnsResult( col_result ) {\n\t\t\t\t\t\t\t\tvar col_res_data = col_result.getResult();\n\n\t\t\t\t\t\t\t\tvar default_args = {};\n\t\t\t\t\t\t\t\tdefault_args.functions = Global.buildRecordArray( fun_res_data );\n\t\t\t\t\t\t\t\tdefault_args.variables = Global.buildRecordArray( col_res_data );\n\t\t\t\t\t\t\t\tdefault_args.formula = $this.current_edit_record.company_value1;\n\t\t\t\t\t\t\t\tdefault_args.current_edit_record = Global.clone( $this.current_edit_record );\n\t\t\t\t\t\t\t\tdefault_args.api = $this.api;\n\n\t\t\t\t\t\t\t\tIndexViewController.openWizard( 'FormulaBuilderWizard', default_args, function( val ) {\n\t\t\t\t\t\t\t\t\t$this.current_edit_record.company_value1 = val;\n\t\t\t\t\t\t\t\t\t$this.edit_view_ui_dic.df_11.setValue( val );\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t\t$this.detachElement( 'df_11' );\n\t\t\t$this.addEditFieldToColumn( 'FormulaBuilder', form_item_input, tab_employee_column1, '', null, true );\n\t\t\tform_item_input.parent().width( '45%' );\n\t\t} );\n\n\t\t//NO INSTANCES OF TList\n\n\t\t//Create action switch buttons\n\t\tvar action_chooser_div = $( '.control-bar .action-chooser-div' );\n\t\tthis.all_employee_btn = action_chooser_div.find( '#all_employee' );\n\t\tthis.daily_totals_btn = action_chooser_div.find( '#daily_totals' );\n\t\tthis.weekly_totals_btn = action_chooser_div.find( '#weekly_totals' );\n\t\tthis.strict_range_btn = action_chooser_div.find( '#strict_range' );\n\t\tthis.all_employee_btn = this.all_employee_btn.SwitchButton( {\n\t\t\ticon: _global_widgets_switch_button_SwitchButton__WEBPACK_IMPORTED_MODULE_3__.SwitchButtonIcon.all_employee,\n\t\t\ttooltip: $.i18n._( 'Show Unscheduled Employees' )\n\t\t} );\n\t\tthis.daily_totals_btn = this.daily_totals_btn.SwitchButton( {\n\t\t\ticon: _global_widgets_switch_button_SwitchButton__WEBPACK_IMPORTED_MODULE_3__.SwitchButtonIcon.daily_total,\n\t\t\ttooltip: $.i18n._( 'Daily Totals' )\n\t\t} );\n\t\tthis.weekly_totals_btn = this.weekly_totals_btn.SwitchButton( {\n\t\t\ticon: _global_widgets_switch_button_SwitchButton__WEBPACK_IMPORTED_MODULE_3__.SwitchButtonIcon.weekly_total,\n\t\t\ttooltip: $.i18n._( 'Weekly Totals' )\n\t\t} );\n\t\tthis.strict_range_btn = this.strict_range_btn.SwitchButton( {\n\t\t\ticon: _global_widgets_switch_button_SwitchButton__WEBPACK_IMPORTED_MODULE_3__.SwitchButtonIcon.strict_range,\n\t\t\ttooltip: $.i18n._( 'Strict Range' )\n\t\t} );\n\t\tthis.all_employee_btn.click( function() {\n\t\t\t// $this.onShowEmployeeClick();\n\t\t} );\n\t\tthis.daily_totals_btn.click( function() {\n\t\t\t// $this.onDailyTotalsClick();\n\t\t} );\n\t\tthis.weekly_totals_btn.click( function() {\n\t\t\t// $this.onWeeklyTotalClick();\n\t\t} );\n\t\tthis.strict_range_btn.setValue( true );\n\t\tthis.strict_range_btn.click( function() {\n\t\t\t// $this.onStrictRangeClick();\n\t\t} );\n\t\tthis.toggle_button = $( this.el ).find( '.toggle-button-div' );\n\t\tvar data_provider = [\n\t\t\t{ label: $.i18n._( 'Day' ), value: 'day' },\n\t\t\t{ label: $.i18n._( 'Week' ), value: 'week' },\n\t\t\t{ label: $.i18n._( 'Month' ), value: 'month' },\n\t\t\t{ label: $.i18n._( 'Year' ), value: 'year' }\n\t\t];\n\n\t\tthis.toggle_button = this.toggle_button.TToggleButton( { data_provider: data_provider } );\n\t\tthis.toggle_button.bind( 'change', function( e, result ) {\n\t\t\t$this.scroll_position = 0;\n\t\t\t$this.select_all_shifts_array = [];\n\t\t\t$this.select_shifts_array = [];\n\t\t\t$this.select_recurring_shifts_array = [];\n\t\t} );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TAG_INPUT );\n\t\tform_item_input.TTagInput( { field: 'tags', object_type_id: 930 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'TTagInput' ), form_item_input, tab_employee_column2, '', null, null, true );\n\n\t\t//requires width manipulation or intermittently won't show.\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'text', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'TText' ), form_item_input, tab_employee_column2 );\n\t\tform_item_input.parent().width( '45%' );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.PASSWORD_INPUT );\n\t\tform_item_input.TPasswordInput( { field: 'password', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'TPasswordInput' ), form_item_input, tab_employee_column2 );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_AREA );\n\t\tform_item_input.TTextArea( { field: 'textarea' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'TTextArea' ), form_item_input, tab_employee_column2, '', null, null, true );\n\t}\n\n\tbuildSearchFields() {\n\t\tsuper.buildSearchFields();\n\t\tvar $this = this;\n\t\tthis.search_fields = [];\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\texclude: ['default'],\n\t\t\tinclude: [\n\t\t\t\t'edit',\n\t\t\t\t'cancel'\n\t\t\t]\n\t\t};\n\n\t\treturn context_menu_model;\n\t}\n\n\t//override that forces same data to grid at all times.\n\tsearch() {\n\t\tvar $this = this;\n\t\tthis.api.getUser( {}, true, {\n\t\t\tonResult: function( r ) {\n\t\t\t\tvar result_data = r.getResult();\n\t\t\t\t$this.user_id_array = result_data;\n\t\t\t\tresult_data = $this.processResultData( result_data );\n\t\t\t\t$this.grid.setData( result_data );\n\t\t\t\t$this.grid.setGridColumnsWidth();\n\t\t\t\t$this.onEditClick( result_data[0].id );\n\t\t\t}\n\t\t} );\n\t}\n\n\tsetEditViewDataDone() {\n\t\tvar $this = this;\n\t\tsetTimeout( function() {\n\t\t\tTAlertManager.showConfirmAlert( $.i18n._( 'Run tests?' ), null, function( result ) {\n\t\t\t\tif ( result == true ) {\n\t\t\t\t\t$this.runTests();\n\t\t\t\t}\n\t\t\t} );\n\t\t\t$this.setTabOVisibility( true );\n\t\t\t$( '.edit-view-tab-bar' ).css( 'opacity', 1 );\n\t\t\tTTPromise.resolve( 'init', 'init' );\n\t\t}, 2500 );\n\n\t\tsuper.setEditViewDataDone();\n\t}\n\n\trunTests() {\n\t\tvar $this = this;\n\t\tif ( $( '#qunit_script' ).length == 0 ) {\n\t\t\t$( '<script id=\\'qunit_script\\' src=\\'framework/qunit/qunit.js\\'><\/script>' ).appendTo( 'head' );\n\t\t\t$( '<link rel=\\'stylesheet\\' type=\\'text/css\\' href=\\'framework/qunit/qunit.css\\'>' ).appendTo( 'head' );\n\t\t}\n\t\t;\n\n\t\tQUnit.config.autostart = false;\n\t\t$( '#qunit_container' ).css( 'width', '100%' );\n\t\t$( '#qunit_container' ).css( 'height', 'auto' );\n\t\t$( '#qunit_container' ).css( 'overflow-y', 'scroll' );\n\t\t$( '#qunit_container' ).css( 'top', '0px' );\n\t\t$( '#qunit_container' ).css( 'left', '0px' );\n\t\t$( '#qunit_container' ).css( 'z-index', '100' );\n\t\t$( '#qunit_container' ).css( 'background', '#fff' );\n\t\t$( '#qunit_container' ).show();\n\n\t\t$( '#tt_debug_console' ).remove();\n\t\tif ( !window.qunit_initiated ) {\n\t\t\twindow.qunit_initiated = true;\n\t\t\t//QUnit.start(); //This causes a JavaScript exception, but does not seem to be required. Test ran without it.\n\t\t}\n\n\t\t//select an item by clicking a td in the last row\n\t\tQUnit.module( 'Widgets' );\n\t\tthis.testCheckbox();\n\t\tthis.testColorPicker();\n\n\t\tTTPromise.add( 'datetests', 'picker' );\n\t\tTTPromise.add( 'datetests', 'range' );\n\t\tthis.testDatePicker();\n\t\tthis.testDateRange();\n\t\t//as timepicker is a date picker with alt options enabled, it must be triggered after the date tests are done or the selectors will collide and possibly provide false positives\n\t\tTTPromise.wait( 'datetests', null, function() {\n\t\t\t$this.testTimePicker();\n\t\t} );\n\n\t\tTTPromise.add( 'wizardtests', 'imagebrowser' );\n\t\tthis.testImageBrowser();\n\t\tTTPromise.wait( 'wizardtests', 'imagebrowser', function() {\n\t\t\t$this.testFormulaBuilder();\n\t\t} );\n\n\t\tTTPromise.wait( 'null', 'null', function() {\n\t\t\t$this.testTags();\n\t\t} );\n\n\t\tthis.testButtons();\n\t\tthis.testText();\n\t\tthis.testPassword();\n\t\tthis.testTextarea();\n\n\t\t//Extra tests that should be added to test non-form widgets\n\t\t//todo: TAlert\n\t\t//todo: inside_editor\n\t\t//todo: error tips\n\t\t//todo: test feedback widget\n\t\t//todo: live_chat\n\t\t//todo: paging\n\t\t//todo: search_panel\n\t\t//todo: top_notification\n\t\t//todo: view_min_tab\n\t}\n\n\ttestCheckbox() {\n\t\tvar $this = this;\n\t\tQUnit.test( 'Checkbox tests', function( assert ) {\n\t\t\tvar cb = $this.edit_view_ui_dic.checkbox;\n\t\t\tassert.ok( cb.getValue() == false, 'checkbox not checked' );\n\t\t\tcb.setValue( true );\n\t\t\tassert.ok( cb.getValue(), 'checkbox checked via code' );\n\t\t\tcb.setValue( false );\n\t\t\tassert.ok( cb.getValue() == false, 'checkbox unchecked via code' );\n\t\t\t$( cb ).click();\n\t\t\tassert.ok( cb.getValue(), 'checkbox checked via click' );\n\t\t\t$( cb ).click();\n\t\t\tassert.ok( cb.getValue() == false, 'checkbox unchecked via click' );\n\t\t} );\n\t}\n\n\ttestColorPicker() {\n\t\tvar $this = this;\n\t\tQUnit.test( 'ColorPicker tests', function( assert ) {\n\t\t\tvar done_testing = assert.async();\n\t\t\tvar widget = $this.edit_view_ui_dic.color_picker;\n\t\t\tassert.ok( widget.getValue() == '', 'widget empty' );\n\t\t\t$( widget ).click();\n\n\t\t\tsetTimeout( function() {\n\t\t\t\t$( '.cp-color-picker' ).hide();\n\t\t\t\tassert.ok( widget.getValue() == 'FFFFFF', 'widget white after no select: ' + widget.getValue() );\n\t\t\t\twidget.setValue( 'FF0000' );\n\t\t\t\tassert.ok( widget.getValue() == 'FF0000', 'widget red after set value programatically' + widget.getValue() );\n\n\t\t\t\t$( widget ).click();\n\t\t\t\t//there's no color selection by click because it's based on mouseup and mousedown events which can't be simulated at specific coordinates\n\n\t\t\t\t$( '.cp-color-picker' ).hide();\n\t\t\t\tdone_testing();\n\t\t\t}, 1000 );\n\t\t} );\n\t}\n\n\ttestDatePicker() {\n\t\tvar $this = this;\n\t\tQUnit.test( 'DatePicker tests', function( assert ) {\n\t\t\tvar done_testing = assert.async();\n\t\t\tvar widget = $this.edit_view_ui_dic.datepicker;\n\t\t\tassert.ok( widget.getValue() == '', 'widget empty' );\n\t\t\tsetTimeout( function() {\n\t\t\t\twidget.find( '#tDatePickerIcon' ).trigger( 'mouseup' );\n\t\t\t\tassert.ok( ( $( '#ui-datepicker-div:visible' ).length > 0 ), 'calendar visible after click' );\n\t\t\t\t$( $( '#ui-datepicker-div .ui-datepicker-calendar td' )[15] ).click();\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\tassert.ok( ( $( '#ui-datepicker-div:visible' ).length == 0 ), 'calendar invisible after date selection' );\n\t\t\t\t\tassert.ok( widget.getValue() != '', 'value is not blank' );\n\t\t\t\t\tTTPromise.resolve( 'datetests', 'picker' );\n\n\t\t\t\t\tdone_testing();\n\t\t\t\t}, 1000 );\n\t\t\t}, 1000 );\n\t\t} );\n\t}\n\n\ttestDateRange() {\n\t\tvar $this = this;\n\t\tQUnit.test( 'DateRange tests', function( assert ) {\n\t\t\tvar done_testing = assert.async();\n\t\t\tvar widget = $this.edit_view_ui_dic.daterange;\n\t\t\tassert.ok( typeof widget.getValue() == 'undefined', 'widget empty ' + widget.getValue() );\n\t\t\twidget.find( '#tDatePickerIcon' ).trigger( 'mouseup' );\n\t\t\tsetTimeout( function() {\n\t\t\t\tassert.ok( ( $( '.t-range-picker-div:visible' ).length > 0 ), 'calendar visible after click' );\n\t\t\t\t$( $( '.t-range-picker-div .end-picker td' )[15] ).click();\n\t\t\t\t$( '.t-range-picker-div .close-icon' ).click();\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\tassert.ok( ( $( '.t-range-picker-div:visible' ).length == 0 ), 'calendar invisible after closing' );\n\t\t\t\t\tassert.ok( widget.getValue() != '', 'value is not blank' );\n\t\t\t\t\tdone_testing();\n\t\t\t\t\tTTPromise.resolve( 'datetests', 'range' );\n\t\t\t\t}, 1000 );\n\t\t\t}, 1000 );\n\t\t} );\n\t}\n\n\ttestTimePicker() {\n\t\tvar $this = this;\n\t\tQUnit.test( 'TimePicker tests', function( assert ) {\n\t\t\tvar widget = $this.edit_view_ui_dic.timepicker;\n\t\t\tassert.ok( widget.getValue() == '', 'widget empty: ' + widget.getValue() );\n\t\t\twidget.find( '#tTimePickerIcon' ).trigger( 'mouseup' );\n\t\t\tassert.ok( ( $( '#ui-datepicker-div:visible' ).length > 0 ), 'timepicker widget visible after click' );\n\t\t\t$( '#ui-datepicker-div:visible button[data-handler=\"today\"]' ).click();\n\t\t\tassert.ok( ( $( '#ui-datepicker-div:visible' ).length > 0 ), 'timepicker widget visible after now click' );\n\t\t\t$( '#ui-datepicker-div:visible button[data-handler=\"hide\"]' ).click();\n\t\t\tassert.ok( ( $( '#ui-datepicker-div:visible' ).length == 0 ), 'timepicker widget gone clicking close button' );\n\t\t\tassert.ok( widget.getValue() != '', 'value is not blank' );\n\t\t} );\n\t}\n\n\ttestImageBrowser() {\n\t\tvar $this = this;\n\t\tTTPromise.add( '' );\n\t\tQUnit.test( 'ImageBrowser tests', function( assert ) {\n\t\t\tvar done_testing = assert.async();\n\t\t\tvar widget = $this.edit_view_ui_dic.imagebrowser;\n\t\t\tassert.ok( typeof widget.getValue() == 'undefined', 'widget empty: ' + widget.getValue() );\n\t\t\twidget.find( '#upload_image' ).click();\n\t\t\tsetTimeout( function() {\n\t\t\t\tassert.ok( $( '.wizard:visible' ).length > 0, 'wizard visible' );\n\t\t\t\t$( '.wizard:visible .close-btn' ).click();\n\t\t\t\tassert.ok( $( '.wizard:visible' ).length == 0, 'wizard invisible' );\n\t\t\t\tdone_testing();\n\t\t\t\tTTPromise.resolve( 'wizardtests', 'imagebrowser' );\n\t\t\t}, 1000 );\n\t\t} );\n\t}\n\n\ttestFormulaBuilder() {\n\t\tvar $this = this;\n\t\tQUnit.test( 'FormulaBuilder tests', function( assert ) {\n\t\t\tvar done_testing = assert.async();\n\t\t\tvar widget = $this.edit_view_ui_dic.formula;\n\t\t\tassert.ok( widget.getValue() == '', 'widget empty: ' + widget.getValue() );\n\t\t\twidget.find( '.t-button.formula-btn' ).click();\n\t\t\tsetTimeout( function() {\n\t\t\t\tassert.ok( $( '.wizard:visible' ).length > 0, 'wizard visible' );\n\t\t\t\t$( '.wizard:visible .close-btn' ).click();\n\t\t\t\tassert.ok( $( '.wizard:visible' ).length == 0, 'wizard invisible' );\n\t\t\t\tdone_testing();\n\t\t\t}, 1000 );\n\t\t} );\n\t}\n\n\ttestButtons() {\n\t\tvar $this = this;\n\t\tQUnit.test( 'TotalButtons tests', function( assert ) {\n\t\t\tvar done_testing = assert.async();\n\n\t\t\tvar all_employee_btn = $( '.control-bar .action-chooser-div #all_employee .all-employee' );\n\t\t\tvar daily_totals_btn = $( '.control-bar .action-chooser-div #daily_totals .daily' );\n\t\t\tvar weekly_totals_btn = $( '.control-bar .action-chooser-div #weekly_totals .weekly' );\n\t\t\tvar strict_range_btn = $( '.control-bar .action-chooser-div #strict_range .strict-range' );\n\n\t\t\tassert.ok( strict_range_btn.hasClass( 'selected' ), 'strict range starts selected' );\n\t\t\tassert.ok( daily_totals_btn.hasClass( 'selected' ) == false, 'daily totals starts unselected' );\n\t\t\tassert.ok( weekly_totals_btn.hasClass( 'selected' ) == false, 'week total starts unselected' );\n\t\t\tassert.ok( all_employee_btn.hasClass( 'selected' ) == false, 'all employees starts unselected' );\n\n\t\t\tstrict_range_btn.click();\n\t\t\tsetTimeout( function() {\n\t\t\t\tassert.ok( strict_range_btn.hasClass( 'selected' ) == false, 'strict range unselects on click' );\n\t\t\t\tdaily_totals_btn.click();\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\tassert.ok( daily_totals_btn.hasClass( 'selected' ), 'daily_totals_btn selects on click' );\n\t\t\t\t\tweekly_totals_btn.click();\n\t\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t\tassert.ok( weekly_totals_btn.hasClass( 'selected' ), 'weekly_totals_btn selects on click' );\n\t\t\t\t\t\tall_employee_btn.click();\n\t\t\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t\t\tassert.ok( all_employee_btn.hasClass( 'selected' ), 'all_employee_btn selects on click' );\n\t\t\t\t\t\t\tstrict_range_btn.click();\n\t\t\t\t\t\t\tdaily_totals_btn.click();\n\t\t\t\t\t\t\tweekly_totals_btn.click();\n\t\t\t\t\t\t\tall_employee_btn.click();\n\t\t\t\t\t\t\tsetTimeout( function() {\n\n\t\t\t\t\t\t\t\t//back to initial state\n\t\t\t\t\t\t\t\tassert.ok( strict_range_btn.hasClass( 'selected' ), 'strict range starts selected' );\n\t\t\t\t\t\t\t\tassert.ok( daily_totals_btn.hasClass( 'selected' ) == false, 'daily totals starts unselected' );\n\t\t\t\t\t\t\t\tassert.ok( weekly_totals_btn.hasClass( 'selected' ) == false, 'week total starts unselected' );\n\t\t\t\t\t\t\t\tassert.ok( all_employee_btn.hasClass( 'selected' ) == false, 'all employees starts unselected' );\n\t\t\t\t\t\t\t\tdone_testing();\n\t\t\t\t\t\t\t}, 1500 );\n\t\t\t\t\t\t}, 1500 );\n\t\t\t\t\t}, 1500 );\n\t\t\t\t}, 1500 );\n\t\t\t}, 1500 );\n\t\t} );\n\t}\n\n\ttestTags() {\n\t\tvar $this = this;\n\t\tQUnit.test( 'Tags tests', function( assert ) {\n\t\t\tvar done_testing = assert.async();\n\t\t\tvar el = $this.edit_view_ui_dic.tags.find( 'input.add-tag-input' );\n\t\t\tvar val = $this.edit_view_ui_dic.tags.getValue();\n\t\t\tassert.ok( val == '', 'starts empty ' + val );\n\n\t\t\tel.focus();\n\t\t\t$( el ).val( 'test1' );\n\t\t\t$( el ).trigger( { type: 'keydown', which: 32, keyCode: 32 } );\n\t\t\t$( el ).val( 'test2' );\n\t\t\t$( el ).trigger( { type: 'keydown', which: 32, keyCode: 32 } );\n\n\t\t\tsetTimeout( function() {\n\t\t\t\tvar val = $this.edit_view_ui_dic.tags.getValue();\n\t\t\t\tassert.ok( val == 'test1,test2', '2 tags entered and return in value: ' + val );\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t//click the x's to remove them\n\t\t\t\t\t$( '.tag-span-div .close-btn' ).click();\n\t\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t\tvar val = $this.edit_view_ui_dic.tags.getValue();\n\t\t\t\t\t\tassert.ok( val == '-test1,-test2', '2 tags entered and return (subtracted) in value: ' + val );\n\t\t\t\t\t\tdone_testing();\n\t\t\t\t\t}, 1000 );\n\t\t\t\t}, 1000 );\n\t\t\t}, 1000 );\n\t\t} );\n\t}\n\n\ttestText() {\n\t\tvar $this = this;\n\t\tQUnit.test( 'Text test', function( assert ) {\n\t\t\t//var done_testing = assert.async();\n\t\t\tvar textbox = $this.edit_view_ui_dic.text;\n\t\t\ttextbox.setValue( 'testing textbox' );\n\t\t\tassert.ok( textbox.getValue() == 'testing textbox', 'accepts text and returns value' );\n\t\t\ttextbox.setValue( '' );\n\t\t\tassert.ok( textbox.getValue() == '', 'returned value updates when text is updated' );\n\t\t} );\n\t}\n\n\ttestPassword() {\n\t\tvar $this = this;\n\t\tQUnit.test( 'Password box test', function( assert ) {\n\t\t\t//var done_testing = assert.async();\n\t\t\tvar textbox = $this.edit_view_ui_dic.password;\n\t\t\ttextbox.setValue( 'testing textbox' );\n\t\t\tassert.ok( textbox.getValue() == 'testing textbox', 'accepts text and returns value' );\n\t\t\ttextbox.setValue( '' );\n\t\t\tassert.ok( textbox.getValue() == '', 'returned value updates when text is updated' );\n\t\t} );\n\t}\n\n\ttestTextarea() {\n\t\tvar $this = this;\n\t\tQUnit.test( 'Password box test', function( assert ) {\n\t\t\t//var done_testing = assert.async();\n\t\t\tvar textbox = $this.edit_view_ui_dic.textarea;\n\t\t\ttextbox.setValue( 'testing textbox' );\n\t\t\tassert.ok( textbox.getValue() == 'testing textbox', 'accepts text and returns value' );\n\t\t\ttextbox.setValue( '' );\n\t\t\tassert.ok( textbox.getValue() == '', 'returned value updates when text is updated' );\n\t\t} );\n\t}\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjkxMS5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFBNkM7QUFDVTtBQUNIO0FBQzJCOztBQUV4RTtBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNB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