mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
fixed error if this._widgetSurrondings is not defined, no idea why
This commit is contained in:
parent
4bd8d43318
commit
cabb1e8b8c
@ -22,10 +22,10 @@
|
|||||||
* Abstract widget class which can be inserted into the DOM. All widget classes
|
* Abstract widget class which can be inserted into the DOM. All widget classes
|
||||||
* deriving from this class have to care about implementing the "getDOMNode"
|
* deriving from this class have to care about implementing the "getDOMNode"
|
||||||
* function which has to return the DOM-Node.
|
* function which has to return the DOM-Node.
|
||||||
*
|
*
|
||||||
* @augments et2_widget
|
* @augments et2_widget
|
||||||
*/
|
*/
|
||||||
var et2_DOMWidget = et2_widget.extend(et2_IDOMNode,
|
var et2_DOMWidget = et2_widget.extend(et2_IDOMNode,
|
||||||
{
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"disabled": {
|
"disabled": {
|
||||||
@ -75,7 +75,7 @@ var et2_DOMWidget = et2_widget.extend(et2_IDOMNode,
|
|||||||
/**
|
/**
|
||||||
* When the DOMWidget is initialized, it grabs the DOM-Node of the parent
|
* When the DOMWidget is initialized, it grabs the DOM-Node of the parent
|
||||||
* object (if available) and passes it to its own "createDOMNode" function
|
* object (if available) and passes it to its own "createDOMNode" function
|
||||||
*
|
*
|
||||||
* @memberOf et2_DOMWidget
|
* @memberOf et2_DOMWidget
|
||||||
*/
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
@ -282,7 +282,7 @@ var et2_DOMWidget = et2_widget.extend(et2_IDOMNode,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the id of the DOM-Node.
|
* Sets the id of the DOM-Node.
|
||||||
*
|
*
|
||||||
* DOM id's have dots "." replaced with dashes "-"
|
* DOM id's have dots "." replaced with dashes "-"
|
||||||
*/
|
*/
|
||||||
set_id: function(_value) {
|
set_id: function(_value) {
|
||||||
@ -421,12 +421,12 @@ var et2_DOMWidget = et2_widget.extend(et2_IDOMNode,
|
|||||||
// Link the actions to the DOM
|
// Link the actions to the DOM
|
||||||
this._link_actions(actions);
|
this._link_actions(actions);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all action-links / id's of 1.-level actions from a given action object
|
* Get all action-links / id's of 1.-level actions from a given action object
|
||||||
*
|
*
|
||||||
* This can be overwritten to not allow all actions, by not returning them here.
|
* This can be overwritten to not allow all actions, by not returning them here.
|
||||||
*
|
*
|
||||||
* @param actions
|
* @param actions
|
||||||
* @returns {Array}
|
* @returns {Array}
|
||||||
*/
|
*/
|
||||||
@ -472,14 +472,14 @@ var et2_DOMWidget = et2_widget.extend(et2_IDOMNode,
|
|||||||
/**
|
/**
|
||||||
* The surroundings manager class allows to append or prepend elements around
|
* The surroundings manager class allows to append or prepend elements around
|
||||||
* an widget node.
|
* an widget node.
|
||||||
*
|
*
|
||||||
* @augments Class
|
* @augments Class
|
||||||
*/
|
*/
|
||||||
var et2_surroundingsMgr = Class.extend(
|
var et2_surroundingsMgr = Class.extend(
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @memberOf et2_surroundingsMgr
|
* @memberOf et2_surroundingsMgr
|
||||||
* @param _widget
|
* @param _widget
|
||||||
*/
|
*/
|
||||||
@ -536,7 +536,7 @@ var et2_surroundingsMgr = Class.extend(
|
|||||||
},
|
},
|
||||||
|
|
||||||
removeDOMNode: function(_node) {
|
removeDOMNode: function(_node) {
|
||||||
for (var i = 0; i < this._widgetSurroundings.length; i++)
|
for (var i = 0; this._widgetSurroundings && i < this._widgetSurroundings.length; i++)
|
||||||
{
|
{
|
||||||
if (this._widgetSurroundings[i] == _node)
|
if (this._widgetSurroundings[i] == _node)
|
||||||
{
|
{
|
||||||
@ -562,7 +562,7 @@ var et2_surroundingsMgr = Class.extend(
|
|||||||
this._widgetPlaceholder = null;
|
this._widgetPlaceholder = null;
|
||||||
this._ownPlaceholder = false;
|
this._ownPlaceholder = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._ownPlaceholder = (_node == null);
|
this._ownPlaceholder = (_node == null);
|
||||||
this._widgetPlaceholder = _node;
|
this._widgetPlaceholder = _node;
|
||||||
this._surroundingsUpdated = true;
|
this._surroundingsUpdated = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user