import { Global } from "../../Core/Globals" import { EventManager } from "../../Core/Events" import { Ui } from "../../Core/Ui" import * as Events from "../../Core/EventDefinitions" import { LocalizationManager } from "../../Core/Localization" import { Tab } from "@syncfusion/ej2-navigations"; import * as Utility from "../../Core/Utility"; import { FormValidation } from "../../Core/Forms" import * as Models from "../../Common/Models"; import { Query, DataManager, UrlAdaptor } from "@syncfusion/ej2-data"; import { AutoComplete } from '@syncfusion/ej2-dropdowns'; import { NumericTextBox } from "@syncfusion/ej2-inputs"; import { Uppload, Local, xhrUploader, Crop, Rotate, Flip, Blur, Brightness, Contrast, Grayscale, Saturate } from "uppload"; import { Switch } from '@syncfusion/ej2-buttons'; import { DatePicker, ChangedEventArgs } from "@syncfusion/ej2-calendars"; import * as UpploadHelper from "../../Common/UpploadLanguages" class OrderDetailsCustomerModule { private _moduleName = "OrderDetailsCustomerModule"; private _component = "#orderDetailsCustomerContainer"; private _global: Global; private _eventManager: EventManager; private _uiManager: Ui; private _localizationMananger: LocalizationManager; private _tab: Tab; constructor() { this._global = Global.getInstance(); this._eventManager = EventManager.getInstance(); this._uiManager = Ui.getInstance(); this._localizationMananger = LocalizationManager.getInstance(); } /** * Stellt einen Prefix vor einen Selektor * @param selector */ private prefix(selector: string): string { const self = this; if ($(`${self._component} ${selector}`).length > 0) return `${self._component} ${selector}`; return `html ${selector}`; } /** * Bindungen erstellen */ private setupBindings(): void { var self = this; $(self.prefix("#btnBack")).off("click").on("click", function () { self._uiManager.pageTitleClear(self._component); self._eventManager.unSubscribeAll(self._moduleName); self._eventManager.publish(Events.Order.detailsBack); }); self._tab = new Tab({ animation: { previous: { effect: "FadeIn", duration: 100 }, next: { effect: "FadeIn", duration: 100 } }, selecting: (arsg: any) => { if (arsg.isSwiped) { arsg.cancel = true; } }, selected: (args: any) => { if (args.selectedIndex === 1) { } } }); self._tab.appendTo(self.prefix("#tabContainer")); $('[data-toggle="tooltip"]').tooltip(); } /** * Aktivieren des Moduls */ public activate(): void { var self = this; $.setupValidator(); $.reinitializeValidator(); this.setupBindings(); self._uiManager.pageTitleAdd(self._component, self.prefix("#pageTitleAdd")); $.randomAutocompleteValue(); } /** * Initialisieren des Moduls */ public init(): void { if (this._global.appInitialized) { orderDetailsCustomerModule.activate(); } else { setTimeout(() => { this.init() }, 10); } } } let orderDetailsCustomerModule = new OrderDetailsCustomerModule(); orderDetailsCustomerModule.init();