TimeTrex/interface/html5/dist/home-dashboard-HomeViewController.bundle.js

1 line
74 KiB
JavaScript
Raw Permalink Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["home-dashboard-HomeViewController"],{7657:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"HomeViewController\": () => (/* binding */ HomeViewController)\n/* harmony export */ });\n/* harmony import */ var jquery_bridget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8831);\n/* harmony import */ var jquery_bridget__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery_bridget__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var masonry_layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8751);\n/* harmony import */ var masonry_layout__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(masonry_layout__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _views_TTBackboneView__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6739);\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\n\n\n\n\nclass HomeViewController extends _views_TTBackboneView__WEBPACK_IMPORTED_MODULE_2__.TTBackboneView {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '.home-view',\n\n\t\t\t// _required_files: ['jquery.masonry', 'jquery-bridget'],\n\t\t\tuser_generic_data_api: null,\n\t\t\tcontext_menu_array: null,\n\t\t\tviewId: null,\n\t\t\tdashletControllerArray: null,\n\t\t\tinitMasonryDone: false,\n\t\t\tdashboard_container: false,\n\t\t\torder_data: false,\n\t\t\tcurrent_scroll_position: false,\n\t\t\tcurrent_mouse_position: null\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// \tvar required_files = this._required_files;\n\t//\n\t// \tif ( required_files && required_files[0] ) {\n\t// \t\tretval = required_files;\n\t// \t} else {\n\t// \t\tfor ( var edition_id in required_files ) {\n\t// \t\t\tif ( Global.getProductEdition() >= edition_id ) {\n\t// \t\t\t\tretval = retval.concat( required_files[edition_id] );\n\t// \t\t\t}\n\t// \t\t}\n\t// \t}\n\t//\n\t// \tDebug.Arr( retval, 'RETVAL', 'BaseViewController.js', 'BaseViewController', 'filterRequiredFiles', 10 );\n\t// \treturn retval;\n\t// }\n\n\tinitialize( options ) {\n\t\tGlobal.setUINotready();\n\t\tTTPromise.add( 'init', 'init' );\n\t\tTTPromise.wait();\n\t\tvar $this = this;\n\n\t\tsuper.initialize( options );\n\n\t\t// require( this.filterRequiredFiles(), function( Masonry, jQueryBridget ) {\n\n\t\t$this.viewId = 'Home';\n\t\tLocalCacheData.current_open_primary_controller = $this;\n\t\t$this.user_generic_data_api = TTAPI.APIUserGenericData;\n\t\t$this.api_dashboard = TTAPI.APIDashboard;\n\n\t\tjquery_bridget__WEBPACK_IMPORTED_MODULE_0___default()( 'masonry', (masonry_layout__WEBPACK_IMPORTED_MODULE_1___default()), $ );\n\t\t$this.dashboard_container = $( '.dashboard-container' );\n\t\t$this.initMasonryDone = false;\n\t\t$this.initContextMenu();\n\t\t$this.initDashBoard();\n\t\t$this.autoOpenEditOnlyViewIfNecessary();\n\n\t\tTTPromise.resolve( 'BaseViewController', 'initialize' );\n\t\t// } );\n\t}\n\n\tautoOpenEditOnlyViewIfNecessary() {\n\t\tif ( LocalCacheData.getAllURLArgs() && LocalCacheData.getAllURLArgs().sm && !LocalCacheData.current_open_edit_only_controller ) {\n\t\t\tif ( LocalCacheData.getAllURLArgs().sm.indexOf( 'Report' ) < 0 ) {\n\t\t\t\tIndexViewController.openEditView( this, LocalCacheData.getAllURLArgs().sm, LocalCacheData.getAllURLArgs().sid );\n\t\t\t} else {\n\t\t\t\tIndexViewController.openReport( this, LocalCacheData.getAllURLArgs().sm );\n\t\t\t\tif ( LocalCacheData.getAllURLArgs().sid ) {\n\t\t\t\t\tLocalCacheData.default_edit_id_for_next_open_edit_view