From b4c4606c227df7ba89ea8f889ded0744d3fd5f5c Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 14 Jun 2021 13:45:57 +0200 Subject: [PATCH] Move all egw_action constants into egw_action_constants --- api/js/egw_action/egw_action.js | 50 +++++++------------ api/js/egw_action/egw_action_common.js | 2 +- api/js/egw_action/egw_action_dragdrop.js | 1 + api/js/egw_action/egw_action_popup.js | 1 + api/js/egw_action/egw_dragdrop_dhtmlx_tree.js | 4 +- api/js/egw_action/egw_keymanager.js | 3 +- api/js/egw_action/egw_menu.js | 7 +++ api/js/etemplate/et2_core_DOMWidget.js | 3 +- api/js/etemplate/et2_core_DOMWidget.ts | 4 +- api/js/etemplate/et2_dataview_controller.js | 2 +- api/js/etemplate/et2_dataview_controller.ts | 2 +- .../et2_dataview_controller_selection.js | 3 +- .../et2_dataview_controller_selection.ts | 8 +-- api/js/etemplate/et2_dataview_view_aoi.js | 3 +- api/js/etemplate/et2_dataview_view_aoi.ts | 6 +-- .../et2_extension_nextmatch_controller.js | 3 +- .../et2_extension_nextmatch_controller.ts | 5 +- api/js/etemplate/et2_widget_tree.js | 3 +- api/js/etemplate/et2_widget_tree.ts | 3 +- api/src/Framework/Bundle.php | 1 + calendar/js/et2_widget_timegrid.js | 3 +- calendar/js/et2_widget_timegrid.ts | 3 +- calendar/js/et2_widget_view.js | 1 - 23 files changed, 62 insertions(+), 59 deletions(-) diff --git a/api/js/egw_action/egw_action.js b/api/js/egw_action/egw_action.js index 946c10a8f7..e523f2bcda 100644 --- a/api/js/egw_action/egw_action.js +++ b/api/js/egw_action/egw_action.js @@ -11,7 +11,23 @@ /*egw:uses egw_action_common; */ - +import { + EGW_AO_STATE_NORMAL, + EGW_AO_STATE_VISIBLE, + EGW_AO_STATE_SELECTED, + EGW_AO_STATE_FOCUSED, + EGW_AO_SHIFT_STATE_MULTI, + EGW_AO_SHIFT_STATE_NONE, + EGW_AO_FLAG_IS_CONTAINER, + EGW_AO_SHIFT_STATE_BLOCK, + EGW_KEY_ARROW_UP, + EGW_KEY_ARROW_DOWN, + EGW_KEY_PAGE_UP, + EGW_KEY_PAGE_DOWN, + EGW_AO_EXEC_THIS, + EGW_AO_EXEC_SELECTED, + EGW_KEY_A, EGW_KEY_SPACE +} from './egw_action_constants.js'; import {egwFnct, egwActionStoreJSON, egwBitIsSet, egwQueueCallback, egwSetBit, egwObjectLength} from './egw_action_common.js'; import './egw_action_popup.js'; import "./egw_action_dragdrop.js"; @@ -1043,32 +1059,6 @@ egwActionLink.prototype.set_actionId = function(_value) throw "Action object with id '"+_value+"' does not exist!"; }; -/** egwActionObject Object **/ - -//State bitmask (only use powers of two for new states!) -export const EGW_AO_STATE_NORMAL = 0x00; -export const EGW_AO_STATE_SELECTED = 0x01; -export const EGW_AO_STATE_FOCUSED = 0x02; -export const EGW_AO_STATE_VISIBLE = 0x04; //< Can only be set by the AOI, means that the object is attached to the DOM-Tree and visible - -export const EGW_AO_EVENT_DRAG_OVER_ENTER = 0x00; -export const EGW_AO_EVENT_DRAG_OVER_LEAVE = 0x01; - -// No shift key is pressed -export const EGW_AO_SHIFT_STATE_NONE = 0x00; -// A shift key, which allows multiselection is pressed (usually CTRL on a PC keyboard) -export const EGW_AO_SHIFT_STATE_MULTI = 0x01; -// A shift key is pressed, which forces blockwise selection (SHIFT on a PC keyboard) -export const EGW_AO_SHIFT_STATE_BLOCK = 0x02; - -// If this flag is set, this object will not be returned as "focused". If this -// flag is not applied to container objects, it may lead to some strange behaviour. -export const EGW_AO_FLAG_IS_CONTAINER = 0x01; - -// If this flag is set, the object will gets its focus when no other object is -// selected and e.g. a key is pressed. -export const EGW_AO_FLAG_DEFAULT_FOCUS = 0x02; - /** * The egwActionObject represents an abstract object to which actions may be * applied. Communication with the DOM tree is established by using the @@ -2070,8 +2060,6 @@ egwActionObject.prototype.makeVisible = function() this.iface.makeVisible(); }; -export const EGW_AO_EXEC_SELECTED = 0; -export const EGW_AO_EXEC_THIS = 1; /** * Executes the action implementation which is associated to the given action type. @@ -2536,7 +2524,3 @@ export function egwActionObjectManager(_id, _manager) return ao; } - -export const EGW_AI_DRAG = 0x0100; // Use the first byte as mask for event types - 01 is for events used with drag stuff -export const EGW_AI_DRAG_OUT = EGW_AI_DRAG | 0x01; -export const EGW_AI_DRAG_OVER = EGW_AI_DRAG | 0x02; diff --git a/api/js/egw_action/egw_action_common.js b/api/js/egw_action/egw_action_common.js index f8309a8f71..e250edaaa7 100644 --- a/api/js/egw_action/egw_action_common.js +++ b/api/js/egw_action/egw_action_common.js @@ -8,7 +8,7 @@ * @package egw_action */ -import {EGW_AO_SHIFT_STATE_BLOCK, EGW_AO_SHIFT_STATE_MULTI, EGW_AO_SHIFT_STATE_NONE} from "./egw_action.js"; +import {EGW_AO_SHIFT_STATE_BLOCK, EGW_AO_SHIFT_STATE_MULTI, EGW_AO_SHIFT_STATE_NONE} from "./egw_action_constants.js"; /** * Sets properties given in _data in _obj. Checks whether the property keys diff --git a/api/js/egw_action/egw_action_dragdrop.js b/api/js/egw_action/egw_action_dragdrop.js index fbc41c07a1..c73a241ab0 100644 --- a/api/js/egw_action/egw_action_dragdrop.js +++ b/api/js/egw_action/egw_action_dragdrop.js @@ -17,6 +17,7 @@ */ import {egwAction,egwActionImplementation} from "./egw_action.js"; +import {EGW_AI_DRAG_OUT, EGW_AI_DRAG_OVER} from "./egw_action_constants.js"; /** * Register the drag and drop handlers diff --git a/api/js/egw_action/egw_action_popup.js b/api/js/egw_action/egw_action_popup.js index a6fbcecd88..7ab9f6635f 100644 --- a/api/js/egw_action/egw_action_popup.js +++ b/api/js/egw_action/egw_action_popup.js @@ -18,6 +18,7 @@ import {egwAction, egwActionImplementation, egwActionObject} from './egw_action.js'; import {egwFnct} from './egw_action_common.js'; import {egwMenu, _egw_active_menu} from "./egw_menu.js"; +import {EGW_KEY_ENTER, EGW_KEY_MENU} from "./egw_action_constants.js"; if (typeof window._egwActionClasses == "undefined") window._egwActionClasses = {}; diff --git a/api/js/egw_action/egw_dragdrop_dhtmlx_tree.js b/api/js/egw_action/egw_dragdrop_dhtmlx_tree.js index 8dde9e7b7f..827fcbd617 100644 --- a/api/js/egw_action/egw_dragdrop_dhtmlx_tree.js +++ b/api/js/egw_action/egw_dragdrop_dhtmlx_tree.js @@ -11,9 +11,9 @@ /*egw:uses egw_action; */ - -import {EGW_AO_STATE_FOCUSED, EGW_AO_STATE_SELECTED, egwActionObjectInterface, EGW_AI_DRAG_OVER, EGW_AI_DRAG_OUT} from "./egw_action.js"; +import {egwActionObjectInterface} from "./egw_action.js"; import {egwBitIsSet} from "./egw_action_common.js"; +import {EGW_AI_DRAG_OUT, EGW_AI_DRAG_OVER, EGW_AO_STATE_FOCUSED, EGW_AO_STATE_SELECTED} from "./egw_action_constants.js"; /** * This file contains an egw_actionObjectInterface which allows a dhtmlx tree diff --git a/api/js/egw_action/egw_keymanager.js b/api/js/egw_action/egw_keymanager.js index f6291ba7b9..c27545be5d 100644 --- a/api/js/egw_action/egw_keymanager.js +++ b/api/js/egw_action/egw_keymanager.js @@ -13,8 +13,9 @@ egw_action; */ -import {EGW_AO_EXEC_SELECTED,egw_globalObjectManager} from "./egw_action.js"; +import {egw_getAppObjectManager, egw_globalObjectManager} from "./egw_action.js"; import {_egw_active_menu} from "./egw_menu.js"; +import {EGW_AO_FLAG_DEFAULT_FOCUS, EGW_AO_EXEC_SELECTED} from "./egw_action_constants.js"; /** * Define the key constants (IE doesn't support "const" keyword) diff --git a/api/js/egw_action/egw_menu.js b/api/js/egw_action/egw_menu.js index a24eb93180..9dc792907c 100644 --- a/api/js/egw_action/egw_menu.js +++ b/api/js/egw_action/egw_menu.js @@ -11,6 +11,13 @@ */ import {egwMenuImpl} from './egw_menu_dhtmlx.js'; import {egw_shortcutIdx} from './egw_keymanager.js'; +import { + EGW_KEY_ARROW_DOWN, + EGW_KEY_ARROW_LEFT, + EGW_KEY_ARROW_RIGHT, + EGW_KEY_ARROW_UP, EGW_KEY_ENTER, + EGW_KEY_ESCAPE +} from "./egw_action_constants.js"; //Global variable which is used to store the currently active menu so that it //may be closed when another menu openes export var _egw_active_menu = null; diff --git a/api/js/etemplate/et2_core_DOMWidget.js b/api/js/etemplate/et2_core_DOMWidget.js index 90a51378f6..c6b87f5817 100644 --- a/api/js/etemplate/et2_core_DOMWidget.js +++ b/api/js/etemplate/et2_core_DOMWidget.js @@ -16,7 +16,8 @@ import { ClassWithAttributes } from './et2_core_inheritance'; import { et2_IDOMNode } from "./et2_core_interfaces"; import { et2_hasChild, et2_no_init } from "./et2_core_common"; import { et2_widget } from "./et2_core_widget"; -import { egw_getActionManager, egwActionObject, egwActionObjectInterface, egw_getAppObjectManager, EGW_AI_DRAG_OVER, EGW_AI_DRAG_OUT } from '../egw_action/egw_action.js'; +import { egw_getActionManager, egwActionObject, egwActionObjectInterface, egw_getAppObjectManager } from '../egw_action/egw_action.js'; +import { EGW_AI_DRAG_OVER, EGW_AI_DRAG_OUT } from '../egw_action/egw_action_constants.js'; import { egw } from "../jsapi/egw_global"; /** * Abstract widget class which can be inserted into the DOM. All widget classes diff --git a/api/js/etemplate/et2_core_DOMWidget.ts b/api/js/etemplate/et2_core_DOMWidget.ts index f98f6d0b66..a39d9eb20a 100644 --- a/api/js/etemplate/et2_core_DOMWidget.ts +++ b/api/js/etemplate/et2_core_DOMWidget.ts @@ -22,9 +22,9 @@ import { egw_getActionManager, egwActionObject, egwActionObjectInterface, - egw_getAppObjectManager, - EGW_AI_DRAG_OVER, EGW_AI_DRAG_OUT + egw_getAppObjectManager } from '../egw_action/egw_action.js'; +import {EGW_AI_DRAG_OVER, EGW_AI_DRAG_OUT} from '../egw_action/egw_action_constants.js'; import {egw} from "../jsapi/egw_global"; // fixing circular dependencies by only importing type import type {et2_tabbox} from "./et2_widget_tabs"; diff --git a/api/js/etemplate/et2_dataview_controller.js b/api/js/etemplate/et2_dataview_controller.js index 47a3513192..b44d14621c 100644 --- a/api/js/etemplate/et2_dataview_controller.js +++ b/api/js/etemplate/et2_dataview_controller.js @@ -13,7 +13,7 @@ import { et2_dataview_row } from "./et2_dataview_view_row"; import { et2_arrayIntKeys, et2_bounds } from "./et2_core_common"; import { egw } from "../jsapi/egw_global"; import { egwBitIsSet } from "../egw_action/egw_action_common.js"; -import { EGW_AO_STATE_NORMAL, EGW_AO_STATE_SELECTED } from "../egw_action/egw_action.js"; +import { EGW_AO_STATE_NORMAL, EGW_AO_STATE_SELECTED } from "../egw_action/egw_action_constants.js"; /** * The fetch timeout specifies the time during which the controller tries to * consolidate requests for rows. diff --git a/api/js/etemplate/et2_dataview_controller.ts b/api/js/etemplate/et2_dataview_controller.ts index 24d373cb59..6ce52810fa 100644 --- a/api/js/etemplate/et2_dataview_controller.ts +++ b/api/js/etemplate/et2_dataview_controller.ts @@ -28,7 +28,7 @@ import {et2_dataview_grid} from "./et2_dataview_view_grid"; import {et2_arrayIntKeys, et2_bounds} from "./et2_core_common"; import {egw} from "../jsapi/egw_global"; import {egwBitIsSet} from "../egw_action/egw_action_common.js"; -import {EGW_AO_STATE_NORMAL, EGW_AO_STATE_SELECTED} from "../egw_action/egw_action.js"; +import {EGW_AO_STATE_NORMAL, EGW_AO_STATE_SELECTED} from "../egw_action/egw_action_constants.js"; /** * The fetch timeout specifies the time during which the controller tries to diff --git a/api/js/etemplate/et2_dataview_controller_selection.js b/api/js/etemplate/et2_dataview_controller_selection.js index ad83f925f8..3e8d0cf740 100644 --- a/api/js/etemplate/et2_dataview_controller_selection.js +++ b/api/js/etemplate/et2_dataview_controller_selection.js @@ -18,7 +18,8 @@ import { et2_bounds } from "./et2_core_common"; import { et2_dialog } from "./et2_widget_dialog"; import { et2_createWidget } from "./et2_core_widget"; import { et2_dataview_rowAOI } from "./et2_dataview_view_aoi"; -import { EGW_AO_SHIFT_STATE_BLOCK, EGW_AO_SHIFT_STATE_MULTI, EGW_AO_STATE_FOCUSED, EGW_AO_STATE_NORMAL, EGW_AO_STATE_SELECTED, egwActionObjectInterface } from "../egw_action/egw_action.js"; +import { egwActionObjectInterface } from "../egw_action/egw_action.js"; +import { EGW_AO_SHIFT_STATE_BLOCK, EGW_AO_SHIFT_STATE_MULTI, EGW_AO_STATE_FOCUSED, EGW_AO_STATE_NORMAL, EGW_AO_STATE_SELECTED } from "../egw_action/egw_action_constants.js"; import { egwBitIsSet, egwSetBit } from "../egw_action/egw_action_common.js"; /** * The selectioManager is internally used by the et2_dataview_controller class diff --git a/api/js/etemplate/et2_dataview_controller_selection.ts b/api/js/etemplate/et2_dataview_controller_selection.ts index aea9bb8fec..8836d66402 100644 --- a/api/js/etemplate/et2_dataview_controller_selection.ts +++ b/api/js/etemplate/et2_dataview_controller_selection.ts @@ -21,10 +21,12 @@ import {et2_dialog} from "./et2_widget_dialog"; import {et2_createWidget} from "./et2_core_widget"; import {et2_dataview_rowAOI} from "./et2_dataview_view_aoi"; import { - EGW_AO_SHIFT_STATE_BLOCK, EGW_AO_SHIFT_STATE_MULTI, - EGW_AO_STATE_FOCUSED, EGW_AO_STATE_NORMAL, - EGW_AO_STATE_SELECTED, egwActionObjectInterface + egwActionObjectInterface } from "../egw_action/egw_action.js"; +import { + EGW_AO_SHIFT_STATE_BLOCK, EGW_AO_SHIFT_STATE_MULTI, + EGW_AO_STATE_FOCUSED, EGW_AO_STATE_NORMAL, EGW_AO_STATE_SELECTED +} from "../egw_action/egw_action_constants.js"; import {egwBitIsSet, egwSetBit} from "../egw_action/egw_action_common.js"; /** diff --git a/api/js/etemplate/et2_dataview_view_aoi.js b/api/js/etemplate/et2_dataview_view_aoi.js index 764fa59520..b1fd55e426 100644 --- a/api/js/etemplate/et2_dataview_view_aoi.js +++ b/api/js/etemplate/et2_dataview_view_aoi.js @@ -13,7 +13,8 @@ egw_action.egw_action; /vendor/bower-asset/jquery-touchswipe/jquery.touchSwipe.js; */ -import { EGW_AO_SHIFT_STATE_MULTI, EGW_AO_STATE_FOCUSED, EGW_AO_STATE_SELECTED, egwActionObjectInterface } from "../egw_action/egw_action.js"; +import { egwActionObjectInterface } from "../egw_action/egw_action.js"; +import { EGW_AO_SHIFT_STATE_MULTI, EGW_AO_STATE_FOCUSED, EGW_AO_STATE_SELECTED } from '../egw_action/egw_action_constants.js'; import { egwBitIsSet, egwGetShiftState, egwPreventSelect, egwSetBit, egwUnfocus, egwIsMobile } from "../egw_action/egw_action_common.js"; import { _egw_active_menu } from "../egw_action/egw_menu.js"; /** diff --git a/api/js/etemplate/et2_dataview_view_aoi.ts b/api/js/etemplate/et2_dataview_view_aoi.ts index 803bc09c42..f6e0fde487 100644 --- a/api/js/etemplate/et2_dataview_view_aoi.ts +++ b/api/js/etemplate/et2_dataview_view_aoi.ts @@ -16,11 +16,11 @@ */ import { - EGW_AO_SHIFT_STATE_MULTI, - EGW_AO_STATE_FOCUSED, - EGW_AO_STATE_SELECTED, egwActionObjectInterface } from "../egw_action/egw_action.js"; +import {EGW_AO_SHIFT_STATE_MULTI, + EGW_AO_STATE_FOCUSED, + EGW_AO_STATE_SELECTED} from '../egw_action/egw_action_constants.js'; import {egwBitIsSet, egwGetShiftState, egwPreventSelect, egwSetBit, egwUnfocus, egwIsMobile} from "../egw_action/egw_action_common.js"; import {_egw_active_menu} from "../egw_action/egw_menu.js"; diff --git a/api/js/etemplate/et2_extension_nextmatch_controller.js b/api/js/etemplate/et2_extension_nextmatch_controller.js index 473008389e..489cf24f11 100644 --- a/api/js/etemplate/et2_extension_nextmatch_controller.js +++ b/api/js/etemplate/et2_extension_nextmatch_controller.js @@ -13,7 +13,8 @@ import { et2_dataview_tile } from "./et2_dataview_view_tile"; import { et2_dataview_controller } from "./et2_dataview_controller"; import { et2_dataview_column } from "./et2_dataview_model_columns"; import { framework, egw } from "../jsapi/egw_global"; -import { egw_getActionManager, egw_getObjectManager, egwActionObjectManager, egwActionObject, EGW_AO_FLAG_DEFAULT_FOCUS, EGW_AO_EXEC_SELECTED, EGW_AO_FLAG_IS_CONTAINER } from "../egw_action/egw_action.js"; +import { egw_getActionManager, egw_getObjectManager, egwActionObjectManager, egwActionObject } from "../egw_action/egw_action.js"; +import { EGW_AO_FLAG_DEFAULT_FOCUS, EGW_AO_EXEC_SELECTED, EGW_AO_FLAG_IS_CONTAINER } from "../egw_action/egw_action_constants.js"; import { nm_action } from "./et2_extension_nextmatch_actions.js"; import { egwIsMobile } from "../egw_action/egw_action_common.js"; /** diff --git a/api/js/etemplate/et2_extension_nextmatch_controller.ts b/api/js/etemplate/et2_extension_nextmatch_controller.ts index fbdfe6c7a3..4f2552d282 100644 --- a/api/js/etemplate/et2_extension_nextmatch_controller.ts +++ b/api/js/etemplate/et2_extension_nextmatch_controller.ts @@ -34,10 +34,9 @@ import { egw_getActionManager, egw_getObjectManager, egwActionObjectManager, - egwActionObject, - EGW_AO_FLAG_DEFAULT_FOCUS, - EGW_AO_EXEC_SELECTED, EGW_AO_FLAG_IS_CONTAINER + egwActionObject } from "../egw_action/egw_action.js"; +import {EGW_AO_FLAG_DEFAULT_FOCUS,EGW_AO_EXEC_SELECTED, EGW_AO_FLAG_IS_CONTAINER} from "../egw_action/egw_action_constants.js"; import {nm_action} from "./et2_extension_nextmatch_actions.js"; import {egwIsMobile} from "../egw_action/egw_action_common.js"; diff --git a/api/js/etemplate/et2_widget_tree.js b/api/js/etemplate/et2_widget_tree.js index c10fc035ad..3e288e710f 100644 --- a/api/js/etemplate/et2_widget_tree.js +++ b/api/js/etemplate/et2_widget_tree.js @@ -24,7 +24,8 @@ import { et2_inputWidget } from "./et2_core_inputWidget"; import { ClassWithAttributes } from "./et2_core_inheritance"; import { et2_no_init } from "./et2_core_common"; import { egw, framework } from "../jsapi/egw_global"; -import { EGW_AO_FLAG_IS_CONTAINER, egw_getAppObjectManager, egw_getObjectManager, egwActionObject } from "../egw_action/egw_action.js"; +import { egw_getAppObjectManager, egw_getObjectManager, egwActionObject } from "../egw_action/egw_action.js"; +import { EGW_AO_FLAG_IS_CONTAINER } from "../egw_action/egw_action_constants.js"; import { dhtmlxtreeItemAOI } from "../egw_action/egw_dragdrop_dhtmlx_tree.js"; import { egwIsMobile } from "../egw_action/egw_action_common.js"; /* no module, but egw:uses is ignored, so adding it here commented out diff --git a/api/js/etemplate/et2_widget_tree.ts b/api/js/etemplate/et2_widget_tree.ts index 7fa117355f..908eaf2e27 100644 --- a/api/js/etemplate/et2_widget_tree.ts +++ b/api/js/etemplate/et2_widget_tree.ts @@ -26,7 +26,8 @@ import {et2_inputWidget} from "./et2_core_inputWidget"; import {ClassWithAttributes} from "./et2_core_inheritance"; import {et2_no_init} from "./et2_core_common"; import {egw, framework} from "../jsapi/egw_global"; -import {EGW_AO_FLAG_IS_CONTAINER, egw_getAppObjectManager, egw_getObjectManager, egwActionObject} from "../egw_action/egw_action.js"; +import {egw_getAppObjectManager, egw_getObjectManager, egwActionObject} from "../egw_action/egw_action.js"; +import {EGW_AO_FLAG_IS_CONTAINER} from "../egw_action/egw_action_constants.js"; import {dhtmlxtreeItemAOI} from "../egw_action/egw_dragdrop_dhtmlx_tree.js"; import {egwIsMobile} from "../egw_action/egw_action_common.js"; diff --git a/api/src/Framework/Bundle.php b/api/src/Framework/Bundle.php index a300d18e92..6895aa625e 100644 --- a/api/src/Framework/Bundle.php +++ b/api/src/Framework/Bundle.php @@ -234,6 +234,7 @@ class Bundle $inc_mgr->include_js_file('/api/js/dhtmlxtree/sources/dhtmlxtree.js'); $inc_mgr->include_js_file('/api/js/dhtmlxtree/sources/ext/dhtmlxtree_json.js'); // actions + $inc_mgr->include_js_file('/api/js/egw_action/egw_action_constants.js'); $inc_mgr->include_js_file('/api/js/egw_action/egw_action.js'); $inc_mgr->include_js_file('/api/js/egw_action/egw_keymanager.js'); $inc_mgr->include_js_file('/api/js/egw_action/egw_action_popup.js'); diff --git a/calendar/js/et2_widget_timegrid.js b/calendar/js/et2_widget_timegrid.js index 71f0a221ee..b44be88ded 100644 --- a/calendar/js/et2_widget_timegrid.js +++ b/calendar/js/et2_widget_timegrid.js @@ -20,10 +20,11 @@ import { egw } from "../../api/js/jsapi/egw_global"; import { et2_no_init } from "../../api/js/etemplate/et2_core_common"; import { et2_IResizeable } from "../../api/js/etemplate/et2_core_interfaces"; import { et2_calendar_event } from "./et2_widget_event"; -import { EGW_AI_DRAG_OVER, EGW_AI_DRAG_OUT, egwActionObject, egw_getObjectManager } from "../../api/js/egw_action/egw_action.js"; +import { egwActionObject, egw_getObjectManager } from "../../api/js/egw_action/egw_action.js"; import { et2_compileLegacyJS } from "../../api/js/etemplate/et2_core_legacyJSFunctions"; import { et2_dialog } from "../../api/js/etemplate/et2_widget_dialog"; import { sprintf } from "../../api/js/egw_action/egw_action_common.js"; +import { EGW_AI_DRAG_OUT, EGW_AI_DRAG_OVER } from "../../api/js/egw_action/egw_action_constants.js"; /** * Class which implements the "calendar-timegrid" XET-Tag for displaying a span of days * diff --git a/calendar/js/et2_widget_timegrid.ts b/calendar/js/et2_widget_timegrid.ts index fa20f1c0aa..fe22c98d78 100644 --- a/calendar/js/et2_widget_timegrid.ts +++ b/calendar/js/et2_widget_timegrid.ts @@ -23,10 +23,11 @@ import {egw} from "../../api/js/jsapi/egw_global"; import {et2_no_init} from "../../api/js/etemplate/et2_core_common"; import {et2_IDetachedDOM, et2_IPrint, et2_IResizeable} from "../../api/js/etemplate/et2_core_interfaces"; import {et2_calendar_event} from "./et2_widget_event"; -import {EGW_AI_DRAG_OVER, EGW_AI_DRAG_OUT, egwActionObject, egw_getObjectManager} from "../../api/js/egw_action/egw_action.js"; +import {egwActionObject, egw_getObjectManager} from "../../api/js/egw_action/egw_action.js"; import {et2_compileLegacyJS} from "../../api/js/etemplate/et2_core_legacyJSFunctions"; import {et2_dialog} from "../../api/js/etemplate/et2_widget_dialog"; import {sprintf} from "../../api/js/egw_action/egw_action_common.js"; +import {EGW_AI_DRAG_OUT, EGW_AI_DRAG_OVER} from "../../api/js/egw_action/egw_action_constants.js"; /** * Class which implements the "calendar-timegrid" XET-Tag for displaying a span of days diff --git a/calendar/js/et2_widget_view.js b/calendar/js/et2_widget_view.js index 76c562d760..13fb1ed9d8 100644 --- a/calendar/js/et2_widget_view.js +++ b/calendar/js/et2_widget_view.js @@ -14,7 +14,6 @@ import { et2_createWidget } from "../../api/js/etemplate/et2_core_widget"; import { et2_valueWidget } from "../../api/js/etemplate/et2_core_valueWidget"; import { ClassWithAttributes } from "../../api/js/etemplate/et2_core_inheritance"; import { sprintf } from "../../api/js/egw_action/egw_action_common.js"; - /** * Parent class for the various calendar views to reduce copied code *