1 line
102 KiB
JavaScript
1 line
102 KiB
JavaScript
|
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["attendance-recurring_schedule_template_control-RecurringScheduleTemplateControlViewController"],{7067:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RecurringScheduleTemplateControlViewController\": () => (/* binding */ RecurringScheduleTemplateControlViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass RecurringScheduleTemplateControlViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#recurring_schedule_template_control_view_container',\n\n\n\t\t\tsub_document_view_controller: null,\n\n\t\t\tdocument_object_type_id: null,\n\n\t\t\trecurring_schedule_template_api: null,\n\n\t\t\tschedule_api: null,\n\n\t\t\trecurring_schedule_status_array: null\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\t//this._super('initialize', options );\n\t\tthis.edit_view_tpl = 'RecurringScheduleTemplateControlEditView.html';\n\t\tthis.permission_id = 'recurring_schedule_template';\n\t\tthis.viewId = 'RecurringScheduleTemplateControl';\n\t\tthis.script_name = 'RecurringScheduleTemplateControlView';\n\t\tthis.table_name_key = 'recurring_schedule_template_control';\n\t\tthis.context_menu_name = $.i18n._( 'Recurring Templates' );\n\t\tthis.navigation_label = $.i18n._( 'Recurring Template' );\n\t\tthis.api = TTAPI.APIRecurringScheduleTemplateControl;\n\t\tthis.schedule_api = TTAPI.APISchedule;\n\t\tthis.recurring_schedule_template_api = TTAPI.APIRecurringScheduleTemplate;\n\n\t\tthis.document_object_type_id = 10;\n\t\tthis.event_bus = new TTEventBus({ view_id: this.viewId });\n\n\t\tthis.render();\n\t\tthis.buildContextMenu();\n\n\t\tthis.initData();\n\t}\n\n\tinitOptions() {\n\t\tvar $this = this;\n\n\t\tthis.initDropDownOption( 'status', null, this.recurring_schedule_template_api, function( res ) {\n\t\t\tres = res.getResult();\n\t\t\t$this.recurring_schedule_status_array = Global.buildRecordArray( res );\n\t\t} );\n\t}\n\n\tbuildEditViewUI() {\n\t\tsuper.buildEditViewUI();\n\n\t\tvar $this = this;\n\n\t\tvar tab_model = {\n\t\t\t'tab_recurring_template': {\n\t\t\t\t'label': $.i18n._( 'Recurring Template' ),\n\t\t\t\t'html_template': this.getRecurringTemplateTabHtml()\n\t\t\t},\n\t\t\t'tab_attachment': true,\n\t\t\t'tab_audit': true,\n\t\t};\n\t\tthis.setTabModel( tab_model );\n\n\t\tvar form_item_input;\n\n\t\tthis.navigation.AComboBox( {\n\t\t\tapi_class: TTAPI.APIRecurringScheduleTemplateControl,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_recurring_template_control',\n\t\t\tnavigation_mode: true,\n\t\t\tshow_search_inputs: true\n\t\t} );\n\n\t\tthis.setNavigation();\n\n\t\t//These width changes can cause crashes when tab is hidden on selenium screenshot unit test mode.\n\t\t//Left menu would not be clickable due to elements overlapping.\n\t\tif ( Global.UNIT_TEST_MODE == false ){\n\t\t\tthis.edit_view_tab.css( 'max-width', 'none' );\n\n\t\t\tif ( Global.getProductEdition() >= 20 ) {\n\t\t\t\tthis.edit_view_tab.css( 'min-width', '1250px' );\n\t\t\t} else if ( Global.getProductEdition() >= 15 ) {\n\t\t\t\tthis.edit_view_tab.css( 'min-width', '1050px' );\n\t\t\t} else {\n\t\t\t\tthis.edit_view_tab.css( 'min-width', '950px' );\n\t\t\t}\n\t\t}\n\n\t\t//Tab 0 start\n\n\t\tvar tab_recurring_template = this.edit_view_tab.find( '#tab_recurring_template' );\n\n\t\tvar tab_recurring_template_column1 = tab_recurring_template.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[0] = [];\n\n\t\tthis.edit_view_tabs[0].push( tab_recurring_template_column1 );\n\n\t\t//Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'name', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.
|