got empty nextmatch in timesheet working

This commit is contained in:
Ralf Becker 2021-06-08 14:11:59 +02:00
parent f91bca83e1
commit 304dbb95ab
33 changed files with 187 additions and 148 deletions

View File

@ -13,6 +13,11 @@
egw_action_common; egw_action_common;
*/ */
import {egwFnct, egwActionStoreJSON, egwBitIsSet, egwQueueCallback, egwSetBit, egwObjectLength} from './egw_action_common.js';
import './egw_action_popup.js';
import "./egw_action_dragdrop.js";
import "./egw_menu_dhtmlx.js";
/** /**
* Getter functions for the global egwActionManager and egwObjectManager objects * Getter functions for the global egwActionManager and egwObjectManager objects
*/ */
@ -33,7 +38,7 @@ var egw_globalObjectManager = null;
* @param {number} [_search_depth=Infinite] How deep into existing action children * @param {number} [_search_depth=Infinite] How deep into existing action children
* to search. * to search.
*/ */
function egw_getActionManager(_id, _create,_search_depth) { export function egw_getActionManager(_id, _create,_search_depth) {
if (typeof _create == 'undefined') { if (typeof _create == 'undefined') {
_create = true; _create = true;
} }
@ -70,7 +75,7 @@ function egw_getActionManager(_id, _create,_search_depth) {
* @param {number} [_search_depth=Infinite] How deep into existing action children * @param {number} [_search_depth=Infinite] How deep into existing action children
* to search. * to search.
*/ */
function egw_getObjectManager(_id, _create, _search_depth) { export function egw_getObjectManager(_id, _create, _search_depth) {
if (typeof _create == "undefined") { if (typeof _create == "undefined") {
_create = true; _create = true;
} }
@ -106,7 +111,7 @@ function egw_getObjectManager(_id, _create, _search_depth) {
* @param {string} _appName //appname might not always be the current app, e.g. running app content under admin tab * @param {string} _appName //appname might not always be the current app, e.g. running app content under admin tab
* @return {egwActionObjectManager} * @return {egwActionObjectManager}
*/ */
function egw_getAppObjectManager(_create, _appName) { export function egw_getAppObjectManager(_create, _appName) {
return egw_getObjectManager(_appName ? _appName : egw_getAppName(), _create,1); return egw_getObjectManager(_appName ? _appName : egw_getAppName(), _create,1);
} }
@ -116,7 +121,7 @@ function egw_getAppObjectManager(_create, _appName) {
* @param {boolean} _create * @param {boolean} _create
* @return {egwActionManager} * @return {egwActionManager}
*/ */
function egw_getAppActionManager(_create) { export function egw_getAppActionManager(_create) {
return egw_getActionManager(egw_getAppName(), _create,1); return egw_getActionManager(egw_getAppName(), _create,1);
} }
@ -131,7 +136,7 @@ function egw_getAppActionManager(_create) {
* @param {function} _executeEvent * @param {function} _executeEvent
* @return {egwActionHandler} * @return {egwActionHandler}
*/ */
function egwActionHandler(_executeEvent) export function egwActionHandler(_executeEvent)
{ {
//Copy the executeEvent parameter //Copy the executeEvent parameter
this.execute = _executeEvent; this.execute = _executeEvent;
@ -166,7 +171,7 @@ _egwActionClasses["actionManager"] = {
* @param {boolean} _allowOnMultiple * @param {boolean} _allowOnMultiple
* @returns {egwAction} * @returns {egwAction}
*/ */
function egwAction(_parent, _id, _caption, _iconUrl, _onExecute, _allowOnMultiple) export function egwAction(_parent, _id, _caption, _iconUrl, _onExecute, _allowOnMultiple)
{ {
//Default and check the values //Default and check the values
if (_parent && (typeof _id != "string" || !_id) && _parent.type != "actionManager") if (_parent && (typeof _id != "string" || !_id) && _parent.type != "actionManager")
@ -813,6 +818,7 @@ function _egwActionTreeContains(_tree, _elem)
*/ */
egwAction.prototype.appendToTree = function(_tree, _addChildren) egwAction.prototype.appendToTree = function(_tree, _addChildren)
{ {
let _addParent = false;
if (typeof _addChildren == "undefined") if (typeof _addChildren == "undefined")
{ {
_addChildren = true; _addChildren = true;
@ -914,7 +920,7 @@ egwAction.prototype.getManager = function() {
* @param {string} _id * @param {string} _id
* @return {egwActionManager} * @return {egwActionManager}
*/ */
function egwActionManager(_parent, _id) export function egwActionManager(_parent, _id)
{ {
if (typeof _parent == 'undefined') { if (typeof _parent == 'undefined') {
_parent = null; _parent = null;
@ -946,7 +952,7 @@ function egwActionManager(_parent, _id)
* *
* @return {egwActionImplementation} * @return {egwActionImplementation}
*/ */
function egwActionImplementation() export function egwActionImplementation()
{ {
this.doRegisterAction = function() {throw "Abstract function call: registerAction";}; this.doRegisterAction = function() {throw "Abstract function call: registerAction";};
this.doUnregisterAction = function() {throw "Abstract function call: unregisterAction";}; this.doUnregisterAction = function() {throw "Abstract function call: unregisterAction";};
@ -1005,7 +1011,7 @@ egwActionImplementation.prototype.executeImplementation = function(_context, _se
* @param _manager is a reference to the egwActionManager whic contains the action * @param _manager is a reference to the egwActionManager whic contains the action
* the object wants to link to. * the object wants to link to.
*/ */
function egwActionLink(_manager) export function egwActionLink(_manager)
{ {
this.enabled = true; this.enabled = true;
this.visible = true; this.visible = true;
@ -1041,28 +1047,28 @@ egwActionLink.prototype.set_actionId = function(_value)
/** egwActionObject Object **/ /** egwActionObject Object **/
//State bitmask (only use powers of two for new states!) //State bitmask (only use powers of two for new states!)
var EGW_AO_STATE_NORMAL = 0x00; export const EGW_AO_STATE_NORMAL = 0x00;
var EGW_AO_STATE_SELECTED = 0x01; export const EGW_AO_STATE_SELECTED = 0x01;
var EGW_AO_STATE_FOCUSED = 0x02; export const EGW_AO_STATE_FOCUSED = 0x02;
var 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_STATE_VISIBLE = 0x04; //< Can only be set by the AOI, means that the object is attached to the DOM-Tree and visible
var EGW_AO_EVENT_DRAG_OVER_ENTER = 0x00; export const EGW_AO_EVENT_DRAG_OVER_ENTER = 0x00;
var EGW_AO_EVENT_DRAG_OVER_LEAVE = 0x01; export const EGW_AO_EVENT_DRAG_OVER_LEAVE = 0x01;
// No shift key is pressed // No shift key is pressed
var EGW_AO_SHIFT_STATE_NONE = 0x00; export const EGW_AO_SHIFT_STATE_NONE = 0x00;
// A shift key, which allows multiselection is pressed (usually CTRL on a PC keyboard) // A shift key, which allows multiselection is pressed (usually CTRL on a PC keyboard)
var EGW_AO_SHIFT_STATE_MULTI = 0x01; export const EGW_AO_SHIFT_STATE_MULTI = 0x01;
// A shift key is pressed, which forces blockwise selection (SHIFT on a PC keyboard) // A shift key is pressed, which forces blockwise selection (SHIFT on a PC keyboard)
var EGW_AO_SHIFT_STATE_BLOCK = 0x02; export const EGW_AO_SHIFT_STATE_BLOCK = 0x02;
// If this flag is set, this object will not be returned as "focused". If this // 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. // flag is not applied to container objects, it may lead to some strange behaviour.
var EGW_AO_FLAG_IS_CONTAINER = 0x01; export const EGW_AO_FLAG_IS_CONTAINER = 0x01;
// If this flag is set, the object will gets its focus when no other object is // If this flag is set, the object will gets its focus when no other object is
// selected and e.g. a key is pressed. // selected and e.g. a key is pressed.
var EGW_AO_FLAG_DEFAULT_FOCUS = 0x02; export const EGW_AO_FLAG_DEFAULT_FOCUS = 0x02;
/** /**
* The egwActionObject represents an abstract object to which actions may be * The egwActionObject represents an abstract object to which actions may be
@ -1080,7 +1086,7 @@ var EGW_AO_FLAG_DEFAULT_FOCUS = 0x02;
* @param {number} _flags a set of additional flags being applied to the object, * @param {number} _flags a set of additional flags being applied to the object,
* defaults to 0 * defaults to 0
*/ */
function egwActionObject(_id, _parent, _iface, _manager, _flags) export function egwActionObject(_id, _parent, _iface, _manager, _flags)
{ {
//Preset some parameters //Preset some parameters
if (typeof _manager == "undefined" && typeof _parent == "object" && _parent) if (typeof _manager == "undefined" && typeof _parent == "object" && _parent)
@ -2065,8 +2071,8 @@ egwActionObject.prototype.makeVisible = function()
this.iface.makeVisible(); this.iface.makeVisible();
}; };
var EGW_AO_EXEC_SELECTED = 0; export const EGW_AO_EXEC_SELECTED = 0;
var EGW_AO_EXEC_THIS = 1; export const EGW_AO_EXEC_THIS = 1;
/** /**
* Executes the action implementation which is associated to the given action type. * Executes the action implementation which is associated to the given action type.
@ -2353,7 +2359,7 @@ egwActionObject.prototype.isSelection = function (_event)
* *
* @return {egwActionObjectInterface} * @return {egwActionObjectInterface}
*/ */
function egwActionObjectInterface() export function egwActionObjectInterface()
{ {
//Preset the interface functions //Preset the interface functions
@ -2521,7 +2527,7 @@ var egwActionObjectDummyInterface = egwActionObjectInterface;
* @param {string} _manager * @param {string} _manager
* @return {egwActionObjectManager} * @return {egwActionObjectManager}
*/ */
function egwActionObjectManager(_id, _manager) export function egwActionObjectManager(_id, _manager)
{ {
var ao = new egwActionObject(_id, null, new egwActionObjectInterface(), var ao = new egwActionObject(_id, null, new egwActionObjectInterface(),
_manager, EGW_AO_FLAG_IS_CONTAINER); _manager, EGW_AO_FLAG_IS_CONTAINER);

View File

@ -19,7 +19,7 @@
* @param object _obj is the object where the data will be stored. * @param object _obj is the object where the data will be stored.
* @param mixed _setterOnly false: store everything, true: only store when setter exists, "data" store rest in data property * @param mixed _setterOnly false: store everything, true: only store when setter exists, "data" store rest in data property
*/ */
function egwActionStoreJSON(_data, _obj, _setterOnly) export function egwActionStoreJSON(_data, _obj, _setterOnly)
{ {
for (var key in _data) for (var key in _data)
{ {
@ -52,7 +52,7 @@ function egwActionStoreJSON(_data, _obj, _setterOnly)
* @param boolean _state is whether the bit should be switched on or off * @param boolean _state is whether the bit should be switched on or off
* @returns the new set * @returns the new set
*/ */
function egwSetBit(_set, _bit, _state) export function egwSetBit(_set, _bit, _state)
{ {
if (_state) if (_state)
return _set |= _bit; return _set |= _bit;
@ -63,12 +63,12 @@ function egwSetBit(_set, _bit, _state)
/** /**
* Returns whether the given bit is set in the set. * Returns whether the given bit is set in the set.
*/ */
function egwBitIsSet(_set, _bit) export function egwBitIsSet(_set, _bit)
{ {
return (_set & _bit) > 0; return (_set & _bit) > 0;
} }
function egwObjectLength(_obj) export function egwObjectLength(_obj)
{ {
var len = 0; var len = 0;
for (var k in _obj) len++; for (var k in _obj) len++;
@ -93,7 +93,7 @@ if (typeof Array.prototype.indexOf == "undefined")
/** /**
* Isolates the shift state from an event object * Isolates the shift state from an event object
*/ */
function egwGetShiftState(e) export function egwGetShiftState(e)
{ {
var state = EGW_AO_SHIFT_STATE_NONE; var state = EGW_AO_SHIFT_STATE_NONE;
state = egwSetBit(state, EGW_AO_SHIFT_STATE_MULTI, e.ctrlKey || e.metaKey); state = egwSetBit(state, EGW_AO_SHIFT_STATE_MULTI, e.ctrlKey || e.metaKey);
@ -102,7 +102,7 @@ function egwGetShiftState(e)
return state; return state;
} }
function egwPreventSelect(e) export function egwPreventSelect(e)
{ {
if (egwGetShiftState(e) > EGW_AO_SHIFT_STATE_NONE) if (egwGetShiftState(e) > EGW_AO_SHIFT_STATE_NONE)
{ {
@ -116,11 +116,11 @@ function egwPreventSelect(e)
return true; return true;
} }
function egwResetPreventSelect(elem) export function egwResetPreventSelect(elem)
{ {
} }
function egwUnfocus() export function egwUnfocus()
{ {
if (document.activeElement) if (document.activeElement)
{ {
@ -129,7 +129,7 @@ function egwUnfocus()
} }
function egwCallAbstract(_obj, _fn, _args) export function egwCallAbstract(_obj, _fn, _args)
{ {
if (_fn) if (_fn)
{ {
@ -143,7 +143,7 @@ function egwCallAbstract(_obj, _fn, _args)
return false; return false;
} }
function egwArraysEqual(_ar1, _ar2) export function egwArraysEqual(_ar1, _ar2)
{ {
var result = _ar1.length == _ar2.length; var result = _ar1.length == _ar2.length;
@ -156,7 +156,7 @@ function egwArraysEqual(_ar1, _ar2)
} }
var _egwQueuedCallbacks = {}; var _egwQueuedCallbacks = {};
function egwQueueCallback(_proc, _args, _context, _id) export function egwQueueCallback(_proc, _args, _context, _id)
{ {
if (_proc) if (_proc)
{ {
@ -191,7 +191,7 @@ function egwQueueCallback(_proc, _args, _context, _id)
* Constructor for the egwEventQueue class. Initializes the queue object and the * Constructor for the egwEventQueue class. Initializes the queue object and the
* internal data structures such as the internal key. * internal data structures such as the internal key.
*/ */
function egwEventQueue() export function egwEventQueue()
{ {
this.events = {}; this.events = {};
this.key_id = 0; this.key_id = 0;
@ -322,7 +322,7 @@ egwEventQueue.prototype.queueTimeout = function(_proc, _context, _args, _id, _ti
* @param array _acceptedTypes is an array of types which contains the "typeof" * @param array _acceptedTypes is an array of types which contains the "typeof"
* strings of accepted non-functions in setValue * strings of accepted non-functions in setValue
*/ */
function egwFnct(_context, _default, _acceptedTypes) export function egwFnct(_context, _default, _acceptedTypes)
{ {
if (typeof _context == "undefined") if (typeof _context == "undefined")
{ {
@ -451,7 +451,7 @@ egwFnct.prototype.exec = function()
*/ */
var _egw_mobileBrowser = null; var _egw_mobileBrowser = null;
window.egwIsMobile = function() { export function egwIsMobile() {
if (_egw_mobileBrowser == null) if (_egw_mobileBrowser == null)
{ {
@ -464,6 +464,7 @@ window.egwIsMobile = function() {
return _egw_mobileBrowser; return _egw_mobileBrowser;
} }
window.egwIsMobile = egwIsMobile;
/** /**
@ -516,12 +517,12 @@ Changelog:
a regress. I appologize for that. a regress. I appologize for that.
**/ **/
function str_repeat(i, m) { export function str_repeat(i, m) {
for (var o = []; m > 0; o[--m] = i); for (var o = []; m > 0; o[--m] = i);
return o.join(''); return o.join('');
} }
function sprintf() { export function sprintf() {
var i = 0, a, f = arguments[i++], o = [], m, p, c, x, s = ''; var i = 0, a, f = arguments[i++], o = [], m, p, c, x, s = '';
while (f) { while (f) {
if (m = /^[^\x25]+/.exec(f)) { if (m = /^[^\x25]+/.exec(f)) {

View File

@ -6,7 +6,6 @@
* @copyright 2011 by Andreas Stöckel * @copyright 2011 by Andreas Stöckel
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package egw_action * @package egw_action
* @version $Id$
*/ */
/*egw:uses /*egw:uses
@ -17,6 +16,8 @@
/vendor/bower-asset/jquery-ui/jquery-ui.js; /vendor/bower-asset/jquery-ui/jquery-ui.js;
*/ */
import {egwAction,egwActionImplementation} from "./egw_action.js";
/** /**
* Register the drag and drop handlers * Register the drag and drop handlers
*/ */
@ -45,7 +46,7 @@ _egwActionClasses["drop"] = {
* @param {bool} _allowOnMultiple * @param {bool} _allowOnMultiple
* @returns {egwDragAction} * @returns {egwDragAction}
*/ */
function egwDragAction(_id, _handler, _caption, _icon, _onExecute, _allowOnMultiple) export function egwDragAction(_id, _handler, _caption, _icon, _onExecute, _allowOnMultiple)
{ {
var action = new egwAction(_id, _handler, _caption, _icon, _onExecute, _allowOnMultiple); var action = new egwAction(_id, _handler, _caption, _icon, _onExecute, _allowOnMultiple);
@ -64,7 +65,7 @@ function egwDragAction(_id, _handler, _caption, _icon, _onExecute, _allowOnMulti
var var
_dragActionImpl = null; _dragActionImpl = null;
function getDragImplementation() export function getDragImplementation()
{ {
if (!_dragActionImpl) if (!_dragActionImpl)
{ {
@ -73,7 +74,7 @@ function getDragImplementation()
return _dragActionImpl; return _dragActionImpl;
} }
function egwDragActionImplementation() export function egwDragActionImplementation()
{ {
var ai = new egwActionImplementation(); var ai = new egwActionImplementation();
@ -479,7 +480,7 @@ function egwDragActionImplementation()
* @param {bool} _allowOnMultiple * @param {bool} _allowOnMultiple
* @returns {egwDropAction} * @returns {egwDropAction}
*/ */
function egwDropAction(_id, _handler, _caption, _icon, _onExecute, _allowOnMultiple) export function egwDropAction(_id, _handler, _caption, _icon, _onExecute, _allowOnMultiple)
{ {
var action = new egwAction(_id, _handler, _caption, _icon, _onExecute, _allowOnMultiple); var action = new egwAction(_id, _handler, _caption, _icon, _onExecute, _allowOnMultiple);
@ -525,7 +526,7 @@ function egwDropAction(_id, _handler, _caption, _icon, _onExecute, _allowOnMulti
var var
_dropActionImpl = null; _dropActionImpl = null;
function getDropImplementation() export function getDropImplementation()
{ {
if (!_dropActionImpl) if (!_dropActionImpl)
{ {
@ -538,7 +539,7 @@ var EGW_AI_DRAG = 0x0100; // Use the first byte as mask for event types - 01 is
var EGW_AI_DRAG_OUT = EGW_AI_DRAG | 0x01; var EGW_AI_DRAG_OUT = EGW_AI_DRAG | 0x01;
var EGW_AI_DRAG_OVER = EGW_AI_DRAG | 0x02; var EGW_AI_DRAG_OVER = EGW_AI_DRAG | 0x02;
function egwDropActionImplementation() export function egwDropActionImplementation()
{ {
var ai = new egwActionImplementation(); var ai = new egwActionImplementation();

View File

@ -15,6 +15,10 @@
/api/js/jquery/jquery-tap-and-hold/jquery.tapandhold.js; /api/js/jquery/jquery-tap-and-hold/jquery.tapandhold.js;
*/ */
import {egwAction, egwActionImplementation} from './egw_action.js';
import {egwMenu, _egw_active_menu} from "./egw_menu.js";
import '../jquery/jquery-tap-and-hold/jquery.tapandhold.js';
if (typeof window._egwActionClasses == "undefined") if (typeof window._egwActionClasses == "undefined")
window._egwActionClasses = {}; window._egwActionClasses = {};
_egwActionClasses["popup"] = { _egwActionClasses["popup"] = {
@ -22,7 +26,7 @@ _egwActionClasses["popup"] = {
"implementation": getPopupImplementation "implementation": getPopupImplementation
}; };
function egwPopupAction(_id, _handler, _caption, _icon, _onExecute, _allowOnMultiple) export function egwPopupAction(_id, _handler, _caption, _icon, _onExecute, _allowOnMultiple)
{ {
var action = new egwAction(_id, _handler, _caption, _icon, _onExecute, _allowOnMultiple); var action = new egwAction(_id, _handler, _caption, _icon, _onExecute, _allowOnMultiple);
action.type = "popup"; action.type = "popup";
@ -126,7 +130,7 @@ function egwPopupAction(_id, _handler, _caption, _icon, _onExecute, _allowOnMult
var var
_popupActionImpl = null; _popupActionImpl = null;
function getPopupImplementation() export function getPopupImplementation()
{ {
if (!_popupActionImpl) if (!_popupActionImpl)
{ {
@ -135,7 +139,7 @@ function getPopupImplementation()
return _popupActionImpl; return _popupActionImpl;
} }
function egwPopupActionImplementation() export function egwPopupActionImplementation()
{ {
var ai = new egwActionImplementation(); var ai = new egwActionImplementation();

View File

@ -14,80 +14,82 @@
egw_action; egw_action;
*/ */
import {EGW_AO_EXEC_SELECTED} from "./egw_action.js";
/** /**
* Define the key constants (IE doesn't support "const" keyword) * Define the key constants (IE doesn't support "const" keyword)
*/ */
var EGW_KEY_BACKSPACE = 8; export const EGW_KEY_BACKSPACE = 8;
var EGW_KEY_TAB = 9; export const EGW_KEY_TAB = 9;
var EGW_KEY_ENTER = 13; export const EGW_KEY_ENTER = 13;
var EGW_KEY_ESCAPE = 27; export const EGW_KEY_ESCAPE = 27;
var EGW_KEY_DELETE = 46; export const EGW_KEY_DELETE = 46;
var EGW_KEY_SPACE = 32; export const EGW_KEY_SPACE = 32;
var EGW_KEY_PAGE_UP = 33; export const EGW_KEY_PAGE_UP = 33;
var EGW_KEY_PAGE_DOWN = 34; export const EGW_KEY_PAGE_DOWN = 34;
var EGW_KEY_ARROW_LEFT = 37; export const EGW_KEY_ARROW_LEFT = 37;
var EGW_KEY_ARROW_UP = 38; export const EGW_KEY_ARROW_UP = 38;
var EGW_KEY_ARROW_RIGHT = 39; export const EGW_KEY_ARROW_RIGHT = 39;
var EGW_KEY_ARROW_DOWN = 40; export const EGW_KEY_ARROW_DOWN = 40;
var EGW_KEY_0 = 48; export const EGW_KEY_0 = 48;
var EGW_KEY_1 = 49; export const EGW_KEY_1 = 49;
var EGW_KEY_2 = 50; export const EGW_KEY_2 = 50;
var EGW_KEY_3 = 51; export const EGW_KEY_3 = 51;
var EGW_KEY_4 = 52; export const EGW_KEY_4 = 52;
var EGW_KEY_5 = 53; export const EGW_KEY_5 = 53;
var EGW_KEY_6 = 54; export const EGW_KEY_6 = 54;
var EGW_KEY_7 = 55; export const EGW_KEY_7 = 55;
var EGW_KEY_8 = 56; export const EGW_KEY_8 = 56;
var EGW_KEY_9 = 57; export const EGW_KEY_9 = 57;
var EGW_KEY_A = 65; export const EGW_KEY_A = 65;
var EGW_KEY_B = 66; export const EGW_KEY_B = 66;
var EGW_KEY_C = 67; export const EGW_KEY_C = 67;
var EGW_KEY_D = 68; export const EGW_KEY_D = 68;
var EGW_KEY_E = 69; export const EGW_KEY_E = 69;
var EGW_KEY_F = 70; export const EGW_KEY_F = 70;
var EGW_KEY_G = 71; export const EGW_KEY_G = 71;
var EGW_KEY_H = 72; export const EGW_KEY_H = 72;
var EGW_KEY_I = 73; export const EGW_KEY_I = 73;
var EGW_KEY_J = 74; export const EGW_KEY_J = 74;
var EGW_KEY_K = 75; export const EGW_KEY_K = 75;
var EGW_KEY_L = 76; export const EGW_KEY_L = 76;
var EGW_KEY_M = 77; export const EGW_KEY_M = 77;
var EGW_KEY_N = 78; export const EGW_KEY_N = 78;
var EGW_KEY_O = 79; export const EGW_KEY_O = 79;
var EGW_KEY_P = 80; export const EGW_KEY_P = 80;
var EGW_KEY_Q = 81; export const EGW_KEY_Q = 81;
var EGW_KEY_R = 82; export const EGW_KEY_R = 82;
var EGW_KEY_S = 83; export const EGW_KEY_S = 83;
var EGW_KEY_T = 84; export const EGW_KEY_T = 84;
var EGW_KEY_U = 85; export const EGW_KEY_U = 85;
var EGW_KEY_V = 86; export const EGW_KEY_V = 86;
var EGW_KEY_W = 87; export const EGW_KEY_W = 87;
var EGW_KEY_X = 88; export const EGW_KEY_X = 88;
var EGW_KEY_Y = 89; export const EGW_KEY_Y = 89;
var EGW_KEY_Z = 90; export const EGW_KEY_Z = 90;
var EGW_KEY_MENU = 93; export const EGW_KEY_MENU = 93;
var EGW_KEY_F1 = 112; export const EGW_KEY_F1 = 112;
var EGW_KEY_F2 = 113; export const EGW_KEY_F2 = 113;
var EGW_KEY_F3 = 114; export const EGW_KEY_F3 = 114;
var EGW_KEY_F4 = 115; export const EGW_KEY_F4 = 115;
var EGW_KEY_F5 = 116; export const EGW_KEY_F5 = 116;
var EGW_KEY_F6 = 117; export const EGW_KEY_F6 = 117;
var EGW_KEY_F7 = 118; export const EGW_KEY_F7 = 118;
var EGW_KEY_F8 = 119; export const EGW_KEY_F8 = 119;
var EGW_KEY_F9 = 120; export const EGW_KEY_F9 = 120;
var EGW_KEY_F10 = 121; export const EGW_KEY_F10 = 121;
var EGW_KEY_F11 = 122; export const EGW_KEY_F11 = 122;
var EGW_KEY_F12 = 123; export const EGW_KEY_F12 = 123;
var EGW_VALID_KEYS = [ export const EGW_VALID_KEYS = [
8, 9, 13, 27, 46, 32, 33, 34, 37, 38, 39, 40, 48, 49, 50, 51, 52, 53, 54, 8, 9, 13, 27, 46, 32, 33, 34, 37, 38, 39, 40, 48, 49, 50, 51, 52, 53, 54,
55, 56, 57, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 55, 56, 57, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 93, 112, 113, 114, 115, 116, 117, 118, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 93, 112, 113, 114, 115, 116, 117, 118,

View File

@ -12,7 +12,7 @@
//Global variable which is used to store the currently active menu so that it //Global variable which is used to store the currently active menu so that it
//may be closed when another menu openes //may be closed when another menu openes
var _egw_active_menu = null; export var _egw_active_menu = null;
/** /**
* Internal function which generates a menu item with the given parameters as used * Internal function which generates a menu item with the given parameters as used

View File

@ -14,6 +14,7 @@
*/ */
import { et2_evalBool } from "./et2_core_common"; import { et2_evalBool } from "./et2_core_common";
import { egw } from "../jsapi/egw_global"; import { egw } from "../jsapi/egw_global";
import { et2_compilePHPExpression } from "./et2_core_phpExpressionCompiler";
/** /**
* Manage access to various template customisation arrays passed to etemplate->exec(). * Manage access to various template customisation arrays passed to etemplate->exec().
* *

View File

@ -17,6 +17,7 @@
import {et2_evalBool} from "./et2_core_common"; import {et2_evalBool} from "./et2_core_common";
import type {et2_widget} from "./et2_core_widget"; import type {et2_widget} from "./et2_core_widget";
import {egw} from "../jsapi/egw_global"; import {egw} from "../jsapi/egw_global";
import {et2_compilePHPExpression} from "./et2_core_phpExpressionCompiler";
/** /**
* Manage access to various template customisation arrays passed to etemplate->exec(). * Manage access to various template customisation arrays passed to etemplate->exec().

View File

@ -8,7 +8,7 @@
* @author Andreas Stöckel * @author Andreas Stöckel
* @copyright EGroupware GmbH 2011-2021 * @copyright EGroupware GmbH 2011-2021
*/ */
import { app, egw } from "../jsapi/egw_global"; import { egw } from "../jsapi/egw_global";
/** /**
* IE Fix for array.indexOf * IE Fix for array.indexOf
*/ */

View File

@ -9,7 +9,7 @@
* @copyright EGroupware GmbH 2011-2021 * @copyright EGroupware GmbH 2011-2021
*/ */
import {app, egw} from "../jsapi/egw_global"; import {egw} from "../jsapi/egw_global";
/** /**
* IE Fix for array.indexOf * IE Fix for array.indexOf

View File

@ -12,6 +12,8 @@ import { et2_dataview_selectionManager } from "./et2_dataview_controller_selecti
import { et2_dataview_row } from "./et2_dataview_view_row"; import { et2_dataview_row } from "./et2_dataview_view_row";
import { et2_arrayIntKeys, et2_bounds } from "./et2_core_common"; import { et2_arrayIntKeys, et2_bounds } from "./et2_core_common";
import { egw } from "../jsapi/egw_global"; 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";
/** /**
* The fetch timeout specifies the time during which the controller tries to * The fetch timeout specifies the time during which the controller tries to
* consolidate requests for rows. * consolidate requests for rows.

View File

@ -27,6 +27,8 @@ import {et2_dataview_row} from "./et2_dataview_view_row";
import {et2_dataview_grid} from "./et2_dataview_view_grid"; import {et2_dataview_grid} from "./et2_dataview_view_grid";
import {et2_arrayIntKeys, et2_bounds} from "./et2_core_common"; import {et2_arrayIntKeys, et2_bounds} from "./et2_core_common";
import {egw} from "../jsapi/egw_global"; 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";
/** /**
* The fetch timeout specifies the time during which the controller tries to * The fetch timeout specifies the time during which the controller tries to

View File

@ -17,6 +17,9 @@ import { egw } from "../jsapi/egw_global";
import { et2_bounds } from "./et2_core_common"; import { et2_bounds } from "./et2_core_common";
import { et2_dialog } from "./et2_widget_dialog"; import { et2_dialog } from "./et2_widget_dialog";
import { et2_createWidget } from "./et2_core_widget"; 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 { egwBitIsSet, egwSetBit } from "../egw_action/egw_action_common.js";
/** /**
* The selectioManager is internally used by the et2_dataview_controller class * The selectioManager is internally used by the et2_dataview_controller class
* to manage the row selection. * to manage the row selection.

View File

@ -19,6 +19,13 @@ import {egw} from "../jsapi/egw_global";
import {et2_bounds} from "./et2_core_common"; import {et2_bounds} from "./et2_core_common";
import {et2_dialog} from "./et2_widget_dialog"; import {et2_dialog} from "./et2_widget_dialog";
import {et2_createWidget} from "./et2_core_widget"; 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 {egwBitIsSet, egwSetBit} from "../egw_action/egw_action_common.js";
/** /**
* The selectioManager is internally used by the et2_dataview_controller class * The selectioManager is internally used by the et2_dataview_controller class

View File

@ -13,6 +13,9 @@
egw_action.egw_action; egw_action.egw_action;
/vendor/bower-asset/jquery-touchswipe/jquery.touchSwipe.js; /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 { egwBitIsSet, egwGetShiftState, egwPreventSelect, egwSetBit, egwUnfocus, egwIsMobile } from "../egw_action/egw_action_common.js";
import { _egw_active_menu } from "../egw_action/egw_menu.js";
/** /**
* Contains the action object interface implementation for the nextmatch widget * Contains the action object interface implementation for the nextmatch widget
* row. * row.

View File

@ -15,6 +15,15 @@
/vendor/bower-asset/jquery-touchswipe/jquery.touchSwipe.js; /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 {egwBitIsSet, egwGetShiftState, egwPreventSelect, egwSetBit, egwUnfocus, egwIsMobile} from "../egw_action/egw_action_common.js";
import {_egw_active_menu} from "../egw_action/egw_menu.js";
/** /**
* Contains the action object interface implementation for the nextmatch widget * Contains the action object interface implementation for the nextmatch widget
* row. * row.

View File

@ -51,7 +51,7 @@ export class et2_dataview_container implements et2_dataview_IInvalidatable
private _index: number; private _index: number;
private _top: number; private _top: number;
protected tr: any; tr: any;
/** /**
* Initializes the container object. * Initializes the container object.
* *

View File

@ -59,7 +59,7 @@ import { et2_taglist } from "./et2_widget_taglist";
import { et2_selectAccount } from "./et2_widget_selectAccount"; import { et2_selectAccount } from "./et2_widget_selectAccount";
import { et2_dynheight } from "./et2_widget_dynheight"; import { et2_dynheight } from "./et2_widget_dynheight";
import { et2_arrayMgr } from "./et2_core_arrayMgr"; import { et2_arrayMgr } from "./et2_core_arrayMgr";
import { app, egw } from "../jsapi/egw_global"; import { egw } from "../jsapi/egw_global";
import { et2_compileLegacyJS } from "./et2_core_legacyJSFunctions"; import { et2_compileLegacyJS } from "./et2_core_legacyJSFunctions";
export const et2_INextmatchHeader = "et2_INextmatchHeader"; export const et2_INextmatchHeader = "et2_INextmatchHeader";
et2_implements_registry.et2_INextmatchHeader = function (obj) { et2_implements_registry.et2_INextmatchHeader = function (obj) {

View File

@ -64,7 +64,7 @@ import {et2_arrayMgr} from "./et2_core_arrayMgr";
import {et2_button} from "./et2_widget_button"; import {et2_button} from "./et2_widget_button";
import {et2_searchbox} from "./et2_widget_textbox"; import {et2_searchbox} from "./et2_widget_textbox";
import {et2_template} from "./et2_widget_template"; import {et2_template} from "./et2_widget_template";
import {app, egw} from "../jsapi/egw_global"; import {egw} from "../jsapi/egw_global";
import {et2_compileLegacyJS} from "./et2_core_legacyJSFunctions"; import {et2_compileLegacyJS} from "./et2_core_legacyJSFunctions";
//import {et2_selectAccount} from "./et2_widget_SelectAccount"; //import {et2_selectAccount} from "./et2_widget_SelectAccount";

View File

@ -13,6 +13,7 @@ import { et2_dataview_tile } from "./et2_dataview_view_tile";
import { et2_dataview_controller } from "./et2_dataview_controller"; import { et2_dataview_controller } from "./et2_dataview_controller";
import { et2_dataview_column } from "./et2_dataview_model_columns"; import { et2_dataview_column } from "./et2_dataview_model_columns";
import { framework } from "../jsapi/egw_global"; import { framework } 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";
/** /**
* @augments et2_dataview_controller * @augments et2_dataview_controller
*/ */

View File

@ -30,6 +30,14 @@ import {et2_nextmatch} from "./et2_extension_nextmatch";
import {et2_dataview_controller} from "./et2_dataview_controller"; import {et2_dataview_controller} from "./et2_dataview_controller";
import {et2_dataview_column} from "./et2_dataview_model_columns"; import {et2_dataview_column} from "./et2_dataview_model_columns";
import {framework, Iegw} from "../jsapi/egw_global"; import {framework, Iegw} 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";
/** /**
* @augments et2_dataview_controller * @augments et2_dataview_controller

View File

@ -15,7 +15,7 @@
import { et2_register_widget } from "./et2_core_widget"; import { et2_register_widget } from "./et2_core_widget";
import { et2_dropdown_button } from "./et2_widget_dropdown_button"; import { et2_dropdown_button } from "./et2_widget_dropdown_button";
import { ClassWithAttributes } from "./et2_core_inheritance"; import { ClassWithAttributes } from "./et2_core_inheritance";
import { app, egw, egw_getFramework } from "../jsapi/egw_global"; import { egw, egw_getFramework } from "../jsapi/egw_global";
/** /**
* Favorites widget, designed for use with a nextmatch widget * Favorites widget, designed for use with a nextmatch widget
* *

View File

@ -18,7 +18,7 @@ import {et2_register_widget, WidgetConfig} from "./et2_core_widget";
import {et2_INextmatchHeader} from "./et2_extension_nextmatch"; import {et2_INextmatchHeader} from "./et2_extension_nextmatch";
import {et2_dropdown_button} from "./et2_widget_dropdown_button"; import {et2_dropdown_button} from "./et2_widget_dropdown_button";
import {ClassWithAttributes} from "./et2_core_inheritance"; import {ClassWithAttributes} from "./et2_core_inheritance";
import {app, egw, egw_getFramework} from "../jsapi/egw_global"; import {egw, egw_getFramework} from "../jsapi/egw_global";
/** /**
* Favorites widget, designed for use with a nextmatch widget * Favorites widget, designed for use with a nextmatch widget

View File

@ -18,7 +18,7 @@ import { et2_editableWidget } from "./et2_core_editableWidget";
import { ClassWithAttributes } from "./et2_core_inheritance"; import { ClassWithAttributes } from "./et2_core_inheritance";
import { et2_register_widget, et2_createWidget } from "./et2_core_widget"; import { et2_register_widget, et2_createWidget } from "./et2_core_widget";
import { et2_no_init } from "./et2_core_common"; import { et2_no_init } from "./et2_core_common";
import { app, egw } from "../jsapi/egw_global"; import { egw } from "../jsapi/egw_global";
/** /**
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */

View File

@ -21,7 +21,7 @@ import {ClassWithAttributes} from "./et2_core_inheritance";
import {WidgetConfig, et2_register_widget, et2_createWidget} from "./et2_core_widget"; import {WidgetConfig, et2_register_widget, et2_createWidget} from "./et2_core_widget";
import {et2_IResizeable} from "./et2_core_interfaces"; import {et2_IResizeable} from "./et2_core_interfaces";
import {et2_no_init} from "./et2_core_common"; import {et2_no_init} from "./et2_core_common";
import {app, egw} from "../jsapi/egw_global"; import {egw} from "../jsapi/egw_global";
import {et2_vfsSelect} from "./et2_widget_vfs"; import {et2_vfsSelect} from "./et2_widget_vfs";
/** /**

View File

@ -28,7 +28,7 @@ import { et2_file } from "./et2_widget_file";
import { et2_dialog } from "./et2_widget_dialog"; import { et2_dialog } from "./et2_widget_dialog";
import { et2_inputWidget } from "./et2_core_inputWidget"; import { et2_inputWidget } from "./et2_core_inputWidget";
import { et2_no_init } from "./et2_core_common"; import { et2_no_init } from "./et2_core_common";
import { app, egw, egw_get_file_editor_prefered_mimes } from "../jsapi/egw_global"; import { egw, egw_get_file_editor_prefered_mimes } from "../jsapi/egw_global";
import { expose } from "./expose"; import { expose } from "./expose";
/** /**
* Class which implements the "vfs" XET-Tag * Class which implements the "vfs" XET-Tag

View File

@ -30,7 +30,7 @@ import {et2_dialog} from "./et2_widget_dialog";
import {et2_inputWidget} from "./et2_core_inputWidget"; import {et2_inputWidget} from "./et2_core_inputWidget";
import {et2_IDetachedDOM, et2_IExposable} from "./et2_core_interfaces"; import {et2_IDetachedDOM, et2_IExposable} from "./et2_core_interfaces";
import {et2_no_init} from "./et2_core_common"; import {et2_no_init} from "./et2_core_common";
import {app, egw, egw_get_file_editor_prefered_mimes} from "../jsapi/egw_global"; import {egw, egw_get_file_editor_prefered_mimes} from "../jsapi/egw_global";
import {expose} from "./expose"; import {expose} from "./expose";
/** /**

View File

@ -11,7 +11,7 @@
/api/js/jsapi/egw_app.js /api/js/jsapi/egw_app.js
*/ */
import { EgwApp } from "../jsapi/egw_app"; import { EgwApp } from "../jsapi/egw_app";
import { app, egw } from "../jsapi/egw_global"; import { egw } from "../jsapi/egw_global";
import { et2_dialog } from "./et2_widget_dialog"; import { et2_dialog } from "./et2_widget_dialog";
import { et2_file } from "./et2_widget_file"; import { et2_file } from "./et2_widget_file";
import { et2_textbox } from "./et2_widget_textbox"; import { et2_textbox } from "./et2_widget_textbox";

View File

@ -14,7 +14,7 @@
import {EgwApp} from "../jsapi/egw_app"; import {EgwApp} from "../jsapi/egw_app";
import {et2_vfs, et2_vfsPath, et2_vfsSelect} from "./et2_widget_vfs"; import {et2_vfs, et2_vfsPath, et2_vfsSelect} from "./et2_widget_vfs";
import {app, egw} from "../jsapi/egw_global"; import {egw} from "../jsapi/egw_global";
import {et2_dialog} from "./et2_widget_dialog"; import {et2_dialog} from "./et2_widget_dialog";
import {et2_file} from "./et2_widget_file"; import {et2_file} from "./et2_widget_file";
import {et2_textbox} from "./et2_widget_textbox"; import {et2_textbox} from "./et2_widget_textbox";

View File

@ -4,8 +4,8 @@
* @package framework * @package framework
* @author Hadi Nategh <hn@stylite.de> * @author Hadi Nategh <hn@stylite.de>
* @author Andreas Stoeckel <as@stylite.de> * @author Andreas Stoeckel <as@stylite.de>
* @copyright Stylite AG 2014 * @copyright EGroupware GmbH 2014-2021
* @description Create jdots framework * @description Create desktop framework
*/ */
/*egw:uses /*egw:uses

View File

@ -185,7 +185,7 @@
document.head.appendChild(script); document.head.appendChild(script);
}) })
// catch and display, but not stop execution // catch and display, but not stop execution
.catch((err) => { alert(src+":\n\n"+err.message)}); .catch((err) => { console.log(src+":\n\n"+err.message)});
})); }));
} }
@ -196,7 +196,7 @@
[legacy_js_import(include.filter((src) => src.match(legacy_regexp) !== null), window.egw_webserverUrl)] [legacy_js_import(include.filter((src) => src.match(legacy_regexp) !== null), window.egw_webserverUrl)]
.concat(include.filter((src) => src.match(legacy_regexp) === null) .concat(include.filter((src) => src.match(legacy_regexp) === null)
.map(rel_src => import(window.egw_webserverUrl+'/'+rel_src) .map(rel_src => import(window.egw_webserverUrl+'/'+rel_src)
.catch((err) => { alert(rel_src+":\n\n"+err.message)}) .catch((err) => { console.log(rel_src+":\n\n"+err.message)})
))).then(() => ))).then(() =>
{ {
// We need to override the globalEval to mitigate potential execution of // We need to override the globalEval to mitigate potential execution of
@ -491,18 +491,6 @@
}; };
})(); })();
// get TypeScript modules working with our loader
window.require = function(_file)
{
switch(_file)
{
case 'jquery': // cropper mistakes this for commonJS (typeof exports === 'object')
return window.jQuery;
}
return window.exports;
}
window.exports = {};
/** /**
* Call a function specified by it's name (possibly dot separated, eg. "app.myapp.myfunc") * Call a function specified by it's name (possibly dot separated, eg. "app.myapp.myfunc")
* *

View File

@ -1155,7 +1155,7 @@ abstract class Framework extends Framework\Extra
// @todo: add all node_modules as bare imports // @todo: add all node_modules as bare imports
// debug-output to tmp dir // debug-output to tmp dir
file_put_contents($GLOBALS['egw_info']['server']['temp_dir'].'/'.str_replace(['/', '.php'], ['-', '.json'], $_SERVER['PHP_SELF']), file_put_contents($GLOBALS['egw_info']['server']['temp_dir'].'/'.substr(str_replace(['/', '.php'], ['-', '.json'], $_SERVER['PHP_SELF']), 1),
json_encode(['imports' => $imports], JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT)); json_encode(['imports' => $imports], JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT));
return ['imports' => $imports]; return ['imports' => $imports];

View File

@ -1,11 +1,11 @@
/** /**
* EGroupware jDots / Stylite template * EGroupware Pixelegg template
* *
* @package framework * @package framework
* @author Hadi Nategh <hn@stylite.de> * @author Hadi Nategh <hn@stylite.de>
* @author Andreas Stoeckel <as@stylite.de> * @author Andreas Stoeckel <as@stylite.de>
* @copyright Stylite AG 2014 * @copyright EGroupware GmbH 2014-2021
* @description Create jdots framework * @description Create Pixelegg framework
*/ */
/*egw:uses /*egw:uses
@ -21,7 +21,7 @@ import './slider.js';
"use strict"; "use strict";
/** /**
* jdots framework object defenition * jdots framework object definition
* here we can add framework methods and also override fw_desktop methods if it is neccessary * here we can add framework methods and also override fw_desktop methods if it is neccessary
*/ */
window.fw_pixelegg = fw_desktop.extend( window.fw_pixelegg = fw_desktop.extend(