1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
|
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["ui_kit_sample-UIKitChildSampleViewController"],{249:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"UIKitChildSampleViewController\": () => (/* binding */ UIKitChildSampleViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass UIKitChildSampleViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#ui_kit_child_sample_view_container',\n\t\t\tcombo_box_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 = 'UIKitChildSampleEditView.html';\n\t\tthis.permission_id = 'user';\n\t\tthis.viewId = 'UIKitChildSample';\n\t\tthis.script_name = 'UIKitChildSample';\n\t\tthis.table_name_key = 'ui_kit_child';\n\t\tthis.context_menu_name = $.i18n._( 'UIKit Child Sample' );\n\t\tthis.navigation_label = $.i18n._( 'UIKit Child Sample' );\n\t\tthis.api = TTAPI.APIUIKitChildSample;\n\t\t\n\t\tthis.render();\n\t\t\n\t\tif ( this.sub_view_mode ) {\n\t\t\tthis.buildContextMenu( true );\n\t\t} else {\n\t\t\tthis.buildContextMenu();\n\t\t}\n\n\t\t//call init data in parent view\n\t\tif ( !this.sub_view_mode ) {\n\t\t\tthis.initData();\n\t\t}\n\t}\n\n\tinitOptions() {\n\n\t\tlet options = [\n\t\t\t{ option_name: 'combo_box', api: this.api },\n\t\t];\n\n\t\tthis.initDropDownOptions( options);\n\t}\n\t\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\texclude: [],\n\t\t\tinclude: []\n\t\t};\n\n\t\treturn context_menu_model;\n\t}\n\n\tbuildEditViewUI() {\n\n\t\tsuper.buildEditViewUI();\n\t\tvar $this = this;\n\n\t\tvar tab_model = {\n\t\t\t'tab_ui_kit_child': { 'label': $.i18n._( 'UI Kit Child' ) },\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.APIUIKitChildSample,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_ui_kit_child_sample',\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//Tab 0 start\n\t\tvar tab_widget = this.edit_view_tab.find( '#tab_ui_kit_child' );\n\t\tvar ui_kit_child_column = tab_widget.find( '.first-column' );\n\t\tvar label, widgetContainer;\n\n\t\tthis.edit_view_tabs[0] = [];\n\t\tthis.edit_view_tabs[0].push( ui_kit_child_column );\n\n\t\t//Text input\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'text_input', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Text Input (Display Name)' ), form_item_input, ui_kit_child_column );\n\n\t\t//Checkbox\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\tform_item_input.TCheckbox( { field: 'checkbox' } );\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\twidgetContainer.append( form_item_input );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Checkbox' ), form_item_input, ui_kit_child_column, '', widgetContainer );\n\t\t\n\t\t//Combo Box\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'combo_box' } );\n\t\tform_item_input.setSourceData( $this.combo_box_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Combo Box' ), form_item_input, ui_kit_child_column, '' );\n\t}\n\n\tbuildSearchFields() {\n\n\t\tsuper.buildSearchFields();\n\t\tthis.search_fields = [\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Text Input' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'text_input',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\n\t\t\t\tform_item_type: FormItemType.TEXT_INPUT\n\t\t\t} ),\n\t\t];\n\t}\n\n\tsetDefaultMe
|