mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-18 12:30:02 +02:00
remove old expose view / blueimp gallery and all widgets which have been using them:
- new web-components are unconditionally replacing them via the preprocessor - some widgets (eg. et2_description) could not be removed as other legacy widgets are extending them, but they are no longer registered - as there are many places using et2_createWidget('description', ...), et2_description returns now web-components for no longer existing widgets
This commit is contained in:
@@ -77,7 +77,7 @@ export function et2_register_widget(_constructor, _types)
|
||||
* is not passed, it will default to null. Then you have to attach the element
|
||||
* to a parent using the addChild or insertChild method.
|
||||
*/
|
||||
export function et2_createWidget(_name: string, _attrs: object, _parent?: any): et2_widget
|
||||
export function et2_createWidget(_name: string, _attrs: object, _parent?: any): et2_widget|HTMLElement
|
||||
{
|
||||
"use strict";
|
||||
|
||||
@@ -96,6 +96,12 @@ export function et2_createWidget(_name: string, _attrs: object, _parent?: any):
|
||||
_parent = null;
|
||||
}
|
||||
|
||||
// check and return web-components in case widget is no longer available as legacy widget
|
||||
if (typeof et2_registry[_name] === "undefined" && window.customElements.get('et2-'+_name))
|
||||
{
|
||||
return loadWebComponent('et2-'+_name, _attrs, _parent);
|
||||
}
|
||||
|
||||
// Parse the "readonly" and "type" flag for this element here, as they
|
||||
// determine which constructor is used
|
||||
var nodeName = _attrs["type"] = _name;
|
||||
@@ -1185,4 +1191,4 @@ export class et2_widget extends ClassWithAttributes
|
||||
|
||||
return path;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user