cleanup for backport to 23

This commit is contained in:
milan 2023-08-09 17:18:28 +02:00
parent b9a723a16f
commit 9cfb44529f
10 changed files with 3 additions and 24 deletions

View File

@ -236,7 +236,6 @@ export class EgwAction {
public addAction(_type: string, _id: string, _caption: string = "", _iconUrl: string = "", _onExecute: string | Function = null, _allowOnMultiple: boolean = true): EgwAction {
//Get the constructor for the given action type
if (!(_type in window._egwActionClasses)) {
//TODO doesn't default instead of popup make more sense here??
_type = "popup"
}
@ -403,7 +402,6 @@ export class EgwAction {
* @param _target egwActionObject object, gets called for every object in _senders
* @returns boolean true if none has disableClass, false otherwise
*/
//TODO senders is never used in function body??
public enableClass(_action: EgwAction, _senders: any[], _target: any) {
if (typeof _target == 'undefined') {
return false;
@ -593,7 +591,7 @@ export class EgwAction {
* The appendToGraph function generates an action tree which automatically contains
* all parent elements. If the appendToGraph function is called for a
*
* @param {not an array} _tree contains the tree structure - pass an object containing {root:Tree}??TODO
* @param {not an array} _tree contains the tree structure - pass an object containing {root:Tree}
* the empty array "root" to this function {"root": []}. The result will be stored in
* this array.
* @param {boolean} _addChildren is used internally to prevent parent elements from

View File

@ -422,7 +422,7 @@ export class EgwActionObject {
* @param {number} _changedBit
* @param {number} _shiftState is the status of extra keys being pressed during the
* selection process.
*///TODO check
*/
_ifaceCallback(_newState: number, _changedBit: number, _shiftState?: number) {
if (typeof _shiftState == "undefined") _shiftState = EGW_AO_SHIFT_STATE_NONE;

View File

@ -20,7 +20,6 @@
* @return {egwActionObjectInterface}
*/
export interface EgwActionObjectInterface {
//TODO abstract class might be better
//properties
_state: number;
stateChangeCallback: Function;

View File

@ -696,7 +696,6 @@ export class EgwPopupActionImplementation implements EgwActionImplementation {
// the original
//replace jQuery with spread operator
// set the Prototype of the copy set_onExecute is not available otherwise
//TODO is this a valid/elegant way to do this??? give egwAction a methode clone -- make abstract parent class
let drop_clone = drop[k].actionObj.clone()//Object.assign(Object.create(Object.getPrototypeOf(drop[k].actionObj)), drop[k].actionObj) //{...drop[k].actionObj};
//warning This method is really slow
//Object.setPrototypeOf(drop_clone, EgwAction.prototype)

View File

@ -27,7 +27,6 @@ type EgwActionClasses = {
default: EgwActionClassData,//
actionManager: EgwActionClassData, drag: EgwActionClassData, drop: EgwActionClassData, popup: EgwActionClassData
}
//TODO egw global.js
declare global {
interface Window {
_egwActionClasses: EgwActionClasses;

View File

@ -10,7 +10,6 @@
import {EGW_AO_STATE_NORMAL, EGW_AO_STATE_VISIBLE, EGW_AO_STATES} from './egw_action_constants';
import {egwSetBit} from './egw_action_common';
import '././egw_action_popup';
import "./egw_menu_dhtmlx";
import {EgwAction} from "./EgwAction";
import {EgwActionManager} from "./EgwActionManager";

View File

@ -322,8 +322,6 @@ export class EgwFnct
* 2. _value may be a boolean, which specifies whether the external onExecute handler
* (passed as "_handler" in the constructor) will be used.
* 3. _value may be a JS function which will then be called.
*
* TODO check if there should be other options
*/
public setValue(_value: any) {
this.value = null;

View File

@ -1,12 +0,0 @@
/**
* eGroupWare egw_action framework - egw action framework
*
* @link http://www.egroupware.org
* @author Andreas Stöckel <as@stylite.de>
* @copyright 2011 by Andreas Stöckel
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package egw_action
* @version $Id$
*/
//TODO this wants to be removed

View File

@ -111,7 +111,6 @@ ready(() => {//waits for DOM ready
{
// Check whether the event came from the sidebox - if yes, ignore
//if(jQuery(keyboardEvent.target).parents("#egw_fw_sidemenu").length > 0) return;
//TODO check replacement with ralf or Nathan
let target: any = keyboardEvent.target // this is some kind of element
while ((target = target.parentNode) && target !== document)
{

View File

@ -225,7 +225,7 @@ export class egwMenu
/**
* Key handler to allow keyboard navigation of menu
* TODO does this work?
* TODO does not work
*
* @return {boolean} true if we dealt with the keypress
*/