mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Move all egw_action constants into egw_action_constants
This commit is contained in:
parent
be0af7be68
commit
b4c4606c22
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 = {};
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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";
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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";
|
||||
|
||||
/**
|
||||
|
@ -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";
|
||||
/**
|
||||
|
@ -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";
|
||||
|
||||
|
@ -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";
|
||||
/**
|
||||
|
@ -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";
|
||||
|
||||
|
@ -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
|
||||
|
@ -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";
|
||||
|
||||
|
@ -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');
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user