"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["wizard-BaseWizardController"],{9312:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BaseWizardController\": () => (/* binding */ BaseWizardController)\n/* harmony export */ });\n/* harmony import */ var _views_TTBackboneView__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6739);\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\n/* provided dependency */ var jQuery = __webpack_require__(9755);\n\n\nclass BaseWizardController extends _views_TTBackboneView__WEBPACK_IMPORTED_MODULE_0__.TTBackboneView {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\t// _required_files: null,\n\t\t\tsteps: 0,\n\t\t\ttitle: 'Wizard',\n\t\t\tcurrent_step: 1,\n\n\t\t\tcontent_div: null,\n\n\t\t\tnext_btn: null,\n\t\t\tback_btn: null,\n\t\t\tdone_btn: null,\n\t\t\tcancel_btn: null,\n\t\t\tprogress: null,\n\t\t\tprogress_label: null,\n\n\t\t\tstepsWidgetDic: null,\n\t\t\tstepsDataDic: null,\n\n\t\t\tdefault_data: null,\n\n\t\t\tcall_back: null,\n\n\t\t\tsaved_user_generic_data: null,\n\n\t\t\tscript_name: null,\n\n\t\t\tuser_generic_data_api: null,\n\n\t\t\twizard_id: null,\n\n\t\t\tedit_view_ui_dic: {},\n\n\t\t\tedit_view_form_item_dic: {},\n\n\t\t\tevents: {\n\t\t\t\t'click .close-btn': 'onCloseClick',\n\t\t\t\t'click .close-icon': 'onCloseClick',\n\t\t\t\t'click .wizard-overlay.onclick-close': 'onCloseClick',\n\t\t\t\t'click .forward-btn': 'onNextClick',\n\t\t\t\t'click .back-btn': 'onBackClick',\n\t\t\t\t'click .done-btn': 'onDoneClick'\n\t\t\t}\n\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\t/**\n\t * When changing this function, you need to look for all occurences of this function because it was needed in several bases\n\t * BaseViewController, HomeViewController, BaseWizardController, QuickPunchBaseViewControler\n\t *\n\t * @returns {Array}\n\t */\n\t// filterRequiredFiles() {\n\t// \tvar retval = [];\n\t//\n\t// \tif ( this._required_files && this._required_files[0] ) {\n\t// \t\tretval = this._required_files;\n\t// \t} else {\n\t// \t\tfor ( var edition_id in this._required_files ) {\n\t// \t\t\tif ( Global.getProductEdition() >= edition_id ) {\n\t// \t\t\t\tretval = retval.concat( this._required_files[edition_id] );\n\t// \t\t\t}\n\t// \t\t}\n\t// \t}\n\t//\n\t// \tDebug.Arr( retval, 'RETVAL', 'BaseWizardController.js', 'BaseWizardController', 'filterRequiredFiles', 10 );\n\t// \treturn retval;\n\t// }\n\n\tinitialize( options ) {\n\t\tsuper.initialize( options );\n\n\t\tthis.content_div = $( this.el ).find( '.content' );\n\t\tthis.stepsWidgetDic = {};\n\t\tthis.stepsDataDic = {};\n\n\t\tthis.default_data = BaseWizardController.default_data;\n\t\tthis.call_back = BaseWizardController.call_back;\n\n\t\tBaseWizardController.default_data = null;\n\t\tBaseWizardController.call_back = null;\n\n\t\tthis.user_generic_data_api = TTAPI.APIUserGenericData;\n\n\t\tif ( this.wizard_id === null ) {\n this.wizard_id = this.constructor.name;\n }\n\n\t\tLocalCacheData.current_open_wizard_controllers.push( this );\n\n\t\tif ( typeof this.init == 'function' ) {\n\t\t\t//FIXME: pull this out when all wizards are refactored to the new way #1187\n\t\t\tif ( typeof this.setDefaultDataToSteps == 'function' ) {\n\t\t\t\tthis.setDefaultDataToSteps();\n\t\t\t}\n\t\t\tthis.init( options );\n\t\t\tTTPromise.resolve( 'BaseViewController', 'initialize' );\n\t\t}\n\t}\n\n\tsetDefaultDataToSteps() {\n\t}\n\n\tgetDefaultData( key ) {\n\n\t\tif ( !this.default_data ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this.default_data[key];\n\t}\n\n\trender() {\n\t\tvar title = $( this.el ).find( '.title' );\n\t\tvar title_1 = $( this.el ).find( '.title-1' );\n\t\tthis.progress = $( this.el ).find( '.progress' );\n\t\tthis.progress_label = $( this.el ).find( '.steps' );\n\n\t\tthis.progress.attr( 'max', 10 );\n\t\tthis.progress.val( 0 );\n\n\t\tthis.next_btn = $( this.el ).find( '.forward-btn' );\n\t\tthis.back_btn = $( this.el ).find( '.back-btn' );\n\t\tthis.done_btn = $( this.el ).find( '.done-btn' );\n\t\tthis.close_btn = $( this.el ).find( '.close-btn' );\n\n\t\tGlobal.setWidgetEnabled( this.back_btn, false );\n\t\tGlobal.setWidgetEnabled( this.next_btn, false );\n\t\tGlobal.setWidgetEnabled( this.close_btn, false );\n\t\tGlobal.setWidgetEnabled( this.done_btn, false );\n\n\t\ttitle.text( this.title );\n\t\ttitle_1.text( this.title );\n\t\tTTPromise.resolve( 'init', 'init' );\n\t}\n\n\tsetButtonsStatus() {\n\n\t\tGlobal.setWidgetEnabled( this.done_btn, false );\n\t\tGlobal.setWidgetEnabled( this.close_btn, true );\n\n\t\tif ( this.current_step === 1 ) {\n\t\t\tGlobal.setWidgetEnabled( this.back_btn, false );\n\t\t} else {\n\t\t\tGlobal.setWidgetEnabled( this.back_btn, true );\n\t\t}\n\n\t\tif ( this.current_step !== this.steps ) {\n\t\t\tGlobal.setWidgetEnabled( this.done_btn, false );\n\t\t\tGlobal.setWidgetEnabled( this.next_btn, true );\n\t\t} else {\n\t\t\tGlobal.setWidgetEnabled( this.done_btn, true );\n\t\t\tGlobal.setWidgetEnabled( this.next_btn, false );\n\t\t}\n\t}\n\n\tonNextClick() {\n\t\tthis.saveCurrentStep();\n\t\tthis.current_step = this.current_step + 1;\n\t\tthis.initCurrentStep();\n\t}\n\n\tonBackClick() {\n\t\tthis.saveCurrentStep();\n\t\tthis.current_step = this.current_step - 1;\n\t\tthis.initCurrentStep();\n\t}\n\n\tonDoneClick() {\n\t}\n\n\tcleanStepsData() {\n\t\tthis.stepsDataDic = {};\n\t\tthis.current_step = 1;\n\t}\n\n\tonCloseClick() {\n\t\tif ( this.script_name ) {\n\t\t\tthis.saveCurrentStep();\n\n\t\t\tthis.saveAllStepsToUserGenericData( function() {\n\n\t\t\t} );\n\t\t}\n\t\tLocalCacheData.current_open_wizard_controllers = LocalCacheData.current_open_wizard_controllers.filter( wizard => wizard.wizard_id !== this.wizard_id );\n\t\t$( this.el ).remove();\n\t}\n\n\tsaveCurrentStep( direction, callBack ) {\n\t}\n\n\tsaveAllStepsToUserGenericData( callBack ) {\n\n\t\t// Function called stacks: TypeError: Unable to set property 'data' of undefined or null reference\n\t\tif ( this.script_name && this.saved_user_generic_data ) {\n\t\t\tthis.saved_user_generic_data.data = this.stepsDataDic;\n\t\t\tthis.saved_user_generic_data.data.current_step = this.current_step;\n\n\t\t\tthis.user_generic_data_api.setUserGenericData( this.saved_user_generic_data, {\n\t\t\t\tonResult: function( result ) {\n\t\t\t\t\tcallBack( result.getResult() );\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\tcallBack( true );\n\t\t}\n\t}\n\n\taddEditFieldToColumn( label, widgets, column, firstOrLastRecord, widgetContainer, saveFormItemDiv, setResizeEvent, saveFormItemDivKey, hasKeyEvent, customLabelWidget ) {\n\t\tvar $this = this;\n\t\tvar form_item = $( Global.loadWidgetByName( WidgetNamesDic.EDIT_VIEW_FORM_ITEM ) );\n\t\tvar form_item_label_div = form_item.find( '.edit-view-form-item-label-div' );\n\t\tvar form_item_label = form_item.find( '.edit-view-form-item-label' );\n\t\tvar form_item_input_div = form_item.find( '.edit-view-form-item-input-div' );\n\t\tvar widget = widgets;\n\n\t\tif ( Global.isArray( widgets ) ) {\n\t\t\tfor ( var i = 0; i < widgets.length; i++ ) {\n\t\t\t\twidget = widgets[i];\n//\t\t\t\twidget.css( 'opacity', 0 );\n\t\t\t}\n\t\t} else {\n//\t\t\twidget.css( 'opacity', 0 );\n\t\t}\n\n\t\tif ( customLabelWidget ) {\n\t\t\tform_item_label.parent().append( customLabelWidget );\n\t\t\tform_item_label.remove();\n\t\t} else {\n\t\t\tform_item_label.html( label );\n\t\t}\n\n\t\tif ( Global.isSet( widgetContainer ) ) {\n\n\t\t\tform_item_input_div.append( widgetContainer );\n\n\t\t} else {\n\t\t\tform_item_input_div.append( widget );\n\t\t}\n\n\t\tcolumn.append( form_item );\n\t\t//column.append( \"
\" );\n\n\t\t//set height to text area\n//\t\tif ( form_item.height() > 35 ) {\n//\t\t\tform_item_label_div.css( 'height', form_item.height() );\n//\t\t} else if ( widget.hasClass( 'a-dropdown' ) ) {\n//\t\t\tform_item_label_div.css( 'height', 240 );\n//\t\t}\n\n\t\tif ( setResizeEvent ) {\n\n//\t\t\tform_item.unbind( 'resize' ).bind( 'resize', function() {\n//\t\t\t\tif ( form_item_label_div.height() !== form_item.height() && form_item.height() !== 0 ) {\n//\t\t\t\t\tform_item_label_div.css( 'height', form_item.height() );\n//\t\t\t\t}\n//\n//\t\t\t} );\n//\t\t\twidget.unbind( 'setSize' ).bind( 'setSize', function() {\n//\t\t\t\tform_item_label_div.css( 'height', widget.height() + 10 );\n//\t\t\t} );\n\n//\t\t\tform_item_input_div.unbind( 'resize' ).bind( 'resize', function() {\n//\t\t\t\tform_item_label_div.css( 'height', form_item_input_div.height() + 10 );\n//\t\t\t} );\n\n\t\t}\n\n\t\tif ( !label ) {\n\t\t\tform_item_input_div.remove();\n\t\t\tform_item_label_div.remove();\n\n\t\t\tform_item.append( widget );\n//\t\t\twidget.css( 'opacity', 1 );\n\n\t\t\tif ( saveFormItemDiv && saveFormItemDivKey ) {\n\t\t\t\tthis.edit_view_form_item_dic[saveFormItemDivKey] = form_item;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( saveFormItemDiv ) {\n\n\t\t\tif ( Global.isArray( widgets ) ) {\n\t\t\t\tthis.edit_view_form_item_dic[widgets[0].getField()] = form_item;\n\t\t\t} else {\n\t\t\t\tthis.edit_view_form_item_dic[widget.getField()] = form_item;\n\t\t\t}\n\n\t\t}\n\t\tif ( Global.isArray( widgets ) ) {\n\n\t\t\tfor ( var i = 0; i < widgets.length; i++ ) {\n\t\t\t\twidget = widgets[i];\n\t\t\t\tthis.stepsWidgetDic[this.current_step][widget.getField()] = widget;\n\n\t\t\t\twidget.unbind( 'formItemChange' ).bind( 'formItemChange', function( e, target, doNotValidate ) {\n\t\t\t\t\t$this.onFormItemChange( target, doNotValidate );\n\t\t\t\t} );\n\n\t\t\t\tif ( hasKeyEvent ) {\n\t\t\t\t\twidget.unbind( 'formItemKeyUp' ).bind( 'formItemKeyUp', function( e, target ) {\n\t\t\t\t\t\t$this.onFormItemKeyUp( target );\n\t\t\t\t\t} );\n\n\t\t\t\t\twidget.unbind( 'formItemKeyDown' ).bind( 'formItemKeyDown', function( e, target ) {\n\t\t\t\t\t\t$this.onFormItemKeyDown( target );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis.stepsWidgetDic[this.current_step][widget.getField()] = widget;\n\n\t\t\twidget.bind( 'formItemChange', function( e, target, doNotValidate ) {\n\t\t\t\t$this.onFormItemChange( target, doNotValidate );\n\t\t\t} );\n\n\t\t\tif ( hasKeyEvent ) {\n\t\t\t\twidget.bind( 'formItemKeyUp', function( e, target ) {\n\t\t\t\t\t$this.onFormItemKeyUp( target );\n\t\t\t\t} );\n\n\t\t\t\twidget.bind( 'formItemKeyDown', function( e, target ) {\n\t\t\t\t\t$this.onFormItemKeyDown( target );\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\treturn form_item;\n\t}\n\n\tinitUserGenericData() {\n\t\tvar $this = this;\n\t\tvar args = {};\n\n\t\tif ( this.script_name ) {\n\t\t\targs.filter_data = { script: this.script_name, deleted: false };\n\t\t\tthis.user_generic_data_api.getUserGenericData( args, {\n\t\t\t\tonResult: function( result ) {\n\n\t\t\t\t\tvar result_data = result.getResult();\n\n\t\t\t\t\tif ( $.type( result_data ) === 'array' ) {\n\t\t\t\t\t\t$this.saved_user_generic_data = result_data[0];\n\t\t\t\t\t\t$this.stepsDataDic = $this.saved_user_generic_data.data;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this.saved_user_generic_data = {};\n\t\t\t\t\t\t$this.saved_user_generic_data.script = $this.script_name;\n\t\t\t\t\t\t$this.saved_user_generic_data.name = $this.script_name;\n\t\t\t\t\t\t$this.saved_user_generic_data.is_default = false;\n\t\t\t\t\t\t$this.saved_user_generic_data.data = { current_step: 1 };\n\n\t\t\t\t\t}\n\n\t\t\t\t\t$this.current_step = $this.saved_user_generic_data.data.current_step;\n\n\t\t\t\t\tif ( $this.current_step > $this.steps || $this.current_step < 1 ) { //Make sure current_step isn't outside the range of the wizard.\n\t\t\t\t\t\t$this.current_step = 1;\n\t\t\t\t\t}\n\n\t\t\t\t\t$this.initCurrentStep();\n\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\t$this.initCurrentStep();\n\t\t}\n\t}\n\n\tinitCurrentStep() {\n\n\t\tvar $this = this;\n\t\t$this.progress_label.text( 'Step ' + $this.current_step + ' of ' + $this.steps );\n\t\t$this.progress.attr( 'max', $this.steps );\n\t\t$this.progress.val( $this.current_step );\n\n\t\t$this.buildCurrentStepUI();\n\t\t$this.buildCurrentStepData();\n\t\t$this.setCurrentStepValues();\n\t\t$this.setButtonsStatus(); // set button enabled or disabled\n\t}\n\n\tbuildCurrentStepUI() {\n\t}\n\n\tbuildCurrentStepData() {\n\t}\n\n\t//Don't use this any more. Use BuildCurrentStepData to set values too\n\tsetCurrentStepValues() {\n\t}\n\n\tgetLabel() {\n\t\tvar label = $( '' );\n\t\treturn label;\n\t}\n\n\tgetCheckBox( field ) {\n\t\tvar check_box = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\tcheck_box.TCheckbox( { field: field } );\n\n\t\treturn check_box;\n\t}\n\n\tgetDatePicker( field ) {\n\t\tvar widget = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\n\t\twidget.TDatePicker( { field: field } );\n\n\t\treturn widget;\n\t}\n\n\tgetPasswordInput( field ) {\n\t\tvar widget = Global.loadWidgetByName( FormItemType.PASSWORD_INPUT );\n\n\t\twidget = widget.TPasswordInput( {\n\t\t\tfield: field\n\t\t} );\n\n\t\treturn widget;\n\t}\n\n\tgetTextInput( field, width ) {\n\t\tvar widget = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tif ( width ) {\n\t\t\twidget = widget.TPasswordInput( {\n\t\t\t\tfield: field,\n\t\t\t\twidth: width\n\t\t\t} );\n\t\t} else {\n\t\t\twidget = widget.TPasswordInput( {\n\t\t\t\tfield: field\n\t\t\t} );\n\t\t}\n\t\treturn widget;\n\t}\n\n\tgetText() {\n\t\tvar widget = Global.loadWidgetByName( FormItemType.TEXT );\n\n\t\twidget = widget.TText( {} );\n\n\t\treturn widget;\n\t}\n\n\tgetTextArea( field, width, height ) {\n\n\t\tif ( !width ) {\n\t\t\twidth = 300;\n\t\t}\n\n\t\tif ( !height ) {\n\t\t\theight = 200;\n\t\t}\n\t\tvar widget = Global.loadWidgetByName( FormItemType.TEXT_AREA );\n\n\t\twidget = widget.TTextArea( {\n\t\t\tfield: field,\n\t\t\twidth: width,\n\t\t\theight: height\n\t\t} );\n\n\t\treturn widget;\n\t}\n\n\tgetComboBox( field, set_empty ) {\n\t\tvar widget = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\twidget = widget.TComboBox( {\n\t\t\tfield: field,\n\t\t\tset_empty: set_empty\n\t\t} );\n\n\t\treturn widget;\n\t}\n\n\tgetImageCutArea( field ) {\n\t\tvar widget = Global.loadWidgetByName( FormItemType.IMAGE_CUT );\n\n\t\twidget = widget.TImageCutArea( {\n\t\t\tfield: field\n\t\t} );\n\n\t\treturn widget;\n\t}\n\n\tgetCameraBrowser( field ) {\n\t\tvar widget = Global.loadWidgetByName( FormItemType.CAMERA_BROWSER );\n\n\t\twidget = widget.CameraBrowser( {\n\t\t\tfield: field\n\t\t} );\n\n\t\treturn widget;\n\t}\n\n\tgetFileBrowser( field, accept_filter, width, height ) {\n\t\tvar widget = Global.loadWidgetByName( FormItemType.IMAGE_BROWSER );\n\n\t\twidget = widget.TImageBrowser( {\n\t\t\tfield: field,\n\t\t\taccept_filter: accept_filter,\n\t\t\tdefault_width: width,\n\t\t\tdefault_height: height\n\t\t} );\n\n\t\treturn widget;\n\t}\n\n\tgetAComboBox( apiClass, allow_multiple, layoutName, field, set_all, key ) {\n\t\tvar a_combobox = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\tif ( !key ) {\n\t\t\tkey = 'id';\n\t\t}\n\n\t\ta_combobox.AComboBox( {\n\t\t\tkey: key,\n\t\t\tapi_class: apiClass,\n\t\t\tallow_multiple_selection: allow_multiple,\n\t\t\tlayout_name: layoutName,\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tset_all: set_all,\n\t\t\tfield: field\n\t\t} );\n\n\t\treturn a_combobox;\n\t}\n\n\tgetSimpleTComboBox( field, allowMultiple ) {\n\n\t\tif ( !Global.isSet( allowMultiple ) ) {\n\t\t\tallowMultiple = true;\n\t\t}\n\n\t\tvar widget = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\twidget = widget.AComboBox( {\n\t\t\tfield: field,\n\t\t\tset_empty: true,\n\t\t\tallow_multiple_selection: allowMultiple,\n\t\t\tlayout_name: 'global_option_column',\n\t\t\tkey: 'value'\n\t\t} );\n\n\t\treturn widget;\n\t}\n\n\tonGridSelectRow( e ) {\n\t}\n\n\tonGridDblClickRow( e ) {\n\t}\n\n\tsetGrid( gridId, grid_div, allMultipleSelection ) {\n\n\t\tif ( !allMultipleSelection ) {\n\t\t\tallMultipleSelection = false;\n\t\t}\n\n\t\tvar $this = this;\n\n\t\tthis.content_div.append( grid_div );\n\n\t\tvar grid = grid_div.find( '#' + gridId );\n\n\t\tthis.getGridColumns( gridId, function( column_model ) {\n\n\t\t\t$this.stepsWidgetDic[$this.current_step][gridId] = new TTGrid( gridId, {\n\t\t\t\tcontainer_selector: '.wizard',\n\t\t\t\taltRows: true,\n\t\t\t\tonSelectRow: function( e ) {\n\t\t\t\t\t$this.onGridSelectRow( e );\n\t\t\t\t},\n\t\t\t\tonSelectAll: function( e ) {\n\t\t\t\t\tfor ( var n in e ) {\n\t\t\t\t\t\t$this.onGridSelectRow( e[n] );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tondblClickRow: function() {\n\t\t\t\t\t$this.onGridDblClickRow();\n\t\t\t\t},\n\t\t\t\tsortable: false,\n\t\t\t\theight: 75,\n\t\t\t\tmultiselect: allMultipleSelection,\n\t\t\t\tmultiboxonly: allMultipleSelection\n\n\t\t\t}, column_model );\n\n\t\t\t$this.setGridSize( $this.stepsWidgetDic[$this.current_step][gridId] );\n\n\t\t\t$this.setGridGroupColumns( gridId );\n\n\t\t} );\n\t\treturn grid; //allowing chaining off this method.\n\t}\n\n\tsetGridGroupColumns( gridId ) {\n\t}\n\n\tsetGridSize( grid ) {\n\t\tgrid.grid.setGridWidth( $( this.content_div.find( '.grid-div' ) ).width() - 11 );\n\t\tgrid.grid.setGridHeight( this.content_div.height() - 150 ); //During merge, this wasn't in MASTER branch.\n\t}\n\n\tgetGridColumns( gridId, callBack ) {\n\t}\n\n\tgetRibbonButtonBox() {\n\t\tvar div = $( '
' );\n\t\tvar ul = $( '' );\n\n\t\tdiv.append( ul );\n\n\t\treturn div;\n\t}\n\n\tgetRibbonButton( id, icon, label ) {\n\t\tvar button = $( '
  • ' + label + '
  • ' );\n\n\t\treturn button;\n\t}\n\n\tshowNoResultCover( grid_div ) {\n\t\tif ( grid_div && grid_div instanceof jQuery ) {\n\t\t\tthis.removeNoResultCover( grid_div );\n\t\t\tvar no_result_box = Global.loadWidgetByName( WidgetNamesDic.NO_RESULT_BOX );\n\t\t\tno_result_box.NoResultBox( { related_view_controller: this, is_new: false } );\n\t\t\tno_result_box.attr( 'class', 'no-result-div' );\n\n\t\t\tgrid_div.append( no_result_box );\n\t\t}\n\t}\n\n\tremoveNoResultCover( grid_div ) {\n\t\tif ( grid_div && grid_div instanceof jQuery ) {\n\t\t\tgrid_div.find( '.no-result-div' ).remove();\n\t\t}\n\t}\n\n}\n\nBaseWizardController.default_data = null;\nBaseWizardController.callBack = null;\n\nBaseWizardController.openWizard = function( viewId, templateName ) {\n\tif ( viewId != 'ReportViewWizard' && LocalCacheData.current_open_wizard_controllers.length > 0 ) {\n\t\tfor ( let i = 0; i < LocalCacheData.current_open_wizard_controllers.length; i++ ) {\n\t\t\tLocalCacheData.current_open_wizard_controllers[i].onCloseClick();\n\t\t}\n\t}\n\tGlobal.loadViewSource( viewId, templateName, function( result ) {\n\t\tvar args = {};\n\t\tvar template = _.template( result );\n\t\t$( 'body' ).append( template( args ) );\n\t\tGlobal.setUIInitComplete();\n\t} );\n\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTMxMi5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUF3RDs7QUFFakQsbUNBQW1DLGlFQUFjO0FBQ3hELDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTs7QUFFQTs7QUFFQTs7QUFFQTs7QUFFQSx1QkFBdUI7O0FBRXZCLDhCQUE4Qjs7QUFFOUI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSxJQUFJOztBQUVKO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQSxjQUFjO0FBQ2Q7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsT0FBTztBQUNQO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNB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