mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
cleanup for backport to 23
This commit is contained in:
parent
b9a723a16f
commit
9cfb44529f
@ -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 {
|
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
|
//Get the constructor for the given action type
|
||||||
if (!(_type in window._egwActionClasses)) {
|
if (!(_type in window._egwActionClasses)) {
|
||||||
//TODO doesn't default instead of popup make more sense here??
|
|
||||||
_type = "popup"
|
_type = "popup"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -403,7 +402,6 @@ export class EgwAction {
|
|||||||
* @param _target egwActionObject object, gets called for every object in _senders
|
* @param _target egwActionObject object, gets called for every object in _senders
|
||||||
* @returns boolean true if none has disableClass, false otherwise
|
* @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) {
|
public enableClass(_action: EgwAction, _senders: any[], _target: any) {
|
||||||
if (typeof _target == 'undefined') {
|
if (typeof _target == 'undefined') {
|
||||||
return false;
|
return false;
|
||||||
@ -593,7 +591,7 @@ export class EgwAction {
|
|||||||
* The appendToGraph function generates an action tree which automatically contains
|
* The appendToGraph function generates an action tree which automatically contains
|
||||||
* all parent elements. If the appendToGraph function is called for a
|
* 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
|
* the empty array "root" to this function {"root": []}. The result will be stored in
|
||||||
* this array.
|
* this array.
|
||||||
* @param {boolean} _addChildren is used internally to prevent parent elements from
|
* @param {boolean} _addChildren is used internally to prevent parent elements from
|
||||||
|
@ -422,7 +422,7 @@ export class EgwActionObject {
|
|||||||
* @param {number} _changedBit
|
* @param {number} _changedBit
|
||||||
* @param {number} _shiftState is the status of extra keys being pressed during the
|
* @param {number} _shiftState is the status of extra keys being pressed during the
|
||||||
* selection process.
|
* selection process.
|
||||||
*///TODO check
|
*/
|
||||||
_ifaceCallback(_newState: number, _changedBit: number, _shiftState?: number) {
|
_ifaceCallback(_newState: number, _changedBit: number, _shiftState?: number) {
|
||||||
if (typeof _shiftState == "undefined") _shiftState = EGW_AO_SHIFT_STATE_NONE;
|
if (typeof _shiftState == "undefined") _shiftState = EGW_AO_SHIFT_STATE_NONE;
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
* @return {egwActionObjectInterface}
|
* @return {egwActionObjectInterface}
|
||||||
*/
|
*/
|
||||||
export interface EgwActionObjectInterface {
|
export interface EgwActionObjectInterface {
|
||||||
//TODO abstract class might be better
|
|
||||||
//properties
|
//properties
|
||||||
_state: number;
|
_state: number;
|
||||||
stateChangeCallback: Function;
|
stateChangeCallback: Function;
|
||||||
|
@ -696,7 +696,6 @@ export class EgwPopupActionImplementation implements EgwActionImplementation {
|
|||||||
// the original
|
// the original
|
||||||
//replace jQuery with spread operator
|
//replace jQuery with spread operator
|
||||||
// set the Prototype of the copy set_onExecute is not available otherwise
|
// 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};
|
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
|
//warning This method is really slow
|
||||||
//Object.setPrototypeOf(drop_clone, EgwAction.prototype)
|
//Object.setPrototypeOf(drop_clone, EgwAction.prototype)
|
||||||
|
@ -27,7 +27,6 @@ type EgwActionClasses = {
|
|||||||
default: EgwActionClassData,//
|
default: EgwActionClassData,//
|
||||||
actionManager: EgwActionClassData, drag: EgwActionClassData, drop: EgwActionClassData, popup: EgwActionClassData
|
actionManager: EgwActionClassData, drag: EgwActionClassData, drop: EgwActionClassData, popup: EgwActionClassData
|
||||||
}
|
}
|
||||||
//TODO egw global.js
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
_egwActionClasses: EgwActionClasses;
|
_egwActionClasses: EgwActionClasses;
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
import {EGW_AO_STATE_NORMAL, EGW_AO_STATE_VISIBLE, EGW_AO_STATES} from './egw_action_constants';
|
import {EGW_AO_STATE_NORMAL, EGW_AO_STATE_VISIBLE, EGW_AO_STATES} from './egw_action_constants';
|
||||||
import {egwSetBit} from './egw_action_common';
|
import {egwSetBit} from './egw_action_common';
|
||||||
import '././egw_action_popup';
|
|
||||||
import "./egw_menu_dhtmlx";
|
import "./egw_menu_dhtmlx";
|
||||||
import {EgwAction} from "./EgwAction";
|
import {EgwAction} from "./EgwAction";
|
||||||
import {EgwActionManager} from "./EgwActionManager";
|
import {EgwActionManager} from "./EgwActionManager";
|
||||||
|
@ -322,8 +322,6 @@ export class EgwFnct
|
|||||||
* 2. _value may be a boolean, which specifies whether the external onExecute handler
|
* 2. _value may be a boolean, which specifies whether the external onExecute handler
|
||||||
* (passed as "_handler" in the constructor) will be used.
|
* (passed as "_handler" in the constructor) will be used.
|
||||||
* 3. _value may be a JS function which will then be called.
|
* 3. _value may be a JS function which will then be called.
|
||||||
*
|
|
||||||
* TODO check if there should be other options
|
|
||||||
*/
|
*/
|
||||||
public setValue(_value: any) {
|
public setValue(_value: any) {
|
||||||
this.value = null;
|
this.value = null;
|
||||||
|
@ -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
|
|
@ -111,7 +111,6 @@ ready(() => {//waits for DOM ready
|
|||||||
{
|
{
|
||||||
// Check whether the event came from the sidebox - if yes, ignore
|
// Check whether the event came from the sidebox - if yes, ignore
|
||||||
//if(jQuery(keyboardEvent.target).parents("#egw_fw_sidemenu").length > 0) return;
|
//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
|
let target: any = keyboardEvent.target // this is some kind of element
|
||||||
while ((target = target.parentNode) && target !== document)
|
while ((target = target.parentNode) && target !== document)
|
||||||
{
|
{
|
||||||
|
@ -225,7 +225,7 @@ export class egwMenu
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Key handler to allow keyboard navigation of menu
|
* 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
|
* @return {boolean} true if we dealt with the keypress
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user