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

1 line
90 KiB
JavaScript
Raw Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["developer_tools-AwesomeboxTestViewController"],{6142:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "AwesomeboxTestViewController": () => (/* binding */ AwesomeboxTestViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass AwesomeboxTestViewController 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: [\'TImage\', \'TImageAdvBrowser\'],\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 = \'AwesomeboxTestEditView.html\';\n\t\tthis.permission_id = \'user\';\n\t\tthis.viewId = \'AwesomeboxTest\';\n\t\tthis.script_name = \'AwesomeboxTestView\';\n\t\tthis.table_name_key = \'awesomebox_test\';\n\t\tthis.context_menu_name = $.i18n._( \'AwesomeBox Test\' );\n\t\tthis.navigation_label = $.i18n._( \'AwesomBox 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._( \'AWESOMEBOX TESTING VIEW\' ) },\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\n\t\tthis.edit_view_tabs[0] = [];\n\t\tthis.edit_view_tabs[0].push( tab_employee_column1 );\n\n//\t\tUser\n\t\tvar form_item_input = Global.loadWidgetByName( FormItemType.AWESOME_DROPDOWN );\n\t\tform_item_input.ADropDown( {\n\t\t\t//api_class: TTAPI.APIUser,\n\t\t\tfield: \'user_id\',\n\t\t\tdisplay_show_all: false,\n\t\t\tid: \'user_id_dropdown\',\n\t\t\tkey: \'id\',\n\t\t\tallow_drag_to_order: false,\n\t\t\tdisplay_close_btn: false,\n\t\t\tauto_sort: true,\n\t\t\tdisplay_column_settings: false,\n\t\t\tdefault_height: 100\n\t\t} );\n\n\t\t// form_item_input.setSourceData( $this.user_id_array );\n\t\tform_item_input.addClass( \'splayed-adropdown\' );\n\t\tvar display_columns = ALayoutCache.getDefaultColumn( \'global_user\' ); //Get Default columns base on different layout name\n\t\tdisplay_columns = Global.convertColumnsTojGridFormat( display_columns, \'global_user\' ); //Convert to jQgrid format\n\t\tthis.addEditFieldToColumn( $.i18n._( \'User\' ), form_item_input, tab_employee_column1 );\n\t\tform_item_input.setColumns( display_columns );\n\t\tform_item_input.setUnselectedGridData( this.user_id_array );\n\t\tform_item_input.setGridColumnsWidths();\n\t\tform_item_input.setHeight( 150 );\n\n\t\t//Company\n\t\tvar form_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIUser,\n\t\t\tallow_multiple_selection: true,\n\t\t\tlayout_name: \'global_user\',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: \'user_id2\'\n\t\t} );\n\t\tthis.addEditFi