mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
add some JSDoc so Eclipse shows an outline: @memberOf and @augments (not yet understood by Eclipse), also fixed many warnings (mostly missing semicolons)
This commit is contained in:
parent
0802a28242
commit
e64c4fbd04
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS DOM Widget class
|
* EGroupware eTemplate2 - JS DOM Widget class
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -22,9 +22,11 @@
|
|||||||
* 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
|
||||||
*/
|
*/
|
||||||
var et2_DOMWidget = et2_widget.extend(et2_IDOMNode, {
|
var et2_DOMWidget = et2_widget.extend(et2_IDOMNode,
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"disabled": {
|
"disabled": {
|
||||||
"name": "Disabled",
|
"name": "Disabled",
|
||||||
@ -73,6 +75,8 @@ 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
|
||||||
*/
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
// Call the inherited constructor
|
// Call the inherited constructor
|
||||||
@ -452,9 +456,17 @@ 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
|
||||||
|
*/
|
||||||
|
var et2_surroundingsMgr = Class.extend(
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_surroundingsMgr
|
||||||
|
* @param _widget
|
||||||
*/
|
*/
|
||||||
var et2_surroundingsMgr = Class.extend({
|
|
||||||
|
|
||||||
init: function(_widget) {
|
init: function(_widget) {
|
||||||
this.widget = _widget;
|
this.widget = _widget;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS content array manager
|
* EGroupware eTemplate2 - JS content array manager
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -18,10 +18,20 @@
|
|||||||
et2_core_phpExpressionCompiler;
|
et2_core_phpExpressionCompiler;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var et2_arrayMgr = Class.extend({
|
/**
|
||||||
|
* @augments Class
|
||||||
|
*/
|
||||||
|
var et2_arrayMgr = Class.extend(
|
||||||
|
{
|
||||||
splitIds: true,
|
splitIds: true,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_arrayMgr
|
||||||
|
* @param _data
|
||||||
|
* @param _parentMgr
|
||||||
|
*/
|
||||||
init: function(_data, _parentMgr) {
|
init: function(_data, _parentMgr) {
|
||||||
if (typeof _parentMgr == "undefined")
|
if (typeof _parentMgr == "undefined")
|
||||||
{
|
{
|
||||||
@ -73,7 +83,7 @@ var et2_arrayMgr = Class.extend({
|
|||||||
"owner": null,
|
"owner": null,
|
||||||
"key": null,
|
"key": null,
|
||||||
"row": null
|
"row": null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -350,10 +360,20 @@ var et2_arrayMgr = Class.extend({
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var et2_readonlysArrayMgr = et2_arrayMgr.extend({
|
/**
|
||||||
|
* @augments et2_arrayMgr
|
||||||
|
*/
|
||||||
|
var et2_readonlysArrayMgr = et2_arrayMgr.extend(
|
||||||
|
{
|
||||||
splitIds: false,
|
splitIds: false,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @memberOf et2_readonlysArrayMgr
|
||||||
|
* @param _id
|
||||||
|
* @param _attr
|
||||||
|
* @param _parent
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
isReadOnly: function(_id, _attr, _parent) {
|
isReadOnly: function(_id, _attr, _parent) {
|
||||||
var entry = null;
|
var entry = null;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Widget base class
|
* EGroupware eTemplate2 - JS Widget base class
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -22,9 +22,11 @@
|
|||||||
* Class which manages the DOM node itself. The simpleWidget class is derrived
|
* Class which manages the DOM node itself. The simpleWidget class is derrived
|
||||||
* from et2_DOMWidget and implements the getDOMNode function. A setDOMNode
|
* from et2_DOMWidget and implements the getDOMNode function. A setDOMNode
|
||||||
* function is provided, which attatches the given node to the DOM if possible.
|
* function is provided, which attatches the given node to the DOM if possible.
|
||||||
|
*
|
||||||
|
* @augments et2_DOMWidget
|
||||||
*/
|
*/
|
||||||
var et2_baseWidget = et2_DOMWidget.extend(et2_IAligned, {
|
var et2_baseWidget = et2_DOMWidget.extend(et2_IAligned,
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"statustext": {
|
"statustext": {
|
||||||
"name": "Tooltip",
|
"name": "Tooltip",
|
||||||
@ -45,6 +47,11 @@ var et2_baseWidget = et2_DOMWidget.extend(et2_IAligned, {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2BaseWidget
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this.align = "left";
|
this.align = "left";
|
||||||
|
|
||||||
@ -81,7 +88,7 @@ var et2_baseWidget = et2_DOMWidget.extend(et2_IAligned, {
|
|||||||
// Preset the parameters
|
// Preset the parameters
|
||||||
if (typeof _type == "undefined")
|
if (typeof _type == "undefined")
|
||||||
{
|
{
|
||||||
_type = "hint"
|
_type = "hint";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof _floating == "undefined")
|
if (typeof _floating == "undefined")
|
||||||
@ -155,7 +162,7 @@ var et2_baseWidget = et2_DOMWidget.extend(et2_IAligned, {
|
|||||||
{
|
{
|
||||||
surr.update();
|
surr.update();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// Either fade out or directly call the function which removes the div
|
// Either fade out or directly call the function which removes the div
|
||||||
if (_fade)
|
if (_fade)
|
||||||
@ -280,9 +287,16 @@ var et2_baseWidget = et2_DOMWidget.extend(et2_IAligned, {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple container object
|
* Simple container object
|
||||||
|
*
|
||||||
|
* @augments et2_baseWidget
|
||||||
|
*/
|
||||||
|
var et2_container = et2_baseWidget.extend(
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_container
|
||||||
*/
|
*/
|
||||||
var et2_container = et2_baseWidget.extend({
|
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -314,9 +328,16 @@ var et2_container = et2_baseWidget.extend({
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Container object for not-yet supported widgets
|
* Container object for not-yet supported widgets
|
||||||
|
*
|
||||||
|
* @augments et2_baseWidget
|
||||||
|
*/
|
||||||
|
var et2_placeholder = et2_baseWidget.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_placeholder
|
||||||
*/
|
*/
|
||||||
var et2_placeholder = et2_baseWidget.extend([et2_IDetachedDOM],{
|
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Widget base class
|
* EGroupware eTemplate2 - JS Widget base class
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -231,7 +231,7 @@ function et2_validateAttrib(_id, _attrib)
|
|||||||
// Default ignore to false.
|
// Default ignore to false.
|
||||||
if (typeof _attrib["ignore"] == "undefined")
|
if (typeof _attrib["ignore"] == "undefined")
|
||||||
{
|
{
|
||||||
_attrib["ignore"] = false
|
_attrib["ignore"] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Break if "ignore" is set to true.
|
// Break if "ignore" is set to true.
|
||||||
@ -625,7 +625,7 @@ function et2_range(_top, _height)
|
|||||||
return {
|
return {
|
||||||
"top": _top,
|
"top": _top,
|
||||||
"bottom": _top + _height
|
"bottom": _top + _height
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -636,7 +636,7 @@ function et2_bounds(_top, _bottom)
|
|||||||
return {
|
return {
|
||||||
"top": _top,
|
"top": _top,
|
||||||
"bottom": _bottom
|
"bottom": _bottom
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS code for implementing inheritance
|
* EGroupware eTemplate2 - JS code for implementing inheritance
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Widget base class
|
* EGroupware eTemplate2 - JS Widget base class
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -22,9 +22,11 @@
|
|||||||
* et2_inputWidget derrives from et2_simpleWidget and implements the IInput
|
* et2_inputWidget derrives from et2_simpleWidget and implements the IInput
|
||||||
* interface. When derriving from this class, call setDOMNode with an input
|
* interface. When derriving from this class, call setDOMNode with an input
|
||||||
* DOMNode.
|
* DOMNode.
|
||||||
|
*
|
||||||
|
* @augments et2_valueWidget
|
||||||
*/
|
*/
|
||||||
var et2_inputWidget = et2_valueWidget.extend(et2_IInput, {
|
var et2_inputWidget = et2_valueWidget.extend(et2_IInput,
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"required": {
|
"required": {
|
||||||
"name": "Required",
|
"name": "Required",
|
||||||
@ -58,6 +60,11 @@ var et2_inputWidget = et2_valueWidget.extend(et2_IInput, {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_inputWidget
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - File which contains all interfaces
|
* EGroupware eTemplate2 - File which contains all interfaces
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -10,7 +10,7 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
"use strict"
|
"use strict";
|
||||||
|
|
||||||
/*egw:uses
|
/*egw:uses
|
||||||
et2_core_inheritance;
|
et2_core_inheritance;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - Execution layer for legacy event code
|
* EGroupware eTemplate2 - Execution layer for legacy event code
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -127,7 +127,7 @@
|
|||||||
var func = new Function('egw', 'widget', 'window', 'document', _code);
|
var func = new Function('egw', 'widget', 'window', 'document', _code);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
_widget.egw().debug('error', 'Error while compiling JS code ', _code);
|
_widget.egw().debug('error', 'Error while compiling JS code ', _code);
|
||||||
return (function() {return false});
|
return (function() {return false;});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute the code and return its results, pass the egw instance and
|
// Execute the code and return its results, pass the egw instance and
|
||||||
@ -142,8 +142,8 @@
|
|||||||
// Return the result of the called function
|
// Return the result of the called function
|
||||||
return func.call(context, egw, _widget, egw.window,
|
return func.call(context, egw, _widget, egw.window,
|
||||||
egw.window.document);
|
egw.window.document);
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
|
|
||||||
}).call(window);
|
}).call(window);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - A simple PHP expression parser written in JS
|
* EGroupware eTemplate2 - A simple PHP expression parser written in JS
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -415,7 +415,7 @@
|
|||||||
|
|
||||||
// Create the function and return it
|
// Create the function and return it
|
||||||
return (Function.apply(Function, attrs));
|
return (Function.apply(Function, attrs));
|
||||||
}
|
};
|
||||||
|
|
||||||
}).call(window);
|
}).call(window);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS widget class with value attribute and auto loading
|
* EGroupware eTemplate2 - JS widget class with value attribute and auto loading
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -21,9 +21,11 @@
|
|||||||
* et2_valueWidget is the base class for et2_inputWidget - valueWidget introduces
|
* et2_valueWidget is the base class for et2_inputWidget - valueWidget introduces
|
||||||
* the "value" attribute and automatically loads it from the "content" array
|
* the "value" attribute and automatically loads it from the "content" array
|
||||||
* after loading from XML.
|
* after loading from XML.
|
||||||
|
*
|
||||||
|
* @augments et2_baseWidget
|
||||||
*/
|
*/
|
||||||
var et2_valueWidget = et2_baseWidget.extend({
|
var et2_valueWidget = et2_baseWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"label": {
|
"label": {
|
||||||
"name": "Label",
|
"name": "Label",
|
||||||
@ -40,6 +42,12 @@ var et2_valueWidget = et2_baseWidget.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @memberOf et2_valueWidget
|
||||||
|
* @param _attrs
|
||||||
|
*/
|
||||||
transformAttributes: function(_attrs) {
|
transformAttributes: function(_attrs) {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Widget base class
|
* EGroupware eTemplate2 - JS Widget base class
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -98,9 +98,11 @@ function et2_createWidget(_name, _attrs, _parent)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The et2 widget base class.
|
* The et2 widget base class.
|
||||||
|
*
|
||||||
|
* @augments Class
|
||||||
*/
|
*/
|
||||||
var et2_widget = Class.extend({
|
var et2_widget = Class.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"id": {
|
"id": {
|
||||||
"name": "ID",
|
"name": "ID",
|
||||||
@ -161,6 +163,7 @@ var et2_widget = Class.extend({
|
|||||||
* object. The default constructor always adds the new instance to the
|
* object. The default constructor always adds the new instance to the
|
||||||
* children list of the given parent object. _parent may be NULL.
|
* children list of the given parent object. _parent may be NULL.
|
||||||
* @param _attrs is an associative array of attributes.
|
* @param _attrs is an associative array of attributes.
|
||||||
|
* @memberOf et2_widget
|
||||||
*/
|
*/
|
||||||
init: function(_parent, _attrs) {
|
init: function(_parent, _attrs) {
|
||||||
|
|
||||||
@ -640,7 +643,7 @@ var et2_widget = Class.extend({
|
|||||||
}
|
}
|
||||||
if(entry && entry.type)
|
if(entry && entry.type)
|
||||||
{
|
{
|
||||||
_nodeName = attributes["type"] = entry.type
|
_nodeName = attributes["type"] = entry.type;
|
||||||
}
|
}
|
||||||
entry = null;
|
entry = null;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS XML Code
|
* EGroupware eTemplate2 - JS XML Code
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - dataview code
|
* EGroupware eTemplate2 - dataview code
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -10,7 +10,7 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
"use strict"
|
"use strict";
|
||||||
|
|
||||||
/*egw:uses
|
/*egw:uses
|
||||||
jquery.jquery;
|
jquery.jquery;
|
||||||
@ -28,6 +28,8 @@
|
|||||||
* header, etc.) and contains the root container: an instance of
|
* header, etc.) and contains the root container: an instance of
|
||||||
* et2_dataview_view_grid, which can be accessed using the "grid" property of
|
* et2_dataview_view_grid, which can be accessed using the "grid" property of
|
||||||
* this object.
|
* this object.
|
||||||
|
*
|
||||||
|
* @augments Class
|
||||||
*/
|
*/
|
||||||
var et2_dataview = Class.extend({
|
var et2_dataview = Class.extend({
|
||||||
|
|
||||||
@ -54,6 +56,7 @@ var et2_dataview = Class.extend({
|
|||||||
/**
|
/**
|
||||||
* Constructor for the grid container
|
* Constructor for the grid container
|
||||||
* @param object _parentNode is the DOM-Node into which the grid view will be inserted
|
* @param object _parentNode is the DOM-Node into which the grid view will be inserted
|
||||||
|
* @memberOf et2_dataview
|
||||||
*/
|
*/
|
||||||
init: function(_parentNode, _egw) {
|
init: function(_parentNode, _egw) {
|
||||||
|
|
||||||
@ -362,7 +365,7 @@ var et2_dataview = Class.extend({
|
|||||||
_buildHeader: function() {
|
_buildHeader: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
var handler = function(event) {
|
var handler = function(event) {
|
||||||
}
|
};
|
||||||
for (var i = 0; i < this.columns.length; i++)
|
for (var i = 0; i < this.columns.length; i++)
|
||||||
{
|
{
|
||||||
var col = this.columns[i];
|
var col = this.columns[i];
|
||||||
@ -402,14 +405,14 @@ var et2_dataview = Class.extend({
|
|||||||
_buildSelectCol: function() {
|
_buildSelectCol: function() {
|
||||||
// Build the "select columns" icon
|
// Build the "select columns" icon
|
||||||
this.selectColIcon = $j(document.createElement("span"))
|
this.selectColIcon = $j(document.createElement("span"))
|
||||||
.addClass("selectcols")
|
.addClass("selectcols");
|
||||||
|
|
||||||
// Build the option column
|
// Build the option column
|
||||||
this.selectCol = $j(document.createElement("th"))
|
this.selectCol = $j(document.createElement("th"))
|
||||||
.addClass("optcol")
|
.addClass("optcol")
|
||||||
.append(this.selectColIcon)
|
.append(this.selectColIcon)
|
||||||
// Toggle display of option popup
|
// Toggle display of option popup
|
||||||
.click(this, function(e) {if(e.data.selectColumnsClick) e.data.selectColumnsClick(e)})
|
.click(this, function(e) {if(e.data.selectColumnsClick) e.data.selectColumnsClick(e);})
|
||||||
.appendTo(this.headTr);
|
.appendTo(this.headTr);
|
||||||
|
|
||||||
this.selectCol.css("width", this.scrollbarWidth - this.selectCol.outerWidth()
|
this.selectCol.css("width", this.scrollbarWidth - this.selectCol.outerWidth()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2
|
* EGroupware eTemplate2
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2
|
* EGroupware eTemplate2
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -24,9 +24,22 @@
|
|||||||
* manage an external action object interface for each visible row and proxy all
|
* manage an external action object interface for each visible row and proxy all
|
||||||
* state changes between an dummy action object, that does no selection handling,
|
* state changes between an dummy action object, that does no selection handling,
|
||||||
* and the external action object interface.
|
* and the external action object interface.
|
||||||
|
*
|
||||||
|
* @augments Class
|
||||||
|
*/
|
||||||
|
var et2_dataview_selectionManager = Class.extend(
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param _parent
|
||||||
|
* @param _indexMap
|
||||||
|
* @param _actionObjectManager
|
||||||
|
* @param _queryRangeCallback
|
||||||
|
* @param _makeVisibleCallback
|
||||||
|
* @param _context
|
||||||
|
* @memberOf et2_dataview_selectionManager
|
||||||
*/
|
*/
|
||||||
var et2_dataview_selectionManager = Class.extend({
|
|
||||||
|
|
||||||
init: function (_parent, _indexMap, _actionObjectManager,
|
init: function (_parent, _indexMap, _actionObjectManager,
|
||||||
_queryRangeCallback, _makeVisibleCallback, _context) {
|
_queryRangeCallback, _makeVisibleCallback, _context) {
|
||||||
|
|
||||||
@ -103,7 +116,7 @@ var et2_dataview_selectionManager = Class.extend({
|
|||||||
if (!entry.tr && _links)
|
if (!entry.tr && _links)
|
||||||
{
|
{
|
||||||
this._attachActionObjectInterface(entry, _tr, _uid);
|
this._attachActionObjectInterface(entry, _tr, _uid);
|
||||||
this._attachActionObject(entry, _tr, _uid, _links, _idx)
|
this._attachActionObject(entry, _tr, _uid, _links, _idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the entry
|
// Update the entry
|
||||||
@ -215,7 +228,7 @@ var et2_dataview_selectionManager = Class.extend({
|
|||||||
return {
|
return {
|
||||||
"inverted": this._invertSelection,
|
"inverted": this._invertSelection,
|
||||||
"ids": ids
|
"ids": ids
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
@ -263,7 +276,7 @@ var et2_dataview_selectionManager = Class.extend({
|
|||||||
// controller
|
// controller
|
||||||
dummyAOI.doMakeVisible = function () {
|
dummyAOI.doMakeVisible = function () {
|
||||||
self._makeVisibleCallback.call(self._context, _idx);
|
self._makeVisibleCallback.call(self._context, _idx);
|
||||||
}
|
};
|
||||||
|
|
||||||
// Connect the the two AOIs
|
// Connect the the two AOIs
|
||||||
dummyAOI.doTriggerEvent = _entry.aoi.doTriggerEvent;
|
dummyAOI.doTriggerEvent = _entry.aoi.doTriggerEvent;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - Contains interfaces used inside the dataview
|
* EGroupware eTemplate2 - Contains interfaces used inside the dataview
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -10,7 +10,7 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
"use strict"
|
"use strict";
|
||||||
|
|
||||||
/*egw:uses
|
/*egw:uses
|
||||||
et2_core_inheritance;
|
et2_core_inheritance;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - Class which contains a the columns model
|
* EGroupware eTemplate2 - Class which contains a the columns model
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -10,7 +10,7 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
"use strict"
|
"use strict";
|
||||||
|
|
||||||
/*egw:uses
|
/*egw:uses
|
||||||
et2_inheritance;
|
et2_inheritance;
|
||||||
@ -26,6 +26,8 @@ var ET2_COL_VISIBILITY_ALWAYS_NOSELECT = 3;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which stores the data of a single column.
|
* Class which stores the data of a single column.
|
||||||
|
*
|
||||||
|
* @augments Class
|
||||||
*/
|
*/
|
||||||
var et2_dataview_column = Class.extend({
|
var et2_dataview_column = Class.extend({
|
||||||
|
|
||||||
@ -68,6 +70,12 @@ var et2_dataview_column = Class.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param _attrs
|
||||||
|
* @memberOf et2_dataview_column
|
||||||
|
*/
|
||||||
init: function(_attrs) {
|
init: function(_attrs) {
|
||||||
this.fixedWidth = false;
|
this.fixedWidth = false;
|
||||||
this.relativeWidth = false;
|
this.relativeWidth = false;
|
||||||
@ -291,7 +299,7 @@ var et2_dataview_columns = Class.extend({
|
|||||||
// Calculate how many space is - relatively - not occupied with columns with
|
// Calculate how many space is - relatively - not occupied with columns with
|
||||||
// relative or fixed width
|
// relative or fixed width
|
||||||
var remRelWidth = 1;
|
var remRelWidth = 1;
|
||||||
var noWidthCount = 0
|
var noWidthCount = 0;
|
||||||
|
|
||||||
for (var i = 0; i < this.columns.length; i++)
|
for (var i = 0; i < this.columns.length; i++)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - Contains interfaces used inside the dataview
|
* EGroupware eTemplate2 - Contains interfaces used inside the dataview
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -42,13 +42,17 @@ function et2_dataview_rowAOI(_node)
|
|||||||
// Rows without a checkbox OR an id set are unselectable
|
// Rows without a checkbox OR an id set are unselectable
|
||||||
aoi.doGetDOMNode = function() {
|
aoi.doGetDOMNode = function() {
|
||||||
return aoi.node;
|
return aoi.node;
|
||||||
}
|
};
|
||||||
|
|
||||||
// Prevent the browser from selecting the content of the element, when
|
// Prevent the browser from selecting the content of the element, when
|
||||||
// a special key is pressed.
|
// a special key is pressed.
|
||||||
$j(_node).mousedown(egwPreventSelect);
|
$j(_node).mousedown(egwPreventSelect);
|
||||||
|
|
||||||
// Now append some action code to the node
|
/**
|
||||||
|
* Now append some action code to the node
|
||||||
|
*
|
||||||
|
* @memberOf et2_dataview_rowAOI
|
||||||
|
*/
|
||||||
var selectHandler = function(e) {
|
var selectHandler = function(e) {
|
||||||
// Reset the focus so that keyboard navigation will work properly
|
// Reset the focus so that keyboard navigation will work properly
|
||||||
// after the element has been clicked
|
// after the element has been clicked
|
||||||
@ -100,7 +104,7 @@ function et2_dataview_rowAOI(_node)
|
|||||||
egwBitIsSet(_state, EGW_AO_STATE_FOCUSED));
|
egwBitIsSet(_state, EGW_AO_STATE_FOCUSED));
|
||||||
$j(this.node).toggleClass('selected',
|
$j(this.node).toggleClass('selected',
|
||||||
selected);
|
selected);
|
||||||
}
|
};
|
||||||
|
|
||||||
return aoi;
|
return aoi;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - dataview code
|
* EGroupware eTemplate2 - dataview code
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -30,14 +30,17 @@
|
|||||||
* A container does not know where it resides inside the grid, or whether it is
|
* A container does not know where it resides inside the grid, or whether it is
|
||||||
* currently visible or not -- this information is efficiently managed by the
|
* currently visible or not -- this information is efficiently managed by the
|
||||||
* et2_dataview_grid container.
|
* et2_dataview_grid container.
|
||||||
|
*
|
||||||
|
* @augments Class
|
||||||
*/
|
*/
|
||||||
var et2_dataview_container = Class.extend(et2_dataview_IInvalidatable, {
|
var et2_dataview_container = Class.extend(et2_dataview_IInvalidatable,
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Initializes the container object.
|
* Initializes the container object.
|
||||||
*
|
*
|
||||||
* @param _parent is an object which implements the IInvalidatable
|
* @param _parent is an object which implements the IInvalidatable
|
||||||
* interface. _parent may not be null.
|
* interface. _parent may not be null.
|
||||||
|
* @memberOf et2_dataview_container
|
||||||
*/
|
*/
|
||||||
init: function(_parent) {
|
init: function(_parent) {
|
||||||
// Copy the given invalidation element
|
// Copy the given invalidation element
|
||||||
@ -253,7 +256,7 @@ var et2_dataview_container = Class.extend(et2_dataview_IInvalidatable, {
|
|||||||
return {
|
return {
|
||||||
"avgHeight": this.getHeight(),
|
"avgHeight": this.getHeight(),
|
||||||
"avgCount": 1
|
"avgCount": 1
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -392,6 +395,6 @@ else
|
|||||||
et2_dataview_container.prototype._nodeHeight = function(_node)
|
et2_dataview_container.prototype._nodeHeight = function(_node)
|
||||||
{
|
{
|
||||||
return _node.offsetHeight;
|
return _node.offsetHeight;
|
||||||
}
|
};
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - Class which contains the "grid" base class
|
* EGroupware eTemplate2 - Class which contains the "grid" base class
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -42,9 +42,11 @@ var ET2_GRID_INVALIDATE_TIMEOUT = 25;
|
|||||||
* range until they get removed.
|
* range until they get removed.
|
||||||
*/
|
*/
|
||||||
var ET2_GRID_HOLD_COUNT = 50;
|
var ET2_GRID_HOLD_COUNT = 50;
|
||||||
|
/**
|
||||||
var et2_dataview_grid = et2_dataview_container.extend(et2_dataview_IViewRange, {
|
* @augments et2_dataview_container
|
||||||
|
*/
|
||||||
|
var et2_dataview_grid = et2_dataview_container.extend(et2_dataview_IViewRange,
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Creates the grid.
|
* Creates the grid.
|
||||||
*
|
*
|
||||||
@ -52,6 +54,7 @@ var et2_dataview_grid = et2_dataview_container.extend(et2_dataview_IViewRange, {
|
|||||||
* is the outer grid which manages the scrollarea. If not null, all other
|
* is the outer grid which manages the scrollarea. If not null, all other
|
||||||
* parameters are ignored and copied from the given grid instance.
|
* parameters are ignored and copied from the given grid instance.
|
||||||
* @param _avgHeight is the starting average height of the column rows.
|
* @param _avgHeight is the starting average height of the column rows.
|
||||||
|
* @memberOf et2_dataview_grid
|
||||||
*/
|
*/
|
||||||
init: function (_parent, _parentGrid, _egw, _rowProvider, _avgHeight) {
|
init: function (_parent, _parentGrid, _egw, _rowProvider, _avgHeight) {
|
||||||
|
|
||||||
@ -433,7 +436,7 @@ var et2_dataview_grid = et2_dataview_container.extend(et2_dataview_IViewRange, {
|
|||||||
return {
|
return {
|
||||||
"avgCount": this._avgCount,
|
"avgCount": this._avgCount,
|
||||||
"avgHeight": this._avgHeight
|
"avgHeight": this._avgHeight
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise return the parent average height
|
// Otherwise return the parent average height
|
||||||
@ -448,12 +451,9 @@ var et2_dataview_grid = et2_dataview_container.extend(et2_dataview_IViewRange, {
|
|||||||
return {
|
return {
|
||||||
"avgCount": 1,
|
"avgCount": 1,
|
||||||
"avgHeight": this._orgAvgHeight
|
"avgHeight": this._orgAvgHeight
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return null;
|
return null;
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - Functions which allow resizing of table headers
|
* EGroupware eTemplate2 - Functions which allow resizing of table headers
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -43,7 +43,7 @@
|
|||||||
// Prevent text selection
|
// Prevent text selection
|
||||||
_elem[0].onselectstart = function() {
|
_elem[0].onselectstart = function() {
|
||||||
return false;
|
return false;
|
||||||
}
|
};
|
||||||
|
|
||||||
// Reset the "didResize" flag
|
// Reset the "didResize" flag
|
||||||
didResize = false;
|
didResize = false;
|
||||||
@ -121,12 +121,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
this.et2_dataview_resetResizeable = function(_elem)
|
this.et2_dataview_resetResizeable = function(_elem)
|
||||||
{
|
{
|
||||||
// Remove all events in the ".resize" namespace from the element
|
// Remove all events in the ".resize" namespace from the element
|
||||||
_elem.unbind(".resize");
|
_elem.unbind(".resize");
|
||||||
}
|
};
|
||||||
}).call(window);
|
}).call(window);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - dataview
|
* EGroupware eTemplate2 - dataview
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -18,13 +18,17 @@
|
|||||||
et2_dataview_view_container;
|
et2_dataview_view_container;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var et2_dataview_row = et2_dataview_container.extend(et2_dataview_IViewRange, {
|
/**
|
||||||
|
* @augments et2_dataview_container
|
||||||
|
*/
|
||||||
|
var et2_dataview_row = et2_dataview_container.extend(et2_dataview_IViewRange,
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Creates the row container. Use the "setRow" function to load the actual
|
* Creates the row container. Use the "setRow" function to load the actual
|
||||||
* row content.
|
* row content.
|
||||||
*
|
*
|
||||||
* @param _parent is the row parent container.
|
* @param _parent is the row parent container.
|
||||||
|
* @memberOf et2_dataview_row
|
||||||
*/
|
*/
|
||||||
init: function(_parent) {
|
init: function(_parent) {
|
||||||
// Call the inherited constructor
|
// Call the inherited constructor
|
||||||
@ -125,13 +129,13 @@ var et2_dataview_row = et2_dataview_container.extend(et2_dataview_IViewRange, {
|
|||||||
|
|
||||||
getAvgHeightData: function() {
|
getAvgHeightData: function() {
|
||||||
// Only take the height of the own tr into account
|
// Only take the height of the own tr into account
|
||||||
var oldVisible = this.expansionVisible;
|
//var oldVisible = this.expansionVisible;
|
||||||
this.expansionVisible = false;
|
this.expansionVisible = false;
|
||||||
|
|
||||||
var res = {
|
var res = {
|
||||||
"avgHeight": this.getHeight(),
|
"avgHeight": this.getHeight(),
|
||||||
"avgCount": 1
|
"avgCount": 1
|
||||||
}
|
};
|
||||||
|
|
||||||
this.expansionVisible = true;
|
this.expansionVisible = true;
|
||||||
|
|
||||||
@ -179,7 +183,7 @@ var et2_dataview_row = et2_dataview_container.extend(et2_dataview_IViewRange, {
|
|||||||
&& this.expansionContainer.implements(et2_dataview_IViewRange))
|
&& this.expansionContainer.implements(et2_dataview_IViewRange))
|
||||||
{
|
{
|
||||||
// Substract the height of the own row from the container
|
// Substract the height of the own row from the container
|
||||||
var oh = $j(this._nodes[0]).height()
|
var oh = $j(this._nodes[0]).height();
|
||||||
_range.top -= oh;
|
_range.top -= oh;
|
||||||
|
|
||||||
// Proxy the setViewRange call to the expansion container
|
// Proxy the setViewRange call to the expansion container
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - Class which contains a factory method for rows
|
* EGroupware eTemplate2 - Class which contains a factory method for rows
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -21,9 +21,17 @@
|
|||||||
/**
|
/**
|
||||||
* The row provider contains prototypes (full clonable dom-trees)
|
* The row provider contains prototypes (full clonable dom-trees)
|
||||||
* for all registered row types.
|
* for all registered row types.
|
||||||
|
*
|
||||||
|
* @augments Class
|
||||||
|
*/
|
||||||
|
var et2_dataview_rowProvider = Class.extend(
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param _outerId
|
||||||
|
* @param _columnIds
|
||||||
|
* @memberOf et2_dataview_rowProvider
|
||||||
*/
|
*/
|
||||||
var et2_dataview_rowProvider = Class.extend({
|
|
||||||
|
|
||||||
init: function(_outerId, _columnIds) {
|
init: function(_outerId, _columnIds) {
|
||||||
// Copy the given parameters
|
// Copy the given parameters
|
||||||
this._outerId = _outerId;
|
this._outerId = _outerId;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - Class which contains the spacer container
|
* EGroupware eTemplate2 - Class which contains the spacer container
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -17,8 +17,18 @@
|
|||||||
et2_dataview_view_container;
|
et2_dataview_view_container;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var et2_dataview_spacer = et2_dataview_container.extend({
|
/**
|
||||||
|
* @augments et2_dataview_container
|
||||||
|
*/
|
||||||
|
var et2_dataview_spacer = et2_dataview_container.extend(
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param _parent
|
||||||
|
* @param _rowProvider
|
||||||
|
* @memberOf et2_dataview_spacer
|
||||||
|
*/
|
||||||
init: function (_parent, _rowProvider) {
|
init: function (_parent, _rowProvider) {
|
||||||
// Call the inherited container constructor
|
// Call the inherited container constructor
|
||||||
this._super(_parent);
|
this._super(_parent);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Custom fields object
|
* EGroupware eTemplate2 - JS Custom fields object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -20,8 +20,11 @@
|
|||||||
et2_core_inputWidget;
|
et2_core_inputWidget;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput], {
|
/**
|
||||||
|
* @augments et2_dataview
|
||||||
|
*/
|
||||||
|
var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput],
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
'customfields': {
|
'customfields': {
|
||||||
'name': 'Custom fields',
|
'name': 'Custom fields',
|
||||||
@ -52,6 +55,11 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput
|
|||||||
|
|
||||||
DEFAULT_ID: "custom_fields",
|
DEFAULT_ID: "custom_fields",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_customfields_list
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
// Some apps (infolog edit) don't give ID, so assign one to get settings
|
// Some apps (infolog edit) don't give ID, so assign one to get settings
|
||||||
if(!arguments[1].id) arguments[1].id = this.DEFAULT_ID;
|
if(!arguments[1].id) arguments[1].id = this.DEFAULT_ID;
|
||||||
|
@ -1,3 +1,20 @@
|
|||||||
|
/**
|
||||||
|
* EGroupware eTemplate2 - JS Itempicker object
|
||||||
|
* derived from et2_link_entry widget @copyright 2011 Nathan Gray
|
||||||
|
*
|
||||||
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
|
* @package etemplate
|
||||||
|
* @subpackage api
|
||||||
|
* @link http://www.egroupware.org
|
||||||
|
* @author Christian Binder
|
||||||
|
* @author Nathan Gray
|
||||||
|
* @copyright 2012 Christian Binder
|
||||||
|
* @copyright 2011 Nathan Gray
|
||||||
|
* @version $Id: et2_widget_itempicker.js 38623 2012-03-26 23:27:53Z jaytraxx $
|
||||||
|
*/
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
function itempickerDocumentAction(context, data) {
|
function itempickerDocumentAction(context, data) {
|
||||||
var formid = "itempicker_action_form";
|
var formid = "itempicker_action_form";
|
||||||
var form = "<form id='" + formid + "' action='index.php?menuaction=" + data.app + "." + data.app + "_merge.download_by_request' method='POST'>"
|
var form = "<form id='" + formid + "' action='index.php?menuaction=" + data.app + "." + data.app + "_merge.download_by_request' method='POST'>"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Nextmatch object
|
* EGroupware eTemplate2 - JS Nextmatch object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -66,9 +66,11 @@ var et2_INextmatchSortable = new Interface({
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the "nextmatch" XET-Tag
|
* Class which implements the "nextmatch" XET-Tag
|
||||||
|
*
|
||||||
|
* @augments et2_DOMWidget
|
||||||
*/
|
*/
|
||||||
var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], {
|
var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"template": {
|
"template": {
|
||||||
"name": "Template",
|
"name": "Template",
|
||||||
@ -111,6 +113,11 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], {
|
|||||||
|
|
||||||
columns: [],
|
columns: [],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_nextmatch
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -124,7 +131,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], {
|
|||||||
{
|
{
|
||||||
if(prefs.visible[i].indexOf(et2_nextmatch_customfields.prototype.prefix) == 0)
|
if(prefs.visible[i].indexOf(et2_nextmatch_customfields.prototype.prefix) == 0)
|
||||||
{
|
{
|
||||||
cfs[prefs.visible[i].substr(1)] = !prefs.negated
|
cfs[prefs.visible[i].substr(1)] = !prefs.negated;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var global_data = this.getArrayMgr("modifications").getRoot().getEntry('~custom_fields~');
|
var global_data = this.getArrayMgr("modifications").getRoot().getEntry('~custom_fields~');
|
||||||
@ -256,7 +263,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], {
|
|||||||
this.activeFilters["sort"] = {
|
this.activeFilters["sort"] = {
|
||||||
"id": _id,
|
"id": _id,
|
||||||
"asc": _asc
|
"asc": _asc
|
||||||
}
|
};
|
||||||
|
|
||||||
// Set the sortmode display
|
// Set the sortmode display
|
||||||
this.iterateOver(function(_widget) {
|
this.iterateOver(function(_widget) {
|
||||||
@ -596,7 +603,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], {
|
|||||||
* for next time
|
* for next time
|
||||||
*/
|
*/
|
||||||
_updateUserPreferences: function() {
|
_updateUserPreferences: function() {
|
||||||
var colMgr = this.dataview.getColumnMgr()
|
var colMgr = this.dataview.getColumnMgr();
|
||||||
if(!this.options.settings.columnselection_pref) {
|
if(!this.options.settings.columnselection_pref) {
|
||||||
this.options.settings.columnselection_pref = this.options.template;
|
this.options.settings.columnselection_pref = this.options.template;
|
||||||
}
|
}
|
||||||
@ -982,7 +989,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], {
|
|||||||
cancelButton.set_label(this.egw().lang("cancel"));
|
cancelButton.set_label(this.egw().lang("cancel"));
|
||||||
cancelButton.onclick = function() {
|
cancelButton.onclick = function() {
|
||||||
self.selectPopup.toggle();
|
self.selectPopup.toggle();
|
||||||
}
|
};
|
||||||
|
|
||||||
this.selectPopup = jQuery(document.createElement("div"))
|
this.selectPopup = jQuery(document.createElement("div"))
|
||||||
.addClass("colselection ui-dialog ui-widget-content")
|
.addClass("colselection ui-dialog ui-widget-content")
|
||||||
@ -998,7 +1005,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], {
|
|||||||
var apps = this.egw().user('apps');
|
var apps = this.egw().user('apps');
|
||||||
if(apps['admin'])
|
if(apps['admin'])
|
||||||
{
|
{
|
||||||
this.selectPopup.append(defaultCheck.getSurroundings().getDOMNode(defaultCheck.getDOMNode()))
|
this.selectPopup.append(defaultCheck.getSurroundings().getDOMNode(defaultCheck.getDOMNode()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1150,7 +1157,6 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], {
|
|||||||
resetDirty: function() {},
|
resetDirty: function() {},
|
||||||
isDirty: function() { return false;}
|
isDirty: function() { return false;}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_nextmatch, ["nextmatch"]);
|
et2_register_widget(et2_nextmatch, ["nextmatch"]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1158,8 +1164,10 @@ et2_register_widget(et2_nextmatch, ["nextmatch"]);
|
|||||||
*
|
*
|
||||||
* Unable to use an existing template for this because parent (nm) doesn't, and template widget doesn't
|
* Unable to use an existing template for this because parent (nm) doesn't, and template widget doesn't
|
||||||
* actually load templates from the server.
|
* actually load templates from the server.
|
||||||
|
* @augments et2_DOMWidget
|
||||||
*/
|
*/
|
||||||
var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader, {
|
var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader,
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"filter_label": {
|
"filter_label": {
|
||||||
"name": "Filter label",
|
"name": "Filter label",
|
||||||
@ -1191,6 +1199,13 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader, {
|
|||||||
headers: [],
|
headers: [],
|
||||||
header_div: [],
|
header_div: [],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param nextmatch
|
||||||
|
* @param nm_div
|
||||||
|
* @memberOf et2_nextmatch_header_bar
|
||||||
|
*/
|
||||||
init: function(nextmatch, nm_div) {
|
init: function(nextmatch, nm_div) {
|
||||||
this._super.apply(this, [nextmatch,nextmatch.options.settings]);
|
this._super.apply(this, [nextmatch,nextmatch.options.settings]);
|
||||||
this.nextmatch = nextmatch;
|
this.nextmatch = nextmatch;
|
||||||
@ -1309,7 +1324,7 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader, {
|
|||||||
|
|
||||||
this.search_button = et2_createWidget("button", {"label":">"}, this);
|
this.search_button = et2_createWidget("button", {"label":">"}, this);
|
||||||
this.search_button.onclick = function(event) {
|
this.search_button.onclick = function(event) {
|
||||||
self.nextmatch.activeFilters.search = self.search.getValue()
|
self.nextmatch.activeFilters.search = self.search.getValue();
|
||||||
self.nextmatch.applyFilters();
|
self.nextmatch.applyFilters();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1388,7 +1403,7 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader, {
|
|||||||
// Filter now
|
// Filter now
|
||||||
self.nextmatch.applyFilters();
|
self.nextmatch.applyFilters();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// Set activeFilters to current value
|
// Set activeFilters to current value
|
||||||
self.nextmatch.activeFilters[_widget.id] = _widget.getValue();
|
self.nextmatch.activeFilters[_widget.id] = _widget.getValue();
|
||||||
@ -1473,7 +1488,7 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Get the onchange function string
|
// Get the onchange function string
|
||||||
var onchange = this.nextmatch.options.settings[name+"_onchange"]
|
var onchange = this.nextmatch.options.settings[name+"_onchange"];
|
||||||
|
|
||||||
// Real submits cause all sorts of problems
|
// Real submits cause all sorts of problems
|
||||||
if(onchange.match(/this\.form\.submit/))
|
if(onchange.match(/this\.form\.submit/))
|
||||||
@ -1551,7 +1566,7 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader, {
|
|||||||
$j(filters.searchletter ? "td#"+filters.searchletter : "td.lettersearch[id='']").addClass("lettersearch_active");
|
$j(filters.searchletter ? "td#"+filters.searchletter : "td.lettersearch[id='']").addClass("lettersearch_active");
|
||||||
|
|
||||||
// Set activeFilters to current value
|
// Set activeFilters to current value
|
||||||
filters.searchletter = $j("td.lettersearch_active").attr("id")
|
filters.searchletter = $j("td.lettersearch_active").attr("id");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1580,9 +1595,11 @@ et2_register_widget(et2_nextmatch_header_bar, ["nextmatch_header_bar"]);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Classes for the nextmatch sortheaders etc.
|
* Classes for the nextmatch sortheaders etc.
|
||||||
|
*
|
||||||
|
* @augments et2_baseWidget
|
||||||
*/
|
*/
|
||||||
var et2_nextmatch_header = et2_baseWidget.extend(et2_INextmatchHeader, {
|
var et2_nextmatch_header = et2_baseWidget.extend(et2_INextmatchHeader,
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"label": {
|
"label": {
|
||||||
"name": "Caption",
|
"name": "Caption",
|
||||||
@ -1597,6 +1614,11 @@ var et2_nextmatch_header = et2_baseWidget.extend(et2_INextmatchHeader, {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_nextmatch_header
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -1629,8 +1651,11 @@ et2_register_widget(et2_nextmatch_header, ['nextmatch-header']);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend header to process customfields
|
* Extend header to process customfields
|
||||||
|
*
|
||||||
|
* @augments et2_customfields_list
|
||||||
*/
|
*/
|
||||||
var et2_nextmatch_customfields = et2_customfields_list.extend(et2_INextmatchHeader, {
|
var et2_nextmatch_customfields = et2_customfields_list.extend(et2_INextmatchHeader,
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
'customfields': {
|
'customfields': {
|
||||||
'name': 'Custom fields',
|
'name': 'Custom fields',
|
||||||
@ -1642,6 +1667,11 @@ var et2_nextmatch_customfields = et2_customfields_list.extend(et2_INextmatchHead
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_nextmatch_customfields
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this.nextmatch = null;
|
this.nextmatch = null;
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
@ -1827,8 +1857,16 @@ var et2_nextmatch_customfields = et2_customfields_list.extend(et2_INextmatchHead
|
|||||||
});
|
});
|
||||||
et2_register_widget(et2_nextmatch_customfields, ['nextmatch-customfields']);
|
et2_register_widget(et2_nextmatch_customfields, ['nextmatch-customfields']);
|
||||||
|
|
||||||
var et2_nextmatch_sortheader = et2_nextmatch_header.extend(et2_INextmatchSortable, {
|
/**
|
||||||
|
* @augments et2_nextmatch_header
|
||||||
|
*/
|
||||||
|
var et2_nextmatch_sortheader = et2_nextmatch_header.extend(et2_INextmatchSortable,
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_nextmatch_sortheader
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -1859,14 +1897,17 @@ var et2_nextmatch_sortheader = et2_nextmatch_header.extend(et2_INextmatchSortabl
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_nextmatch_sortheader, ['nextmatch-sortheader']);
|
et2_register_widget(et2_nextmatch_sortheader, ['nextmatch-sortheader']);
|
||||||
|
|
||||||
|
/**
|
||||||
var et2_nextmatch_filterheader = et2_selectbox.extend([et2_INextmatchHeader, et2_IResizeable], {
|
* @augments et2_selectbox
|
||||||
|
*/
|
||||||
|
var et2_nextmatch_filterheader = et2_selectbox.extend([et2_INextmatchHeader, et2_IResizeable],
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Override to add change handler
|
* Override to add change handler
|
||||||
|
*
|
||||||
|
* @memberOf et2_nextmatch_filterheader
|
||||||
*/
|
*/
|
||||||
createInputWidget: function() {
|
createInputWidget: function() {
|
||||||
// Make sure there's an option for all
|
// Make sure there's an option for all
|
||||||
@ -1886,7 +1927,7 @@ var et2_nextmatch_filterheader = et2_selectbox.extend([et2_INextmatchHeader, et2
|
|||||||
event.data.nextmatch.activeFilters.col_filter = {};
|
event.data.nextmatch.activeFilters.col_filter = {};
|
||||||
if(event.data.input.val())
|
if(event.data.input.val())
|
||||||
{
|
{
|
||||||
event.data.nextmatch.activeFilters["col_filter"][event.data.id] = event.data.input.val()
|
event.data.nextmatch.activeFilters["col_filter"][event.data.id] = event.data.input.val();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1923,13 +1964,17 @@ var et2_nextmatch_filterheader = et2_selectbox.extend([et2_INextmatchHeader, et2
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_nextmatch_filterheader, ['nextmatch-filterheader']);
|
et2_register_widget(et2_nextmatch_filterheader, ['nextmatch-filterheader']);
|
||||||
|
|
||||||
var et2_nextmatch_accountfilterheader = et2_selectAccount.extend([et2_INextmatchHeader, et2_IResizeable], {
|
/**
|
||||||
|
* @augments et2_selectAccount
|
||||||
|
*/
|
||||||
|
var et2_nextmatch_accountfilterheader = et2_selectAccount.extend([et2_INextmatchHeader, et2_IResizeable],
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Override to add change handler
|
* Override to add change handler
|
||||||
|
*
|
||||||
|
* @memberOf et2_nextmatch_accountfilterheader
|
||||||
*/
|
*/
|
||||||
createInputWidget: function() {
|
createInputWidget: function() {
|
||||||
// Make sure there's an option for all
|
// Make sure there's an option for all
|
||||||
@ -1997,10 +2042,15 @@ var et2_nextmatch_accountfilterheader = et2_selectAccount.extend([et2_INextmatch
|
|||||||
});
|
});
|
||||||
et2_register_widget(et2_nextmatch_accountfilterheader, ['nextmatch-accountfilter']);
|
et2_register_widget(et2_nextmatch_accountfilterheader, ['nextmatch-accountfilter']);
|
||||||
|
|
||||||
var et2_nextmatch_entryheader = et2_link_entry.extend(et2_INextmatchHeader, {
|
/**
|
||||||
|
* @augments et2_link_entry
|
||||||
|
*/
|
||||||
|
var et2_nextmatch_entryheader = et2_link_entry.extend(et2_INextmatchHeader,
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Override to add change handler
|
* Override to add change handler
|
||||||
|
*
|
||||||
|
* @memberOf et2_link_entry
|
||||||
*/
|
*/
|
||||||
select: function(event, selected) {
|
select: function(event, selected) {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
@ -2035,7 +2085,7 @@ var et2_nextmatch_entryheader = et2_link_entry.extend(et2_INextmatchHeader, {
|
|||||||
if(!value.app || !value.id) return null;
|
if(!value.app || !value.id) return null;
|
||||||
value = value.app +":"+value.id;
|
value = value.app +":"+value.id;
|
||||||
}
|
}
|
||||||
return value
|
return value;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2061,8 +2111,11 @@ var et2_nextmatch_entryheader = et2_link_entry.extend(et2_INextmatchHeader, {
|
|||||||
});
|
});
|
||||||
et2_register_widget(et2_nextmatch_entryheader, ['nextmatch-entryheader']);
|
et2_register_widget(et2_nextmatch_entryheader, ['nextmatch-entryheader']);
|
||||||
|
|
||||||
|
/**
|
||||||
var et2_nextmatch_customfilter = et2_nextmatch_filterheader.extend({
|
* @augments et2_nextmatch_filterheader
|
||||||
|
*/
|
||||||
|
var et2_nextmatch_customfilter = et2_nextmatch_filterheader.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"widget_type": {
|
"widget_type": {
|
||||||
"name": "Actual type",
|
"name": "Actual type",
|
||||||
@ -2080,6 +2133,13 @@ var et2_nextmatch_customfilter = et2_nextmatch_filterheader.extend({
|
|||||||
|
|
||||||
real_node: null,
|
real_node: null,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param _parent
|
||||||
|
* @param _attrs
|
||||||
|
* @memberOf et2_nextmatch_customfilter
|
||||||
|
*/
|
||||||
init: function(_parent, _attrs) {
|
init: function(_parent, _attrs) {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Nextmatch object
|
* EGroupware eTemplate2 - JS Nextmatch object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -30,14 +30,14 @@ function nm_action(_action, _senders, _target, _ids)
|
|||||||
// Get IDs from nextmatch - nextmatch is in the top of the action tree
|
// Get IDs from nextmatch - nextmatch is in the top of the action tree
|
||||||
// @see et2_extension_nextmatch_controller._initActions()
|
// @see et2_extension_nextmatch_controller._initActions()
|
||||||
var nm = null;
|
var nm = null;
|
||||||
var action = _action
|
var action = _action;
|
||||||
while(nm == null && action != null)
|
while(nm == null && action != null)
|
||||||
{
|
{
|
||||||
if(action.data != null && action.data.nextmatch)
|
if(action.data != null && action.data.nextmatch)
|
||||||
{
|
{
|
||||||
nm = action.data.nextmatch;
|
nm = action.data.nextmatch;
|
||||||
}
|
}
|
||||||
action = action.parent
|
action = action.parent;
|
||||||
}
|
}
|
||||||
if(nm)
|
if(nm)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - Class which contains a the data model for nextmatch widgets
|
* EGroupware eTemplate2 - Class which contains a the data model for nextmatch widgets
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -25,9 +25,11 @@
|
|||||||
egw_data;
|
egw_data;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var et2_nextmatch_controller = et2_dataview_controller.extend(
|
/**
|
||||||
et2_IDataProvider, {
|
* @augments et2_dataview_controller
|
||||||
|
*/
|
||||||
|
var et2_nextmatch_controller = et2_dataview_controller.extend(et2_IDataProvider,
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Initializes the nextmatch controller.
|
* Initializes the nextmatch controller.
|
||||||
*
|
*
|
||||||
@ -42,6 +44,7 @@ var et2_nextmatch_controller = et2_dataview_controller.extend(
|
|||||||
* @param _actionLinks contains the action links
|
* @param _actionLinks contains the action links
|
||||||
* @param _actions contains the actions, may be null if an object manager
|
* @param _actions contains the actions, may be null if an object manager
|
||||||
* is given.
|
* is given.
|
||||||
|
* @memberOf et2_nextmatch_controller
|
||||||
*/
|
*/
|
||||||
init: function (_parentController, _egw, _execId, _widget, _parentId,
|
init: function (_parentController, _egw, _execId, _widget, _parentId,
|
||||||
_grid, _rowProvider, _actionLinks, _objectManager, _actions) {
|
_grid, _rowProvider, _actionLinks, _objectManager, _actions) {
|
||||||
@ -55,7 +58,7 @@ var et2_nextmatch_controller = et2_dataview_controller.extend(
|
|||||||
// Initialize the action and the object manager
|
// Initialize the action and the object manager
|
||||||
if (!_objectManager)
|
if (!_objectManager)
|
||||||
{
|
{
|
||||||
this._initActions(_actions)
|
this._initActions(_actions);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -71,7 +74,7 @@ var et2_nextmatch_controller = et2_dataview_controller.extend(
|
|||||||
this._linkCallback, this, this._objectManager);
|
this._linkCallback, this, this._objectManager);
|
||||||
|
|
||||||
// Copy the given parameters
|
// Copy the given parameters
|
||||||
this._actionLinks = _actionLinks
|
this._actionLinks = _actionLinks;
|
||||||
this._execId = _execId;
|
this._execId = _execId;
|
||||||
this._widgetId = _widget.id;
|
this._widgetId = _widget.id;
|
||||||
this._parentId = _parentId;
|
this._parentId = _parentId;
|
||||||
@ -253,7 +256,7 @@ var et2_nextmatch_controller = et2_dataview_controller.extend(
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
var mgr = nm.getArrayMgr('content');
|
var mgr = nm.getArrayMgr('content');
|
||||||
mgr.data[i] = _response.rows[i]
|
mgr.data[i] = _response.rows[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Dynheight object
|
* EGroupware eTemplate2 - JS Dynheight object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -10,7 +10,7 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
"use strict"
|
"use strict";
|
||||||
|
|
||||||
/*egw:use
|
/*egw:use
|
||||||
jquery.jquery;
|
jquery.jquery;
|
||||||
@ -21,9 +21,11 @@
|
|||||||
* Object which resizes an inner node to the maximum extend of an outer node
|
* Object which resizes an inner node to the maximum extend of an outer node
|
||||||
* (without creating a scrollbar) - it achieves that by performing some very
|
* (without creating a scrollbar) - it achieves that by performing some very
|
||||||
* nasty and time consuming calculations.
|
* nasty and time consuming calculations.
|
||||||
|
*
|
||||||
|
* @augments Class
|
||||||
*/
|
*/
|
||||||
var et2_dynheight = Class.extend({
|
var et2_dynheight = Class.extend(
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Constructor for the dynheight object
|
* Constructor for the dynheight object
|
||||||
*
|
*
|
||||||
@ -33,6 +35,7 @@ var et2_dynheight = Class.extend({
|
|||||||
* @param _innerNode is the node which should be scaled. Call update to
|
* @param _innerNode is the node which should be scaled. Call update to
|
||||||
* scale the node.
|
* scale the node.
|
||||||
* @param _minHeight is the minimum height the inner node should have
|
* @param _minHeight is the minimum height the inner node should have
|
||||||
|
* @memberOf et2_dynheight
|
||||||
*/
|
*/
|
||||||
init: function(_outerNode, _innerNode, _minHeight) {
|
init: function(_outerNode, _innerNode, _minHeight) {
|
||||||
this.outerNode = $j(_outerNode);
|
this.outerNode = $j(_outerNode);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - Class which contains a factory method for rows
|
* EGroupware eTemplate2 - Class which contains a factory method for rows
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -21,11 +21,15 @@
|
|||||||
/**
|
/**
|
||||||
* The row provider contains prototypes (full clonable dom-trees)
|
* The row provider contains prototypes (full clonable dom-trees)
|
||||||
* for all registered row types.
|
* for all registered row types.
|
||||||
|
*
|
||||||
|
* @augments Class
|
||||||
*/
|
*/
|
||||||
var et2_nextmatch_rowProvider = Class.extend({
|
var et2_nextmatch_rowProvider = Class.extend(
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Creates the nextmatch row provider.
|
* Creates the nextmatch row provider.
|
||||||
|
*
|
||||||
|
* @memberOf et2_nextmatch_rowProvider
|
||||||
*/
|
*/
|
||||||
init: function (_rowProvider, _subgridCallback, _context) {
|
init: function (_rowProvider, _subgridCallback, _context) {
|
||||||
// Copy the arguments
|
// Copy the arguments
|
||||||
@ -194,7 +198,7 @@ var et2_nextmatch_rowProvider = Class.extend({
|
|||||||
var placeholder = $j(document.createElement("td"))
|
var placeholder = $j(document.createElement("td"))
|
||||||
.attr("colspan",this._rowProvider.getColumnCount())
|
.attr("colspan",this._rowProvider.getColumnCount())
|
||||||
.css("height","19px")
|
.css("height","19px")
|
||||||
.text(typeof label != "undefined" && label ? label : egw().lang("No matches found"))
|
.text(typeof label != "undefined" && label ? label : egw().lang("No matches found"));
|
||||||
this._rowProvider._prototypes["empty"] = $j(document.createElement("tr"))
|
this._rowProvider._prototypes["empty"] = $j(document.createElement("tr"))
|
||||||
.addClass("egwGridView_empty")
|
.addClass("egwGridView_empty")
|
||||||
.append(placeholder);
|
.append(placeholder);
|
||||||
@ -510,8 +514,18 @@ var et2_nextmatch_rowProvider = Class.extend({
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var et2_nextmatch_rowWidget = et2_widget.extend(et2_IDOMNode, {
|
/**
|
||||||
|
* @augments et2_widget
|
||||||
|
*/
|
||||||
|
var et2_nextmatch_rowWidget = et2_widget.extend(et2_IDOMNode,
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param _mgrs
|
||||||
|
* @param _row
|
||||||
|
* @memberOf et2_nextmatch_rowWidget
|
||||||
|
*/
|
||||||
init: function(_mgrs, _row) {
|
init: function(_mgrs, _row) {
|
||||||
// Call the parent constructor with some dummy attributes
|
// Call the parent constructor with some dummy attributes
|
||||||
this._super(null, {"id": "", "type": "rowWidget"});
|
this._super(null, {"id": "", "type": "rowWidget"});
|
||||||
@ -560,8 +574,18 @@ var et2_nextmatch_rowWidget = et2_widget.extend(et2_IDOMNode, {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var et2_nextmatch_rowTemplateWidget = et2_widget.extend(et2_IDOMNode, {
|
/**
|
||||||
|
* @augments et2_widget
|
||||||
|
*/
|
||||||
|
var et2_nextmatch_rowTemplateWidget = et2_widget.extend(et2_IDOMNode,
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param _root
|
||||||
|
* @param _row
|
||||||
|
* @memberOf et2_nextmatch_rowTemplateWidget
|
||||||
|
*/
|
||||||
init: function(_root, _row) {
|
init: function(_root, _row) {
|
||||||
// Call the parent constructor with some dummy attributes
|
// Call the parent constructor with some dummy attributes
|
||||||
this._super(null, {"id": "", "type": "rowTemplateWidget"});
|
this._super(null, {"id": "", "type": "rowTemplateWidget"});
|
||||||
@ -613,4 +637,3 @@ var et2_nextmatch_rowTemplateWidget = et2_widget.extend(et2_IDOMNode, {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Ajax select / auto complete object
|
|
||||||
|
* EGroupware eTemplate2 - JS Ajax select / auto complete object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -26,9 +27,10 @@
|
|||||||
* n is the maximum number of results set in the user's preferences.
|
* n is the maximum number of results set in the user's preferences.
|
||||||
* The user is restricted to selecting values in the list.
|
* The user is restricted to selecting values in the list.
|
||||||
* This widget can get data from any function that can provide data to a nextmatch widget.
|
* This widget can get data from any function that can provide data to a nextmatch widget.
|
||||||
|
* @augments et2_inputWidget
|
||||||
*/
|
*/
|
||||||
var et2_ajaxSelect = et2_inputWidget.extend({
|
var et2_ajaxSelect = et2_inputWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
'get_rows': {
|
'get_rows': {
|
||||||
"name": "Data source",
|
"name": "Data source",
|
||||||
@ -88,6 +90,11 @@ var et2_ajaxSelect = et2_inputWidget.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_ajaxSelect
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -127,14 +134,14 @@ var et2_ajaxSelect = et2_inputWidget.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_ajaxSelect, ["ajax_select"]);
|
et2_register_widget(et2_ajaxSelect, ["ajax_select"]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* et2_textbox_ro is the dummy readonly implementation of the textbox.
|
* et2_textbox_ro is the dummy readonly implementation of the textbox.
|
||||||
|
* @augments et2_valueWidget
|
||||||
*/
|
*/
|
||||||
var et2_ajaxSelect_ro = et2_valueWidget.extend([et2_IDetachedDOM], {
|
var et2_ajaxSelect_ro = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Ignore all more advanced attributes.
|
* Ignore all more advanced attributes.
|
||||||
*/
|
*/
|
||||||
@ -144,6 +151,11 @@ var et2_ajaxSelect_ro = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_ajaxSelect_ro
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -181,6 +193,5 @@ var et2_ajaxSelect_ro = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_ajaxSelect_ro, ["ajax_select_ro"]);
|
et2_register_widget(et2_ajaxSelect_ro, ["ajax_select_ro"]);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Box object
|
* EGroupware eTemplate2 - JS Box object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -19,9 +19,10 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the hbox and vbox tag
|
* Class which implements the hbox and vbox tag
|
||||||
|
* @augments et2_baseWidget
|
||||||
*/
|
*/
|
||||||
var et2_box = et2_baseWidget.extend([et2_IDetachedDOM], {
|
var et2_box = et2_baseWidget.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
// Not needed
|
// Not needed
|
||||||
"rows": {"ignore": true},
|
"rows": {"ignore": true},
|
||||||
@ -30,6 +31,11 @@ var et2_box = et2_baseWidget.extend([et2_IDetachedDOM], {
|
|||||||
|
|
||||||
createNamespace: true,
|
createNamespace: true,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_box
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -59,6 +65,5 @@ var et2_box = et2_baseWidget.extend([et2_IDetachedDOM], {
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_box, ["vbox", "box"]);
|
et2_register_widget(et2_box, ["vbox", "box"]);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Button object
|
* EGroupware eTemplate2 - JS Button object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -20,9 +20,10 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the "button" XET-Tag
|
* Class which implements the "button" XET-Tag
|
||||||
|
* @augments et2_baseWidget
|
||||||
*/
|
*/
|
||||||
var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], {
|
var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM],
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"label": {
|
"label": {
|
||||||
"name": "caption",
|
"name": "caption",
|
||||||
@ -65,6 +66,11 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], {
|
|||||||
|
|
||||||
legacyOptions: ["image", "ro_image"],
|
legacyOptions: ["image", "ro_image"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_button
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -293,7 +299,7 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], {
|
|||||||
{
|
{
|
||||||
this.options.onclick = _values["onclick"];
|
this.options.onclick = _values["onclick"];
|
||||||
}
|
}
|
||||||
var type = this._type
|
var type = this._type;
|
||||||
var attrs = jQuery.extend(_values, this.options);
|
var attrs = jQuery.extend(_values, this.options);
|
||||||
var parent = this._parent;
|
var parent = this._parent;
|
||||||
jQuery(this.getDOMNode()).bind("click.et2_baseWidget", this, function(e) {
|
jQuery(this.getDOMNode()).bind("click.et2_baseWidget", this, function(e) {
|
||||||
@ -302,9 +308,7 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], {
|
|||||||
e.data.set_id(_values["id"]);
|
e.data.set_id(_values["id"]);
|
||||||
return e.data.click.call(e.data,e);
|
return e.data.click.call(e.data,e);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_button, ["button", "buttononly"]);
|
et2_register_widget(et2_button, ["button", "buttononly"]);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Checkbox object
|
* EGroupware eTemplate2 - JS Checkbox object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -20,9 +20,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the "checkbox" XET-Tag
|
* Class which implements the "checkbox" XET-Tag
|
||||||
|
*
|
||||||
|
* @augments et2_inputWidget
|
||||||
*/
|
*/
|
||||||
var et2_checkbox = et2_inputWidget.extend({
|
var et2_checkbox = et2_inputWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"selected_value": {
|
"selected_value": {
|
||||||
"name": "Set value",
|
"name": "Set value",
|
||||||
@ -56,6 +58,11 @@ var et2_checkbox = et2_inputWidget.extend({
|
|||||||
|
|
||||||
legacyOptions: ["selected_value", "unselected_value", "ro_true", "ro_false"],
|
legacyOptions: ["selected_value", "unselected_value", "ro_true", "ro_false"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_checkbox
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -99,14 +106,14 @@ var et2_checkbox = et2_inputWidget.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_checkbox, ["checkbox"]);
|
et2_register_widget(et2_checkbox, ["checkbox"]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* et2_checkbox_ro is the dummy readonly implementation of the checkbox
|
* et2_checkbox_ro is the dummy readonly implementation of the checkbox
|
||||||
|
* @augments et2_checkbox
|
||||||
*/
|
*/
|
||||||
var et2_checkbox_ro = et2_checkbox.extend({
|
var et2_checkbox_ro = et2_checkbox.extend(
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Ignore unset value
|
* Ignore unset value
|
||||||
*/
|
*/
|
||||||
@ -116,6 +123,11 @@ var et2_checkbox_ro = et2_checkbox.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_checkbox_ro
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -134,7 +146,5 @@ var et2_checkbox_ro = et2_checkbox.extend({
|
|||||||
this.span.text(this.options.ro_false);
|
this.span.text(this.options.ro_false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_checkbox_ro, ["checkbox_ro"]);
|
et2_register_widget(et2_checkbox_ro, ["checkbox_ro"]);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Color picker object
|
* EGroupware eTemplate2 - JS Color picker object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -21,9 +21,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the "colorpicker" XET-Tag
|
* Class which implements the "colorpicker" XET-Tag
|
||||||
|
*
|
||||||
|
* @augments et2_inputWidget
|
||||||
*/
|
*/
|
||||||
var et2_color = et2_inputWidget.extend({
|
var et2_color = et2_inputWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"alphaSupport": {
|
"alphaSupport": {
|
||||||
"name": "Transparancy",
|
"name": "Transparancy",
|
||||||
@ -48,6 +50,11 @@ var et2_color = et2_inputWidget.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_color
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -116,7 +123,7 @@ var et2_color = et2_inputWidget.extend({
|
|||||||
function(color) {
|
function(color) {
|
||||||
jQuery("table.jPicker").dialog("close");
|
jQuery("table.jPicker").dialog("close");
|
||||||
}
|
}
|
||||||
)
|
);
|
||||||
jQuery.jPicker.List[list_id].id = this.id + "_jPicker";
|
jQuery.jPicker.List[list_id].id = this.id + "_jPicker";
|
||||||
|
|
||||||
// Make it look better - plugin defers initialization, so we have to also
|
// Make it look better - plugin defers initialization, so we have to also
|
||||||
@ -183,14 +190,19 @@ var et2_color = et2_inputWidget.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_color, ["colorpicker"]);
|
et2_register_widget(et2_color, ["colorpicker"]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* et2_textbox_ro is the dummy readonly implementation of the textbox.
|
* et2_textbox_ro is the dummy readonly implementation of the textbox.
|
||||||
|
* @augments et2_valueWidget
|
||||||
|
*/
|
||||||
|
var et2_color_ro = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_color_ro
|
||||||
*/
|
*/
|
||||||
var et2_color_ro = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Date object
|
* EGroupware eTemplate2 - JS Date object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -22,9 +22,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the "date" XET-Tag
|
* Class which implements the "date" XET-Tag
|
||||||
|
*
|
||||||
|
* @augments et2_inputWidget
|
||||||
*/
|
*/
|
||||||
var et2_date = et2_inputWidget.extend({
|
var et2_date = et2_inputWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"value": {
|
"value": {
|
||||||
"type": "any"
|
"type": "any"
|
||||||
@ -40,6 +42,11 @@ var et2_date = et2_inputWidget.extend({
|
|||||||
|
|
||||||
legacyOptions: ["data_format"],
|
legacyOptions: ["data_format"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_date
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -47,7 +54,6 @@ var et2_date = et2_inputWidget.extend({
|
|||||||
this.date.setHours(0);
|
this.date.setHours(0);
|
||||||
this.date.setMinutes(0);
|
this.date.setMinutes(0);
|
||||||
this.date.setSeconds(0);
|
this.date.setSeconds(0);
|
||||||
this.date
|
|
||||||
this.input = null;
|
this.input = null;
|
||||||
|
|
||||||
this.createInputWidget();
|
this.createInputWidget();
|
||||||
@ -203,10 +209,13 @@ var et2_date = et2_inputWidget.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_date, ["date", "date-time", "date-timeonly"]);
|
et2_register_widget(et2_date, ["date", "date-time", "date-timeonly"]);
|
||||||
|
|
||||||
var et2_date_duration = et2_date.extend({
|
/**
|
||||||
|
* @augments et2_date
|
||||||
|
*/
|
||||||
|
var et2_date_duration = et2_date.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"data_format": {
|
"data_format": {
|
||||||
"name": "Data format",
|
"name": "Data format",
|
||||||
@ -250,6 +259,11 @@ var et2_date_duration = et2_date.extend({
|
|||||||
|
|
||||||
time_formats: {"d":"d","h":"h","m":"m"},
|
time_formats: {"d":"d","h":"h","m":"m"},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_date_duration
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -448,8 +462,14 @@ var et2_date_duration = et2_date.extend({
|
|||||||
});
|
});
|
||||||
et2_register_widget(et2_date_duration, ["date-duration"]);
|
et2_register_widget(et2_date_duration, ["date-duration"]);
|
||||||
|
|
||||||
|
/**
|
||||||
var et2_date_duration_ro = et2_date_duration.extend([et2_IDetachedDOM],{
|
* @augments et2_date_duration
|
||||||
|
*/
|
||||||
|
var et2_date_duration_ro = et2_date_duration.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @memberOf et2_date_duration_ro
|
||||||
|
*/
|
||||||
createInputWidget: function() {
|
createInputWidget: function() {
|
||||||
|
|
||||||
this.node = $j(document.createElement("span"));
|
this.node = $j(document.createElement("span"));
|
||||||
@ -515,9 +535,10 @@ et2_register_widget(et2_date_duration_ro, ["date-duration_ro"]);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* et2_date_ro is the readonly implementation of some date widget.
|
* et2_date_ro is the readonly implementation of some date widget.
|
||||||
|
* @augments et2_valueWidget
|
||||||
*/
|
*/
|
||||||
var et2_date_ro = et2_valueWidget.extend([et2_IDetachedDOM], {
|
var et2_date_ro = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Ignore all more advanced attributes.
|
* Ignore all more advanced attributes.
|
||||||
*/
|
*/
|
||||||
@ -541,6 +562,11 @@ var et2_date_ro = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
*/
|
*/
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_date_ro
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -630,7 +656,7 @@ var et2_date_ro = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break
|
break;
|
||||||
}
|
}
|
||||||
this.span.attr("datetime", date("Y-m-d H:i:s",this.date)).text(display);
|
this.span.attr("datetime", date("Y-m-d H:i:s",this.date)).text(display);
|
||||||
},
|
},
|
||||||
@ -671,20 +697,25 @@ var et2_date_ro = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
this.span.addClass(_values["class"]);
|
this.span.addClass(_values["class"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_date_ro, ["date_ro", "date-time_ro", "date-since", "date-time_today"]);
|
et2_register_widget(et2_date_ro, ["date_ro", "date-time_ro", "date-since", "date-time_today"]);
|
||||||
|
|
||||||
|
/**
|
||||||
var et2_date_timeonly_ro = et2_date_ro.extend({
|
* @augments et2_date_ro
|
||||||
|
*/
|
||||||
|
var et2_date_timeonly_ro = et2_date_ro.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"value": {
|
"value": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Construtor
|
||||||
|
*
|
||||||
|
* @param _value
|
||||||
|
* @memberOf et2_date_timeonly_ro
|
||||||
|
*/
|
||||||
set_value: function(_value) {
|
set_value: function(_value) {
|
||||||
if(this.egw().preference("timeformat") == "12" && _value.indexOf(":") > 0) {
|
if(this.egw().preference("timeformat") == "12" && _value.indexOf(":") > 0) {
|
||||||
var parts = _value.split(":");
|
var parts = _value.split(":");
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Description object
|
* EGroupware eTemplate2 - JS Description object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -19,9 +19,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the "description" XET-Tag
|
* Class which implements the "description" XET-Tag
|
||||||
|
*
|
||||||
|
* @augments et2_baseWidget
|
||||||
*/
|
*/
|
||||||
var et2_description = et2_baseWidget.extend([et2_IDetachedDOM], {
|
var et2_description = et2_baseWidget.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"value": {
|
"value": {
|
||||||
"name": "Value",
|
"name": "Value",
|
||||||
@ -79,6 +81,11 @@ var et2_description = et2_baseWidget.extend([et2_IDetachedDOM], {
|
|||||||
legacyOptions: ["font_style", "href", "activate_links", "for",
|
legacyOptions: ["font_style", "href", "activate_links", "for",
|
||||||
"extra_link_target", "extra_link_popup", "extra_link_title"],
|
"extra_link_target", "extra_link_popup", "extra_link_title"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_description
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -204,7 +211,5 @@ var et2_description = et2_baseWidget.extend([et2_IDetachedDOM], {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_description, ["description", "label"]);
|
et2_register_widget(et2_description, ["description", "label"]);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Diff object
|
* EGroupware eTemplate2 - JS Diff object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -22,14 +22,22 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class that displays the diff between two [text] values
|
* Class that displays the diff between two [text] values
|
||||||
|
*
|
||||||
|
* @augments et2_valueWidget
|
||||||
*/
|
*/
|
||||||
var et2_diff = et2_valueWidget.extend([et2_IDetachedDOM], {
|
var et2_diff = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"value": {
|
"value": {
|
||||||
"type": "any"
|
"type": "any"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_diff
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
this.mini = true;
|
this.mini = true;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Dropdown Button object
|
* EGroupware eTemplate2 - JS Dropdown Button object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -29,9 +29,11 @@
|
|||||||
*
|
*
|
||||||
* Menu options are passed via the select_options. They are normally ID => Title pairs,
|
* Menu options are passed via the select_options. They are normally ID => Title pairs,
|
||||||
* as for a select box, but the title can also be full HTML if needed.
|
* as for a select box, but the title can also be full HTML if needed.
|
||||||
|
*
|
||||||
|
* @augments et2_inputWidget
|
||||||
*/
|
*/
|
||||||
var et2_dropdown_button = et2_inputWidget.extend({
|
var et2_dropdown_button = et2_inputWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"label": {
|
"label": {
|
||||||
"name": "caption",
|
"name": "caption",
|
||||||
@ -111,6 +113,11 @@ var et2_dropdown_button = et2_inputWidget.extend({
|
|||||||
<li id="opt_1.5"><a href="javascript:void(0);">Option-1.5</a></li>\
|
<li id="opt_1.5"><a href="javascript:void(0);">Option-1.5</a></li>\
|
||||||
</ul>',
|
</ul>',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_dropdown_button
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -179,7 +186,7 @@ var et2_dropdown_button = et2_inputWidget.extend({
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Icon
|
// Icon
|
||||||
this.image = jQuery(document.createElement("img"))
|
this.image = jQuery(document.createElement("img"));
|
||||||
|
|
||||||
this.setDOMNode(this.div[0]);
|
this.setDOMNode(this.div[0]);
|
||||||
},
|
},
|
||||||
@ -361,6 +368,5 @@ var et2_dropdown_button = et2_inputWidget.extend({
|
|||||||
return this.value;
|
return this.value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_dropdown_button, ["dropdown_button"]);
|
et2_register_widget(et2_dropdown_button, ["dropdown_button"]);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Favorite widget
|
* EGroupware eTemplate2 - JS Favorite widget
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -41,9 +41,11 @@
|
|||||||
* Favorites are implemented by saving the values for [column] filters. Filters are stored
|
* Favorites are implemented by saving the values for [column] filters. Filters are stored
|
||||||
* in preferences, with the name favorite_<name>. The favorite favorite used for clicking on
|
* in preferences, with the name favorite_<name>. The favorite favorite used for clicking on
|
||||||
* the filter button is stored in nextmatch-<columnselection_pref>-favorite.
|
* the filter button is stored in nextmatch-<columnselection_pref>-favorite.
|
||||||
|
*
|
||||||
|
* @augments et2_dropdown_button
|
||||||
*/
|
*/
|
||||||
|
var et2_favorites = et2_dropdown_button.extend([et2_INextmatchHeader],
|
||||||
var et2_favorites = et2_dropdown_button.extend([et2_INextmatchHeader],{
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"default_pref": {
|
"default_pref": {
|
||||||
"name": "Default preference key",
|
"name": "Default preference key",
|
||||||
@ -70,7 +72,7 @@ var et2_favorites = et2_dropdown_button.extend([et2_INextmatchHeader],{
|
|||||||
// These are particular to favorites
|
// These are particular to favorites
|
||||||
id: {"default": "favorite"},
|
id: {"default": "favorite"},
|
||||||
label: {"default": ""},
|
label: {"default": ""},
|
||||||
label_updates: { default: false},
|
label_updates: { "default": false},
|
||||||
image: {"default": "etemplate/fav_filter"},
|
image: {"default": "etemplate/fav_filter"},
|
||||||
tooltip: {"default": "Favorite queries", "type": "string"}
|
tooltip: {"default": "Favorite queries", "type": "string"}
|
||||||
},
|
},
|
||||||
@ -83,6 +85,11 @@ var et2_favorites = et2_dropdown_button.extend([et2_INextmatchHeader],{
|
|||||||
// If filter was set server side, we need to remember it until nm is created
|
// If filter was set server side, we need to remember it until nm is created
|
||||||
nm_filter: false,
|
nm_filter: false,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_favorites
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
this.sidebox_target = $j("#"+this.options.sidebox_target);
|
this.sidebox_target = $j("#"+this.options.sidebox_target);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Number object
|
* EGroupware eTemplate2 - JS Number object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -19,9 +19,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements file upload
|
* Class which implements file upload
|
||||||
|
*
|
||||||
|
* @augments et2_inputWidget
|
||||||
*/
|
*/
|
||||||
var et2_file = et2_inputWidget.extend({
|
var et2_file = et2_inputWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"multiple": {
|
"multiple": {
|
||||||
"name": "Multiple files",
|
"name": "Multiple files",
|
||||||
@ -69,8 +71,13 @@ var et2_file = et2_inputWidget.extend({
|
|||||||
|
|
||||||
asyncOptions: {},
|
asyncOptions: {},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_file
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments)
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
this.node = null;
|
this.node = null;
|
||||||
this.input = null;
|
this.input = null;
|
||||||
@ -197,7 +204,7 @@ var et2_file = et2_inputWidget.extend({
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Convert into a js regex
|
// Convert into a js regex
|
||||||
var parts = mime.substr(1).match(/(.*)\/([igm]?)$/)
|
var parts = mime.substr(1).match(/(.*)\/([igm]?)$/);
|
||||||
this.options.mime = new RegExp(parts[1],parts.length > 2 ? parts[2] : "");
|
this.options.mime = new RegExp(parts[1],parts.length > 2 ? parts[2] : "");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Grid object
|
* EGroupware eTemplate2 - JS Grid object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -23,9 +23,11 @@
|
|||||||
*
|
*
|
||||||
* This also includes repeating the last row in the grid and filling
|
* This also includes repeating the last row in the grid and filling
|
||||||
* it with content data
|
* it with content data
|
||||||
|
*
|
||||||
|
* @augments et2_DOMWidget
|
||||||
*/
|
*/
|
||||||
var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned], {
|
var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned],
|
||||||
|
{
|
||||||
createNamespace: true,
|
createNamespace: true,
|
||||||
|
|
||||||
attributes: {
|
attributes: {
|
||||||
@ -46,6 +48,12 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned], {
|
|||||||
"ignore": true
|
"ignore": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_grid
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
// Create the table body and the table
|
// Create the table body and the table
|
||||||
this.tbody = $j(document.createElement("tbody"));
|
this.tbody = $j(document.createElement("tbody"));
|
||||||
@ -351,7 +359,7 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned], {
|
|||||||
"defined for cell (" + x + "," + y + ")!");
|
"defined for cell (" + x + "," + y + ")!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// If the node is a row, create the widgets which belong into
|
// If the node is a row, create the widgets which belong into
|
||||||
// the row
|
// the row
|
||||||
@ -643,20 +651,15 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned], {
|
|||||||
* This doesn't need to be implemented.
|
* This doesn't need to be implemented.
|
||||||
* Individual widgets are detected and handled by the grid, but the interface is needed for this to happen
|
* Individual widgets are detected and handled by the grid, but the interface is needed for this to happen
|
||||||
*/
|
*/
|
||||||
getDetachedAttributes: function(_attrs)
|
getDetachedAttributes: function(_attrs) {
|
||||||
{
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getDetachedNodes: function()
|
getDetachedNodes: function() {
|
||||||
{
|
|
||||||
return [this.getDOMNode()];
|
return [this.getDOMNode()];
|
||||||
},
|
},
|
||||||
|
|
||||||
setDetachedAttributes: function(_nodes, _values)
|
setDetachedAttributes: function(_nodes, _values) {
|
||||||
{
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_grid, ["grid"]);
|
et2_register_widget(et2_grid, ["grid"]);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Groupbox object
|
* EGroupware eTemplate2 - JS Groupbox object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -17,20 +17,30 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the hrule tag
|
* Class which implements the groupbox tag
|
||||||
|
*
|
||||||
|
* @augments et2_baseWidget
|
||||||
|
*/
|
||||||
|
var et2_groupbox = et2_baseWidget.extend(
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_groupbox
|
||||||
*/
|
*/
|
||||||
var et2_groupbox = et2_baseWidget.extend({
|
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
this.setDOMNode(document.createElement("fieldset"));
|
this.setDOMNode(document.createElement("fieldset"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_groupbox, ["groupbox"]);
|
et2_register_widget(et2_groupbox, ["groupbox"]);
|
||||||
|
|
||||||
var et2_groupbox_legend = et2_baseWidget.extend({
|
/**
|
||||||
|
* @augments et2_baseWidget
|
||||||
|
*/
|
||||||
|
var et2_groupbox_legend = et2_baseWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"label": {
|
"label": {
|
||||||
"name": "Label",
|
"name": "Label",
|
||||||
@ -40,6 +50,11 @@ var et2_groupbox_legend = et2_baseWidget.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_groupbox_legend
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Box object
|
* EGroupware eTemplate2 - JS Box object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -19,11 +19,18 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the hbox and vbox tag
|
* Class which implements the hbox and vbox tag
|
||||||
|
*
|
||||||
|
* @augments et2_baseWidget
|
||||||
*/
|
*/
|
||||||
var et2_hbox = et2_baseWidget.extend({
|
var et2_hbox = et2_baseWidget.extend(
|
||||||
|
{
|
||||||
createNamespace: true,
|
createNamespace: true,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_hbox
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -174,6 +181,5 @@ var et2_hbox = et2_baseWidget.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_hbox, ["hbox"]);
|
et2_register_widget(et2_hbox, ["hbox"]);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS History log
|
* EGroupware eTemplate2 - JS History log
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -28,9 +28,11 @@
|
|||||||
*
|
*
|
||||||
* It defers its initialization until the tab that it's on is selected, to avoid
|
* It defers its initialization until the tab that it's on is selected, to avoid
|
||||||
* wasting time if the user never looks at it.
|
* wasting time if the user never looks at it.
|
||||||
|
*
|
||||||
|
* @augments et2_valueWidget
|
||||||
*/
|
*/
|
||||||
|
var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],
|
||||||
var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],{
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"value": {
|
"value": {
|
||||||
"type": "any"
|
"type": "any"
|
||||||
@ -52,6 +54,11 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],{
|
|||||||
|
|
||||||
TIMESTAMP: 0, OWNER: 1, FIELD: 2, NEW_VALUE: 3, OLD_VALUE: 4,
|
TIMESTAMP: 0, OWNER: 1, FIELD: 2, NEW_VALUE: 3, OLD_VALUE: 4,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_historylog
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
this.div = $j(document.createElement("div"))
|
this.div = $j(document.createElement("div"))
|
||||||
@ -431,7 +438,7 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],{
|
|||||||
this.egw().debug("warning", "Crazy diff value", value);
|
this.egw().debug("warning", "Crazy diff value", value);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return columnName == 'note' || columnName == 'description' || (value && (value.length > 50 || value.match(/\n/g)))
|
return columnName == 'note' || columnName == 'description' || (value && (value.length > 50 || value.match(/\n/g)));
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
et2_register_widget(et2_historylog, ['historylog']);
|
et2_register_widget(et2_historylog, ['historylog']);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS HRule object
|
* EGroupware eTemplate2 - JS HRule object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -18,16 +18,21 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the hrule tag
|
* Class which implements the hrule tag
|
||||||
|
*
|
||||||
|
* @augments et2_baseWidget
|
||||||
|
*/
|
||||||
|
var et2_hrule = et2_baseWidget.extend(
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_hrule
|
||||||
*/
|
*/
|
||||||
var et2_hrule = et2_baseWidget.extend({
|
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
this.setDOMNode(document.createElement("hr"));
|
this.setDOMNode(document.createElement("hr"));
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_hrule, ["hrule"]);
|
et2_register_widget(et2_hrule, ["hrule"]);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS widget class containing raw HTML
|
* EGroupware eTemplate2 - JS widget class containing raw HTML
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -18,11 +18,14 @@
|
|||||||
et2_core_baseWidget;
|
et2_core_baseWidget;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var et2_html = et2_valueWidget.extend([et2_IDetachedDOM], {
|
/**
|
||||||
|
* @augments et2_valueWidget
|
||||||
|
*/
|
||||||
|
var et2_html = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
'label': {
|
'label': {
|
||||||
default: "",
|
'default': "",
|
||||||
description: "The label is displayed by default in front (for radiobuttons behind) each widget (if not empty). If you want to specify a different position, use a '%s' in the label, which gets replaced by the widget itself. Eg. '%s Name' to have the label Name behind a checkbox. The label can contain variables, as descript for name. If the label starts with a '@' it is replaced by the value of the content-array at this index (with the '@'-removed and after expanding the variables).",
|
description: "The label is displayed by default in front (for radiobuttons behind) each widget (if not empty). If you want to specify a different position, use a '%s' in the label, which gets replaced by the widget itself. Eg. '%s Name' to have the label Name behind a checkbox. The label can contain variables, as descript for name. If the label starts with a '@' it is replaced by the value of the content-array at this index (with the '@'-removed and after expanding the variables).",
|
||||||
ignore: false,
|
ignore: false,
|
||||||
name: "Label",
|
name: "Label",
|
||||||
@ -33,6 +36,12 @@ var et2_html = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
"ignore": true
|
"ignore": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_html
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -92,7 +101,5 @@ var et2_html = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_html, ["html","htmlarea_ro"]);
|
et2_register_widget(et2_html, ["html","htmlarea_ro"]);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS widget for HTML editing
|
* EGroupware eTemplate2 - JS widget for HTML editing
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -21,8 +21,11 @@
|
|||||||
et2_core_baseWidget;
|
et2_core_baseWidget;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var et2_htmlarea = et2_inputWidget.extend({
|
/**
|
||||||
|
* @augments et2_inputWidget
|
||||||
|
*/
|
||||||
|
var et2_htmlarea = et2_inputWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
'mode': {
|
'mode': {
|
||||||
'name': 'Mode',
|
'name': 'Mode',
|
||||||
@ -60,6 +63,13 @@ var et2_htmlarea = et2_inputWidget.extend({
|
|||||||
|
|
||||||
legacyOptions: ['mode','height','width','expand_toolbar','base_href'],
|
legacyOptions: ['mode','height','width','expand_toolbar','base_href'],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param _parent
|
||||||
|
* @param _attrs
|
||||||
|
* @memberOf et2_htmlarea
|
||||||
|
*/
|
||||||
init: function(_parent, _attrs) {
|
init: function(_parent, _attrs) {
|
||||||
// _super.apply is responsible for the actual setting of the params (some magic)
|
// _super.apply is responsible for the actual setting of the params (some magic)
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
@ -138,7 +148,5 @@ var et2_htmlarea = et2_inputWidget.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_htmlarea, ["htmlarea"]);
|
et2_register_widget(et2_htmlarea, ["htmlarea"]);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS widget class for an iframe
|
* EGroupware eTemplate2 - JS widget class for an iframe
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -16,11 +16,14 @@
|
|||||||
et2_core_valueWidget;
|
et2_core_valueWidget;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var et2_iframe = et2_valueWidget.extend({
|
/**
|
||||||
|
* @augments et2_valueWidget
|
||||||
|
*/
|
||||||
|
var et2_iframe = et2_valueWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
'label': {
|
'label': {
|
||||||
default: "",
|
'default': "",
|
||||||
description: "The label is displayed by default in front (for radiobuttons behind) each widget (if not empty). If you want to specify a different position, use a '%s' in the label, which gets replaced by the widget itself. Eg. '%s Name' to have the label Name behind a checkbox. The label can contain variables, as descript for name. If the label starts with a '@' it is replaced by the value of the content-array at this index (with the '@'-removed and after expanding the variables).",
|
description: "The label is displayed by default in front (for radiobuttons behind) each widget (if not empty). If you want to specify a different position, use a '%s' in the label, which gets replaced by the widget itself. Eg. '%s Name' to have the label Name behind a checkbox. The label can contain variables, as descript for name. If the label starts with a '@' it is replaced by the value of the content-array at this index (with the '@'-removed and after expanding the variables).",
|
||||||
ignore: false,
|
ignore: false,
|
||||||
name: "Label",
|
name: "Label",
|
||||||
@ -32,13 +35,18 @@ var et2_iframe = et2_valueWidget.extend({
|
|||||||
},
|
},
|
||||||
"seamless": {
|
"seamless": {
|
||||||
name: "Seamless",
|
name: "Seamless",
|
||||||
default: true,
|
'default': true,
|
||||||
description: "Specifies that the iframe should be rendered in a manner that makes it appear to be part of the containing document",
|
description: "Specifies that the iframe should be rendered in a manner that makes it appear to be part of the containing document",
|
||||||
translate: false,
|
translate: false,
|
||||||
type: "boolean"
|
type: "boolean"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_iframe
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -59,7 +67,7 @@ var et2_iframe = et2_valueWidget.extend({
|
|||||||
* @param _seamless boolean
|
* @param _seamless boolean
|
||||||
*/
|
*/
|
||||||
set_seamless: function(_seamless) {
|
set_seamless: function(_seamless) {
|
||||||
this.options.seamless = _seamless
|
this.options.seamless = _seamless;
|
||||||
this.htmlNode.attr("seamless", _seamless);
|
this.htmlNode.attr("seamless", _seamless);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -20,9 +20,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the "image" XET-Tag
|
* Class which implements the "image" XET-Tag
|
||||||
|
*
|
||||||
|
* @augments et2_baseWidget
|
||||||
*/
|
*/
|
||||||
var et2_image = et2_baseWidget.extend([et2_IDetachedDOM], {
|
var et2_image = et2_baseWidget.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"src": {
|
"src": {
|
||||||
"name": "Image",
|
"name": "Image",
|
||||||
@ -58,6 +60,11 @@ var et2_image = et2_baseWidget.extend([et2_IDetachedDOM], {
|
|||||||
},
|
},
|
||||||
legacyOptions: ["href", "extra_link_target", "imagemap", "extra_link_popup", "id"],
|
legacyOptions: ["href", "extra_link_target", "imagemap", "extra_link_popup", "id"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_image
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Itempicker object
|
* EGroupware eTemplate2 - JS Itempicker object
|
||||||
* derived from et2_link_entry widget @copyright 2011 Nathan Gray
|
* derived from et2_link_entry widget @copyright 2011 Nathan Gray
|
||||||
*
|
*
|
||||||
* @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
|
||||||
@ -25,9 +25,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the "itempicker" XET-Tag
|
* Class which implements the "itempicker" XET-Tag
|
||||||
|
*
|
||||||
|
* @augments et2_inputWidget
|
||||||
*/
|
*/
|
||||||
var et2_itempicker = et2_inputWidget.extend({
|
var et2_itempicker = et2_inputWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"action": {
|
"action": {
|
||||||
"name": "Action callback",
|
"name": "Action callback",
|
||||||
@ -74,6 +76,11 @@ var et2_itempicker = et2_inputWidget.extend({
|
|||||||
action: null, // Action function for button
|
action: null, // Action function for button
|
||||||
current_app: "", // Remember currently chosen application
|
current_app: "", // Remember currently chosen application
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_itempicker
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Link object
|
* EGroupware eTemplate2 - JS Link object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -24,9 +24,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* UI widgets for Egroupware linking system
|
* UI widgets for Egroupware linking system
|
||||||
|
*
|
||||||
|
* @augments et2_inputWidget
|
||||||
*/
|
*/
|
||||||
var et2_link_to = et2_inputWidget.extend({
|
var et2_link_to = et2_inputWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"only_app": {
|
"only_app": {
|
||||||
"name": "Application",
|
"name": "Application",
|
||||||
@ -73,6 +75,11 @@ var et2_link_to = et2_inputWidget.extend({
|
|||||||
search_timeout: 200, //ms after change to send query
|
search_timeout: 200, //ms after change to send query
|
||||||
minimum_characters: 2, // Don't send query unless there's at least this many chars
|
minimum_characters: 2, // Don't send query unless there's at least this many chars
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_link_to
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -171,7 +178,7 @@ var et2_link_to = et2_inputWidget.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
self, et2_link_list
|
self, et2_link_list
|
||||||
)
|
);
|
||||||
self.egw().window.clearInterval(poll);
|
self.egw().window.clearInterval(poll);
|
||||||
}
|
}
|
||||||
},1000);
|
},1000);
|
||||||
@ -198,7 +205,7 @@ var et2_link_to = et2_inputWidget.extend({
|
|||||||
blur: this.options.search_label ? this.options.search_label : this.egw().lang('Search...'),
|
blur: this.options.search_label ? this.options.search_label : this.egw().lang('Search...'),
|
||||||
query: function() { self.link_button.hide(); self.comment.hide(); return true;},
|
query: function() { self.link_button.hide(); self.comment.hide(); return true;},
|
||||||
select: function() {self.link_button.show(); self.comment.show(); return true;}
|
select: function() {self.link_button.show(); self.comment.show(); return true;}
|
||||||
}
|
};
|
||||||
this.link_entry = et2_createWidget("link-entry", link_entry_attrs,this);
|
this.link_entry = et2_createWidget("link-entry", link_entry_attrs,this);
|
||||||
|
|
||||||
// File upload
|
// File upload
|
||||||
@ -303,7 +310,11 @@ var et2_link_to = et2_inputWidget.extend({
|
|||||||
});
|
});
|
||||||
et2_register_widget(et2_link_to, ["link-to"]);
|
et2_register_widget(et2_link_to, ["link-to"]);
|
||||||
|
|
||||||
var et2_link_apps = et2_selectbox.extend({
|
/**
|
||||||
|
* @augments et2_selectbox
|
||||||
|
*/
|
||||||
|
var et2_link_apps = et2_selectbox.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"only_app": {
|
"only_app": {
|
||||||
"name": "Application",
|
"name": "Application",
|
||||||
@ -319,6 +330,11 @@ var et2_link_apps = et2_selectbox.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_link_apps
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -335,7 +351,7 @@ var et2_link_apps = et2_selectbox.extend({
|
|||||||
if (select_options == null)
|
if (select_options == null)
|
||||||
{
|
{
|
||||||
select_options = this.getArrayMgr('content')
|
select_options = this.getArrayMgr('content')
|
||||||
.getEntry("options-" + this.id)
|
.getEntry("options-" + this.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default to an empty object
|
// Default to an empty object
|
||||||
@ -349,8 +365,11 @@ var et2_link_apps = et2_selectbox.extend({
|
|||||||
});
|
});
|
||||||
et2_register_widget(et2_link_apps, ["link-apps"]);
|
et2_register_widget(et2_link_apps, ["link-apps"]);
|
||||||
|
|
||||||
var et2_link_entry = et2_inputWidget.extend({
|
/**
|
||||||
|
* @augments et2_inputWidget
|
||||||
|
*/
|
||||||
|
var et2_link_entry = et2_inputWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"value": {
|
"value": {
|
||||||
"type": "any",
|
"type": "any",
|
||||||
@ -392,6 +411,11 @@ var et2_link_entry = et2_inputWidget.extend({
|
|||||||
search_timeout: 200, //ms after change to send query
|
search_timeout: 200, //ms after change to send query
|
||||||
minimum_characters: 2, // Don't send query unless there's at least this many chars
|
minimum_characters: 2, // Don't send query unless there's at least this many chars
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_link_entry
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -570,7 +594,7 @@ var et2_link_entry = et2_inputWidget.extend({
|
|||||||
if (_attrs["select_options"] == null)
|
if (_attrs["select_options"] == null)
|
||||||
{
|
{
|
||||||
_attrs["select_options"] = this.getArrayMgr('content')
|
_attrs["select_options"] = this.getArrayMgr('content')
|
||||||
.getEntry("options-" + this.id)
|
.getEntry("options-" + this.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default to an empty object
|
// Default to an empty object
|
||||||
@ -794,8 +818,11 @@ et2_register_widget(et2_link_entry, ["link-entry"]);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* UI widget for a single (read-only) link
|
* UI widget for a single (read-only) link
|
||||||
|
*
|
||||||
|
* @augments et2_valueWidget
|
||||||
*/
|
*/
|
||||||
var et2_link = et2_valueWidget.extend([et2_IDetachedDOM], {
|
var et2_link = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"application": {
|
"application": {
|
||||||
"name": "Application",
|
"name": "Application",
|
||||||
@ -812,6 +839,12 @@ var et2_link = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
legacyOptions: ["application"],
|
legacyOptions: ["application"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_link
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -935,8 +968,11 @@ et2_register_widget(et2_link, ["link", "link-entry_ro"]);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* UI widget for one or more links, comma separated
|
* UI widget for one or more links, comma separated
|
||||||
|
*
|
||||||
|
* @augments et2_valueWidget
|
||||||
*/
|
*/
|
||||||
var et2_link_string = et2_valueWidget.extend([et2_IDetachedDOM], {
|
var et2_link_string = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"application": {
|
"application": {
|
||||||
"name": "Application",
|
"name": "Application",
|
||||||
@ -961,6 +997,12 @@ var et2_link_string = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
"description": "Sub-type key to list only entries of that type"
|
"description": "Sub-type key to list only entries of that type"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_link_string
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -1085,8 +1127,11 @@ et2_register_widget(et2_link_string, ["link-string"]);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* UI widget for one or more links in a list (table)
|
* UI widget for one or more links in a list (table)
|
||||||
|
*
|
||||||
|
* @augments et2_link_string
|
||||||
*/
|
*/
|
||||||
var et2_link_list = et2_link_string.extend({
|
var et2_link_list = et2_link_string.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"show_deleted": {
|
"show_deleted": {
|
||||||
"name": "Show deleted",
|
"name": "Show deleted",
|
||||||
@ -1095,6 +1140,12 @@ var et2_link_list = et2_link_string.extend({
|
|||||||
"description": "Show links that are marked as deleted, being held for purge"
|
"description": "Show links that are marked as deleted, being held for purge"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_link_list
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -1152,7 +1203,7 @@ var et2_link_list = et2_link_string.extend({
|
|||||||
_add_link: function(_link_data) {
|
_add_link: function(_link_data) {
|
||||||
var row = $j(document.createElement("tr"))
|
var row = $j(document.createElement("tr"))
|
||||||
.attr("id", "link_"+_link_data.link_id)
|
.attr("id", "link_"+_link_data.link_id)
|
||||||
.appendTo(this.list)
|
.appendTo(this.list);
|
||||||
|
|
||||||
// Icon
|
// Icon
|
||||||
var icon = $j(document.createElement("td"))
|
var icon = $j(document.createElement("td"))
|
||||||
@ -1200,7 +1251,7 @@ var et2_link_list = et2_link_string.extend({
|
|||||||
|
|
||||||
// Delete
|
// Delete
|
||||||
var delete_button = $j(document.createElement("td"))
|
var delete_button = $j(document.createElement("td"))
|
||||||
.appendTo(row)
|
.appendTo(row);
|
||||||
$j("<div />")
|
$j("<div />")
|
||||||
.appendTo(delete_button)
|
.appendTo(delete_button)
|
||||||
// We don't use ui-icon because it assigns a bg image
|
// We don't use ui-icon because it assigns a bg image
|
||||||
@ -1231,9 +1282,11 @@ et2_register_widget(et2_link_list, ["link-list"]);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* UI widget for one or more links in a list (table)
|
* UI widget for one or more links in a list (table)
|
||||||
|
*
|
||||||
|
* @augments et2_inputWidget
|
||||||
*/
|
*/
|
||||||
var et2_link_add = et2_inputWidget.extend({
|
var et2_link_add = et2_inputWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"application": {
|
"application": {
|
||||||
"name": "Application",
|
"name": "Application",
|
||||||
@ -1242,6 +1295,11 @@ var et2_link_add = et2_inputWidget.extend({
|
|||||||
"description": "Limit to the listed application or applications (comma seperated)"
|
"description": "Limit to the listed application or applications (comma seperated)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_link_add
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Number object
|
* EGroupware eTemplate2 - JS Number object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -18,9 +18,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the "int" and textbox type=float XET-Tags
|
* Class which implements the "int" and textbox type=float XET-Tags
|
||||||
|
*
|
||||||
|
* @augments et2_textbox
|
||||||
*/
|
*/
|
||||||
var et2_number = et2_textbox.extend({
|
var et2_number = et2_textbox.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"value": {
|
"value": {
|
||||||
"type": "float"
|
"type": "float"
|
||||||
@ -51,6 +53,11 @@ var et2_number = et2_textbox.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_number
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
},
|
},
|
||||||
@ -80,14 +87,16 @@ var et2_number = et2_textbox.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_number, ["int", "integer", "float"]);
|
et2_register_widget(et2_number, ["int", "integer", "float"]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend read-only to tell it to ignore special attributes, which
|
* Extend read-only to tell it to ignore special attributes, which
|
||||||
* would cause warnings otherwise
|
* would cause warnings otherwise
|
||||||
|
* @augments et2_textbox_ro
|
||||||
|
* @class
|
||||||
*/
|
*/
|
||||||
var et2_number_ro = et2_textbox_ro.extend({
|
var et2_number_ro = et2_textbox_ro.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"min": {"ignore": true},
|
"min": {"ignore": true},
|
||||||
"max": {"ignore": true},
|
"max": {"ignore": true},
|
||||||
|
@ -18,7 +18,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the "image" XET-Tag
|
* Class which implements the "progress" XET-Tag
|
||||||
|
*
|
||||||
|
* @augments et2_valueWidget
|
||||||
*/
|
*/
|
||||||
var et2_progress = et2_valueWidget.extend([et2_IDetachedDOM],
|
var et2_progress = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||||
{
|
{
|
||||||
@ -54,6 +56,11 @@ var et2_progress = et2_valueWidget.extend([et2_IDetachedDOM],
|
|||||||
},
|
},
|
||||||
legacyOptions: ["href", "extra_link_target", "imagemap", "extra_link_popup", "id"],
|
legacyOptions: ["href", "extra_link_target", "imagemap", "extra_link_popup", "id"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_progress
|
||||||
|
*/
|
||||||
init: function()
|
init: function()
|
||||||
{
|
{
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
@ -131,5 +138,4 @@ var et2_progress = et2_valueWidget.extend([et2_IDetachedDOM],
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_progress, ["progress"]);
|
et2_register_widget(et2_progress, ["progress"]);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Radiobox object
|
* EGroupware eTemplate2 - JS Radiobox object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -19,9 +19,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the "radiobox" XET-Tag
|
* Class which implements the "radiobox" XET-Tag
|
||||||
|
*
|
||||||
|
* @augments et2_inputWidget
|
||||||
*/
|
*/
|
||||||
var et2_radiobox = et2_inputWidget.extend({
|
var et2_radiobox = et2_inputWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"set_value": {
|
"set_value": {
|
||||||
"name": "Set value",
|
"name": "Set value",
|
||||||
@ -45,6 +47,11 @@ var et2_radiobox = et2_inputWidget.extend({
|
|||||||
|
|
||||||
legacyOptions: ["set_value", "ro_true", "ro_false"],
|
legacyOptions: ["set_value", "ro_true", "ro_false"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_radiobox
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -94,11 +101,13 @@ var et2_radiobox = et2_inputWidget.extend({
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_radiobox, ["radio"]);
|
et2_register_widget(et2_radiobox, ["radio"]);
|
||||||
|
|
||||||
var et2_radiobox_ro = et2_valueWidget.extend([et2_IDetachedDOM], {
|
/**
|
||||||
|
* @augments et2_valueWidget
|
||||||
|
*/
|
||||||
|
var et2_radiobox_ro = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"set_value": {
|
"set_value": {
|
||||||
"name": "Set value",
|
"name": "Set value",
|
||||||
@ -124,6 +133,12 @@ var et2_radiobox_ro = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_radiobox_ro
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -165,15 +180,16 @@ var et2_radiobox_ro = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
this.set_value(_values["value"]);
|
this.set_value(_values["value"]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_radiobox_ro, ["radio_ro"]);
|
et2_register_widget(et2_radiobox_ro, ["radio_ro"]);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A group of radio buttons
|
* A group of radio buttons
|
||||||
|
*
|
||||||
|
* @augments et2_box
|
||||||
*/
|
*/
|
||||||
var et2_radioGroup = et2_box.extend({
|
var et2_radioGroup = et2_box.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"value": {
|
"value": {
|
||||||
"name": "Value",
|
"name": "Value",
|
||||||
@ -203,6 +219,13 @@ var et2_radioGroup = et2_box.extend({
|
|||||||
|
|
||||||
createNamespace: false,
|
createNamespace: false,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param parent
|
||||||
|
* @param attrs
|
||||||
|
* @memberOf et2_radioGroup
|
||||||
|
*/
|
||||||
init: function(parent, attrs) {
|
init: function(parent, attrs) {
|
||||||
attrs.type = "vbox";
|
attrs.type = "vbox";
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
@ -232,7 +255,7 @@ var et2_radioGroup = et2_box.extend({
|
|||||||
ro_true: this.options.ro_true,
|
ro_true: this.options.ro_true,
|
||||||
ro_false: this.options.ro_false,
|
ro_false: this.options.ro_false,
|
||||||
readonly: this.options.readonly
|
readonly: this.options.readonly
|
||||||
}
|
};
|
||||||
var radio = et2_createWidget("radio", attrs, this);
|
var radio = et2_createWidget("radio", attrs, this);
|
||||||
// radio.set_name(this.id);
|
// radio.set_name(this.id);
|
||||||
}
|
}
|
||||||
|
@ -29,9 +29,11 @@
|
|||||||
* - 'popup' => No selectbox, just search. No popup, the search replaces the selectbox
|
* - 'popup' => No selectbox, just search. No popup, the search replaces the selectbox
|
||||||
*
|
*
|
||||||
* Only primary_group and popup need anything different from a normal selectbox
|
* Only primary_group and popup need anything different from a normal selectbox
|
||||||
|
*
|
||||||
|
* @augments et2_selectbox
|
||||||
*/
|
*/
|
||||||
var et2_selectAccount = et2_selectbox.extend({
|
var et2_selectAccount = et2_selectbox.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
'account_type': {
|
'account_type': {
|
||||||
'name': 'Account type',
|
'name': 'Account type',
|
||||||
@ -45,15 +47,23 @@ var et2_selectAccount = et2_selectbox.extend({
|
|||||||
|
|
||||||
account_types: ['accounts','groups','both','owngroups'],
|
account_types: ['accounts','groups','both','owngroups'],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param _parent
|
||||||
|
* @param _attrs
|
||||||
|
* @memberOf et2_selectAccount
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
init: function(_parent, _attrs) {
|
init: function(_parent, _attrs) {
|
||||||
|
|
||||||
// Type in rows or somewhere else?
|
// Type in rows or somewhere else?
|
||||||
if(jQuery.inArray(_attrs['empty_label'], this.account_types) > 0 && (
|
if(jQuery.inArray(_attrs['empty_label'], this.account_types) > 0 && (
|
||||||
jQuery.inArray(_attrs['account_type'], this.account_types) < 0 ||
|
jQuery.inArray(_attrs['account_type'], this.account_types) < 0 ||
|
||||||
_attrs['account_type'] == this.attributes.account_type.default)
|
_attrs['account_type'] == this.attributes.account_type['default'])
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_attrs['account_type'] = _attrs['empty_label']
|
_attrs['account_type'] = _attrs['empty_label'];
|
||||||
_attrs['empty_label'] = '';
|
_attrs['empty_label'] = '';
|
||||||
}
|
}
|
||||||
if(jQuery.inArray(_attrs['account_type'], this.account_types) < 0)
|
if(jQuery.inArray(_attrs['account_type'], this.account_types) < 0)
|
||||||
@ -89,7 +99,7 @@ var et2_selectAccount = et2_selectbox.extend({
|
|||||||
var button = jQuery(document.createElement("span"))
|
var button = jQuery(document.createElement("span"))
|
||||||
.addClass("et2_clickable")
|
.addClass("et2_clickable")
|
||||||
.click(this, this._open_search)
|
.click(this, this._open_search)
|
||||||
.append('<span class="ui-icon ui-icon-search" style="display:inline-block"/>')
|
.append('<span class="ui-icon ui-icon-search" style="display:inline-block"/>');
|
||||||
|
|
||||||
this.getSurroundings().insertDOMNode(button[0]);
|
this.getSurroundings().insertDOMNode(button[0]);
|
||||||
}
|
}
|
||||||
@ -109,7 +119,7 @@ var et2_selectAccount = et2_selectbox.extend({
|
|||||||
this.set_value = function(_value) {
|
this.set_value = function(_value) {
|
||||||
this.value = _value;
|
this.value = _value;
|
||||||
this.search_widget.set_value(_value);
|
this.search_widget.set_value(_value);
|
||||||
}
|
};
|
||||||
this.search_widget.search.change(this, function(event) {
|
this.search_widget.search.change(this, function(event) {
|
||||||
var value = event.data.search_widget.getValue();
|
var value = event.data.search_widget.getValue();
|
||||||
event.data.value = typeof value == 'object' && value ? value.id : value;
|
event.data.value = typeof value == 'object' && value ? value.id : value;
|
||||||
@ -350,7 +360,7 @@ var et2_selectAccount = et2_selectbox.extend({
|
|||||||
jQuery.each(items, function (index, item) {
|
jQuery.each(items, function (index, item) {
|
||||||
self._add_search_result(results, item);
|
self._add_search_result(results, item);
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
return search;
|
return search;
|
||||||
},
|
},
|
||||||
@ -447,10 +457,10 @@ var et2_selectAccount = et2_selectbox.extend({
|
|||||||
.addClass("loading")
|
.addClass("loading")
|
||||||
.appendTo(node);
|
.appendTo(node);
|
||||||
this.egw().link_title('home-accounts', item.value, function(name) {
|
this.egw().link_title('home-accounts', item.value, function(name) {
|
||||||
label.text(name).removeClass("loading")
|
label.text(name).removeClass("loading");
|
||||||
}, label);
|
}, label);
|
||||||
|
|
||||||
node.appendTo(list)
|
node.appendTo(list);
|
||||||
},
|
},
|
||||||
|
|
||||||
_create_selected: function() {
|
_create_selected: function() {
|
||||||
@ -518,19 +528,20 @@ var et2_selectAccount = et2_selectbox.extend({
|
|||||||
var label = jQuery(document.createElement('label'))
|
var label = jQuery(document.createElement('label'))
|
||||||
.addClass("loading")
|
.addClass("loading")
|
||||||
.appendTo(option);
|
.appendTo(option);
|
||||||
this.egw().link_title('home-accounts', value, function(name) {this.text(name).removeClass("loading")}, label);
|
this.egw().link_title('home-accounts', value, function(name) {this.text(name).removeClass("loading");}, label);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
et2_register_widget(et2_selectAccount, ["select-account"]);
|
et2_register_widget(et2_selectAccount, ["select-account"]);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* et2_selectAccount_ro is the readonly implementation of select account
|
* et2_selectAccount_ro is the readonly implementation of select account
|
||||||
* It extends et2_link to avoid needing the whole user list on the client.
|
* It extends et2_link to avoid needing the whole user list on the client.
|
||||||
* Instead, it just asks for the names of the ones needed, as needed.
|
* Instead, it just asks for the names of the ones needed, as needed.
|
||||||
|
*
|
||||||
|
* @augments et2_link_string
|
||||||
*/
|
*/
|
||||||
var et2_selectAccount_ro = et2_link_string.extend([et2_IDetachedDOM], {
|
var et2_selectAccount_ro = et2_link_string.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"empty_label": {
|
"empty_label": {
|
||||||
"name": "Empty label",
|
"name": "Empty label",
|
||||||
@ -542,6 +553,13 @@ var et2_selectAccount_ro = et2_link_string.extend([et2_IDetachedDOM], {
|
|||||||
|
|
||||||
legacyOptions: ["empty_label"],
|
legacyOptions: ["empty_label"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param _parent
|
||||||
|
* @param options
|
||||||
|
* @memberOf et2_selectAccount_ro
|
||||||
|
*/
|
||||||
init: function(_parent, options) {
|
init: function(_parent, options) {
|
||||||
/**
|
/**
|
||||||
Resolve some circular dependency problems here
|
Resolve some circular dependency problems here
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Selectbox object
|
* EGroupware eTemplate2 - JS Selectbox object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -21,8 +21,11 @@
|
|||||||
et2_core_inputWidget;
|
et2_core_inputWidget;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var et2_selectbox = et2_inputWidget.extend({
|
/**
|
||||||
|
* @augments et2_inputWidget
|
||||||
|
*/
|
||||||
|
var et2_selectbox = et2_inputWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"multiple": {
|
"multiple": {
|
||||||
"name": "multiple",
|
"name": "multiple",
|
||||||
@ -82,6 +85,11 @@ var et2_selectbox = et2_inputWidget.extend({
|
|||||||
|
|
||||||
legacyOptions: ["rows","other"], // Other is sub-type specific
|
legacyOptions: ["rows","other"], // Other is sub-type specific
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construtor
|
||||||
|
*
|
||||||
|
* @memberOf et2_selectbox
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -210,7 +218,7 @@ var et2_selectbox = et2_inputWidget.extend({
|
|||||||
var content_options = this.getArrayMgr('content').getRoot().getEntry(name_parts[name_parts.length-1]);
|
var content_options = this.getArrayMgr('content').getRoot().getEntry(name_parts[name_parts.length-1]);
|
||||||
// If that didn't work, check according to ID
|
// If that didn't work, check according to ID
|
||||||
_attrs["select_options"] = content_options ? content_options : this.getArrayMgr('content')
|
_attrs["select_options"] = content_options ? content_options : this.getArrayMgr('content')
|
||||||
.getEntry("options-" + this.id)
|
.getEntry("options-" + this.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default to an empty object
|
// Default to an empty object
|
||||||
@ -270,8 +278,8 @@ var et2_selectbox = et2_inputWidget.extend({
|
|||||||
var label = jQuery(document.createElement("label"))
|
var label = jQuery(document.createElement("label"))
|
||||||
.attr("for", opt_id)
|
.attr("for", opt_id)
|
||||||
.hover(
|
.hover(
|
||||||
function() {jQuery(this).addClass("ui-state-hover")},
|
function() {jQuery(this).addClass("ui-state-hover");},
|
||||||
function() {jQuery(this).removeClass("ui-state-hover")}
|
function() {jQuery(this).removeClass("ui-state-hover");}
|
||||||
);
|
);
|
||||||
var option = jQuery(document.createElement("input"))
|
var option = jQuery(document.createElement("input"))
|
||||||
.attr("type", "checkbox")
|
.attr("type", "checkbox")
|
||||||
@ -298,7 +306,7 @@ var et2_selectbox = et2_inputWidget.extend({
|
|||||||
label.css("background-color",option_data.color);
|
label.css("background-color",option_data.color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
label.append(jQuery("<span>"+_label+"</span>"))
|
label.append(jQuery("<span>"+_label+"</span>"));
|
||||||
var li = jQuery(document.createElement("li")).append(label);
|
var li = jQuery(document.createElement("li")).append(label);
|
||||||
|
|
||||||
li.appendTo(this.multiOptions);
|
li.appendTo(this.multiOptions);
|
||||||
@ -375,7 +383,7 @@ var et2_selectbox = et2_inputWidget.extend({
|
|||||||
jQuery("input",e.data).attr("checked", false);
|
jQuery("input",e.data).attr("checked", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
for(var key in header_controls)
|
for(var key in header_controls)
|
||||||
{
|
{
|
||||||
jQuery(document.createElement("li"))
|
jQuery(document.createElement("li"))
|
||||||
@ -596,7 +604,6 @@ var et2_selectbox = et2_inputWidget.extend({
|
|||||||
return this.value;
|
return this.value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_selectbox, ["menupopup", "listbox", "select", "select-cat",
|
et2_register_widget(et2_selectbox, ["menupopup", "listbox", "select", "select-cat",
|
||||||
"select-percent", 'select-priority', 'select-access',
|
"select-percent", 'select-priority', 'select-access',
|
||||||
'select-country', 'select-state', 'select-year', 'select-month',
|
'select-country', 'select-state', 'select-year', 'select-month',
|
||||||
@ -605,9 +612,16 @@ et2_register_widget(et2_selectbox, ["menupopup", "listbox", "select", "select-ca
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* et2_selectbox_ro is the readonly implementation of the selectbox.
|
* et2_selectbox_ro is the readonly implementation of the selectbox.
|
||||||
|
*
|
||||||
|
* @augments et2_selectbox
|
||||||
|
*/
|
||||||
|
var et2_selectbox_ro = et2_selectbox.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_selectbox_ro
|
||||||
*/
|
*/
|
||||||
var et2_selectbox_ro = et2_selectbox.extend([et2_IDetachedDOM], {
|
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -641,7 +655,7 @@ var et2_selectbox_ro = et2_selectbox.extend([et2_IDetachedDOM], {
|
|||||||
{
|
{
|
||||||
"label": options[i].textContent,
|
"label": options[i].textContent,
|
||||||
"title": et2_readAttrWithDefault(options[i], "title", "")
|
"title": et2_readAttrWithDefault(options[i], "title", "")
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -738,7 +752,6 @@ var et2_selectbox_ro = et2_selectbox.extend([et2_IDetachedDOM], {
|
|||||||
this.set_value(_values["value"]);
|
this.set_value(_values["value"]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_selectbox_ro, ["menupopup_ro", "listbox_ro", "select_ro", "select-cat_ro",
|
et2_register_widget(et2_selectbox_ro, ["menupopup_ro", "listbox_ro", "select_ro", "select-cat_ro",
|
||||||
"select-percent_ro", 'select-priority_ro', 'select-access_ro',
|
"select-percent_ro", 'select-priority_ro', 'select-access_ro',
|
||||||
'select-country_ro', 'select-state_ro', 'select-year_ro', 'select-month_ro',
|
'select-country_ro', 'select-state_ro', 'select-year_ro', 'select-month_ro',
|
||||||
@ -814,9 +827,16 @@ et2_register_widget(et2_selectbox_ro, ["menupopup_ro", "listbox_ro", "select_ro"
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which just implements the menulist container
|
* Class which just implements the menulist container
|
||||||
|
*
|
||||||
|
* @augments et2_DOMWidget
|
||||||
|
*/
|
||||||
|
var et2_menulist = et2_DOMWidget.extend(
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Construtor
|
||||||
|
*
|
||||||
|
* @memberOf et2_menulist
|
||||||
*/
|
*/
|
||||||
var et2_menulist = et2_DOMWidget.extend({
|
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -839,7 +859,5 @@ var et2_menulist = et2_DOMWidget.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_menulist, ["menulist"]);
|
et2_register_widget(et2_menulist, ["menulist"]);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - Split panel
|
* EGroupware eTemplate2 - Split panel
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -26,9 +26,10 @@
|
|||||||
* turn on double-click docking to minimize one of the children.
|
* turn on double-click docking to minimize one of the children.
|
||||||
*
|
*
|
||||||
* @see http://methvin.com/splitter/ Uses Splitter
|
* @see http://methvin.com/splitter/ Uses Splitter
|
||||||
|
* @augments et2_DOMWidget
|
||||||
*/
|
*/
|
||||||
var et2_split = et2_DOMWidget.extend([et2_IResizeable], {
|
var et2_split = et2_DOMWidget.extend([et2_IResizeable],
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"orientation": {
|
"orientation": {
|
||||||
"name": "Orientation",
|
"name": "Orientation",
|
||||||
@ -58,6 +59,11 @@ var et2_split = et2_DOMWidget.extend([et2_IResizeable], {
|
|||||||
"cols": {"ignore": true}
|
"cols": {"ignore": true}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_split
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS widget class containing styles
|
* EGroupware eTemplate2 - JS widget class containing styles
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -23,9 +23,16 @@
|
|||||||
* TODO: The style data could be parsed for rules and appended using the JS
|
* TODO: The style data could be parsed for rules and appended using the JS
|
||||||
* stylesheet interface, allowing the style only to modifiy nodes of the current
|
* stylesheet interface, allowing the style only to modifiy nodes of the current
|
||||||
* template.
|
* template.
|
||||||
|
*
|
||||||
|
* @augments et2_widget
|
||||||
|
*/
|
||||||
|
var et2_styles = et2_widget.extend(
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_styles
|
||||||
*/
|
*/
|
||||||
var et2_styles = et2_widget.extend({
|
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -60,6 +67,5 @@ var et2_styles = et2_widget.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_styles, ["styles"]);
|
et2_register_widget(et2_styles, ["styles"]);
|
||||||
|
|
||||||
|
@ -20,9 +20,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the tabbox-tag
|
* Class which implements the tabbox-tag
|
||||||
|
*
|
||||||
|
* @augments et2_DOMWidget
|
||||||
*/
|
*/
|
||||||
var et2_tabbox = et2_DOMWidget.extend({
|
var et2_tabbox = et2_DOMWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
'tabs': {
|
'tabs': {
|
||||||
'name': 'Tabs',
|
'name': 'Tabs',
|
||||||
@ -35,6 +37,12 @@ var et2_tabbox = et2_DOMWidget.extend({
|
|||||||
* Currently selected tab
|
* Currently selected tab
|
||||||
*/
|
*/
|
||||||
selected_index: 0,
|
selected_index: 0,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construtor
|
||||||
|
*
|
||||||
|
* @memberOf et2_tabbox
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
// Create the outer tabbox container
|
// Create the outer tabbox container
|
||||||
this.container = $j(document.createElement("div"))
|
this.container = $j(document.createElement("div"))
|
||||||
@ -176,7 +184,7 @@ var et2_tabbox = et2_DOMWidget.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create the tab DOM-Nodes
|
// Create the tab DOM-Nodes
|
||||||
this.createTabs(tabData)
|
this.createTabs(tabData);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -270,5 +278,4 @@ var et2_tabbox = et2_DOMWidget.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_tabbox, ["tabbox"]);
|
et2_register_widget(et2_tabbox, ["tabbox"]);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Template base class
|
* EGroupware eTemplate2 - JS Template base class
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -24,9 +24,11 @@
|
|||||||
* inserted in place of this template.
|
* inserted in place of this template.
|
||||||
*
|
*
|
||||||
* TODO: Check whether this widget behaves as it should.
|
* TODO: Check whether this widget behaves as it should.
|
||||||
|
*
|
||||||
|
* @augments et2_DOMWidget
|
||||||
*/
|
*/
|
||||||
var et2_template = et2_DOMWidget.extend({
|
var et2_template = et2_DOMWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"template": {
|
"template": {
|
||||||
"name": "Template",
|
"name": "Template",
|
||||||
@ -60,6 +62,8 @@ var et2_template = et2_DOMWidget.extend({
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes this template widget as a simple container.
|
* Initializes this template widget as a simple container.
|
||||||
|
*
|
||||||
|
* @memberOf et2_template
|
||||||
*/
|
*/
|
||||||
init: function(_parent, _attrs) {
|
init: function(_parent, _attrs) {
|
||||||
// Set this early, so it's available for creating namespace
|
// Set this early, so it's available for creating namespace
|
||||||
@ -156,7 +160,5 @@ var et2_template = et2_DOMWidget.extend({
|
|||||||
return this.div;
|
return this.div;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_template, ["template"]);
|
et2_register_widget(et2_template, ["template"]);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS Textbox object
|
* EGroupware eTemplate2 - JS Textbox object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -20,9 +20,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the "textbox" XET-Tag
|
* Class which implements the "textbox" XET-Tag
|
||||||
|
*
|
||||||
|
* @augments et2_inputWidget
|
||||||
*/
|
*/
|
||||||
var et2_textbox = et2_inputWidget.extend({
|
var et2_textbox = et2_inputWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"multiline": {
|
"multiline": {
|
||||||
"name": "multiline",
|
"name": "multiline",
|
||||||
@ -65,6 +67,11 @@ var et2_textbox = et2_inputWidget.extend({
|
|||||||
|
|
||||||
legacyOptions: ["size", "maxlength"],
|
legacyOptions: ["size", "maxlength"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_textbox
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -170,14 +177,15 @@ var et2_textbox = et2_inputWidget.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_textbox, ["textbox", "passwd"]);
|
et2_register_widget(et2_textbox, ["textbox", "passwd"]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* et2_textbox_ro is the dummy readonly implementation of the textbox.
|
* et2_textbox_ro is the dummy readonly implementation of the textbox.
|
||||||
|
*
|
||||||
|
* @augments et2_valueWidget
|
||||||
*/
|
*/
|
||||||
var et2_textbox_ro = et2_valueWidget.extend([et2_IDetachedDOM], {
|
var et2_textbox_ro = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Ignore all more advanced attributes.
|
* Ignore all more advanced attributes.
|
||||||
*/
|
*/
|
||||||
@ -205,6 +213,11 @@ var et2_textbox_ro = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_textbox_ro
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -243,6 +256,5 @@ var et2_textbox_ro = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_textbox_ro, ["textbox_ro"]);
|
et2_register_widget(et2_textbox_ro, ["textbox_ro"]);
|
||||||
|
|
||||||
|
@ -24,8 +24,13 @@
|
|||||||
// /phpgwapi/js/dhtmlxtree/dhtmlxTree/sources/ext/dhtmlxtree_start.js;
|
// /phpgwapi/js/dhtmlxtree/dhtmlxTree/sources/ext/dhtmlxtree_start.js;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var et2_tree = et2_inputWidget.extend({
|
/**
|
||||||
|
* Tree widget
|
||||||
|
*
|
||||||
|
* @augments et2_inputWidget
|
||||||
|
*/
|
||||||
|
var et2_tree = et2_inputWidget.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"multiple": {
|
"multiple": {
|
||||||
"name": "multiple",
|
"name": "multiple",
|
||||||
@ -82,6 +87,11 @@ var et2_tree = et2_inputWidget.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_tree
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -138,7 +148,7 @@ var et2_tree = et2_inputWidget.extend({
|
|||||||
var content_options = this.getArrayMgr('content').getRoot().getEntry(name_parts[name_parts.length-1]);
|
var content_options = this.getArrayMgr('content').getRoot().getEntry(name_parts[name_parts.length-1]);
|
||||||
// If that didn't work, check according to ID
|
// If that didn't work, check according to ID
|
||||||
_attrs["select_options"] = content_options ? content_options : this.getArrayMgr('content')
|
_attrs["select_options"] = content_options ? content_options : this.getArrayMgr('content')
|
||||||
.getEntry("options-" + this.id)
|
.getEntry("options-" + this.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default to an empty object
|
// Default to an empty object
|
||||||
@ -251,7 +261,7 @@ var et2_tree = et2_inputWidget.extend({
|
|||||||
f(data.item[j],f);
|
f(data.item[j],f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
f(data,f);
|
f(data,f);
|
||||||
options = data;
|
options = data;
|
||||||
}
|
}
|
||||||
@ -428,15 +438,15 @@ var et2_tree = et2_inputWidget.extend({
|
|||||||
var rv;
|
var rv;
|
||||||
var returnValue = [_nodeID];
|
var returnValue = [_nodeID];
|
||||||
var modetorun = "none";
|
var modetorun = "none";
|
||||||
if (mode) { modetorun = mode }
|
if (mode) { modetorun = mode; }
|
||||||
PoS = this.input.getOpenState(_nodeID)
|
PoS = this.input.getOpenState(_nodeID);
|
||||||
if (modetorun == "forced") PoS = 1;
|
if (modetorun == "forced") PoS = 1;
|
||||||
if (PoS == 1) {
|
if (PoS == 1) {
|
||||||
for(var i=0;i<z.length;i++) {
|
for(var i=0;i<z.length;i++) {
|
||||||
oS = this.input.getOpenState(z[i])
|
oS = this.input.getOpenState(z[i]);
|
||||||
//alert(z[i]+' OpenState:'+oS);
|
//alert(z[i]+' OpenState:'+oS);
|
||||||
if (oS == -1) { returnValue.push(z[i]) }
|
if (oS == -1) { returnValue.push(z[i]); }
|
||||||
if (oS == 0) { returnValue.push(z[i]) }
|
if (oS == 0) { returnValue.push(z[i]); }
|
||||||
if (oS == 1) {
|
if (oS == 1) {
|
||||||
//alert("got here")
|
//alert("got here")
|
||||||
rv = this.getTreeNodeOpenItems(z[i]);
|
rv = this.getTreeNodeOpenItems(z[i]);
|
||||||
@ -446,7 +456,7 @@ var et2_tree = et2_inputWidget.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//alert(returnValue.join('#,#'));
|
//alert(returnValue.join('#,#'));
|
||||||
return returnValue
|
return returnValue;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
et2_register_widget(et2_tree, ["tree","tree-cat"]);
|
et2_register_widget(et2_tree, ["tree","tree-cat"]);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS URL object
|
* EGroupware eTemplate2 - JS URL object
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -20,15 +20,20 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the "url" XET-Tag, which covers URLs, email & phone
|
* Class which implements the "url" XET-Tag, which covers URLs, email & phone
|
||||||
|
*
|
||||||
|
* @augments et2_textbox
|
||||||
*/
|
*/
|
||||||
var et2_url = et2_textbox.extend({
|
var et2_url = et2_textbox.extend(
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"multiline": {
|
"multiline": {
|
||||||
"ignore": true
|
"ignore": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @memberOf et2_url
|
||||||
|
*/
|
||||||
createInputWidget: function() {
|
createInputWidget: function() {
|
||||||
this.input = $j(document.createElement("input"))
|
this.input = $j(document.createElement("input"))
|
||||||
.blur(this,this.validate)
|
.blur(this,this.validate)
|
||||||
@ -191,15 +196,21 @@ var et2_url = et2_textbox.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_url, ["url", "url-email", "url-phone"]);
|
et2_register_widget(et2_url, ["url", "url-email", "url-phone"]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* et2_url_ro is the readonly implementation of the url, email & phone.
|
* et2_url_ro is the readonly implementation of the url, email & phone.
|
||||||
* It renders things as links, when possible
|
* It renders things as links, when possible
|
||||||
|
*
|
||||||
|
* @augments et2_valueWidget
|
||||||
|
*/
|
||||||
|
var et2_url_ro = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_url_ro
|
||||||
*/
|
*/
|
||||||
var et2_url_ro = et2_valueWidget.extend([et2_IDetachedDOM],{
|
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -284,6 +295,5 @@ var et2_url_ro = et2_valueWidget.extend([et2_IDetachedDOM],{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_url_ro, ["url_ro", "url-email_ro", "url-phone_ro"]);
|
et2_register_widget(et2_url_ro, ["url_ro", "url-email_ro", "url-phone_ro"]);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare eTemplate2 - JS VFS widgets
|
* EGroupware eTemplate2 - JS VFS widgets
|
||||||
*
|
*
|
||||||
* @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 etemplate
|
* @package etemplate
|
||||||
@ -22,9 +22,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the "vfs" XET-Tag
|
* Class which implements the "vfs" XET-Tag
|
||||||
|
*
|
||||||
|
* @augments et2_valueWidget
|
||||||
*/
|
*/
|
||||||
var et2_vfs = et2_valueWidget.extend([et2_IDetachedDOM], {
|
var et2_vfs = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"value": {
|
"value": {
|
||||||
"type": "any", // Object
|
"type": "any", // Object
|
||||||
@ -37,6 +39,11 @@ var et2_vfs = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
*/
|
*/
|
||||||
DIR_MIME_TYPE: 'httpd/unix-directory',
|
DIR_MIME_TYPE: 'httpd/unix-directory',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_vfs
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@ -147,8 +154,16 @@ et2_register_widget(et2_vfs, ["vfs"]);
|
|||||||
/**
|
/**
|
||||||
* vfs-name
|
* vfs-name
|
||||||
* filename automatically urlencoded on return (urldecoded on display to user)
|
* filename automatically urlencoded on return (urldecoded on display to user)
|
||||||
|
*
|
||||||
|
* @augments et2_textbox
|
||||||
|
*/
|
||||||
|
var et2_vfsName = et2_textbox.extend(
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_vfsName
|
||||||
*/
|
*/
|
||||||
var et2_vfsName = et2_textbox.extend({
|
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
this.input.addClass("et2_vfs");
|
this.input.addClass("et2_vfs");
|
||||||
@ -170,8 +185,16 @@ et2_register_widget(et2_vfsName, ["vfs-name"]);
|
|||||||
/**
|
/**
|
||||||
* vfs-name
|
* vfs-name
|
||||||
* filename automatically urlencoded on return (urldecoded on display to user)
|
* filename automatically urlencoded on return (urldecoded on display to user)
|
||||||
|
*
|
||||||
|
* @augments et2_textbox_ro
|
||||||
|
*/
|
||||||
|
var et2_vfsName_ro = et2_textbox_ro.extend(
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_vfsName_ro
|
||||||
*/
|
*/
|
||||||
var et2_vfsName_ro = et2_textbox_ro.extend({
|
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
},
|
},
|
||||||
@ -192,8 +215,11 @@ et2_register_widget(et2_vfsName_ro, ["vfs-name_ro"]);
|
|||||||
/**
|
/**
|
||||||
* vfs-mime
|
* vfs-mime
|
||||||
* Icon for mimetype of file, or thumbnail
|
* Icon for mimetype of file, or thumbnail
|
||||||
|
*
|
||||||
|
* @augments et2_valueWidget
|
||||||
*/
|
*/
|
||||||
var et2_vfsMime = et2_valueWidget.extend([et2_IDetachedDOM], {
|
var et2_vfsMime = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||||
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"value": {
|
"value": {
|
||||||
"type": "any", // Object
|
"type": "any", // Object
|
||||||
@ -208,6 +234,11 @@ var et2_vfsMime = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
|
|
||||||
legacyOptions:["size"],
|
legacyOptions:["size"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_vfsMime
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
this.image = jQuery(document.createElement("img"));
|
this.image = jQuery(document.createElement("img"));
|
||||||
@ -261,6 +292,8 @@ et2_register_widget(et2_vfsMime, ["vfs-mime"]);
|
|||||||
/**
|
/**
|
||||||
* vfs-size
|
* vfs-size
|
||||||
* Human readable file sizes
|
* Human readable file sizes
|
||||||
|
*
|
||||||
|
* @augments et2_description
|
||||||
*/
|
*/
|
||||||
var et2_vfsSize = et2_description.extend({
|
var et2_vfsSize = et2_description.extend({
|
||||||
attributes: {
|
attributes: {
|
||||||
@ -268,6 +301,11 @@ var et2_vfsSize = et2_description.extend({
|
|||||||
"type": "integer",
|
"type": "integer",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_vfsSize
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
this.span.addClass("et2_vfs");
|
this.span.addClass("et2_vfs");
|
||||||
@ -311,8 +349,9 @@ et2_register_widget(et2_vfsSize, ["vfs-size"]);
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* vfs-mode
|
* vfs-mode: textual representation of permissions + extra bits
|
||||||
* Textual representation of permissions + extra bits
|
*
|
||||||
|
* @augments et2_description
|
||||||
*/
|
*/
|
||||||
var et2_vfsMode = et2_description.extend({
|
var et2_vfsMode = et2_description.extend({
|
||||||
// Masks for file types
|
// Masks for file types
|
||||||
@ -336,6 +375,12 @@ var et2_vfsMode = et2_description.extend({
|
|||||||
'w': 0x2, // Write
|
'w': 0x2, // Write
|
||||||
'r': 0x4 // Read
|
'r': 0x4 // Read
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @memberOf et2_vfsMode
|
||||||
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
this.span.addClass("et2_vfs");
|
this.span.addClass("et2_vfs");
|
||||||
@ -416,11 +461,18 @@ et2_register_widget(et2_vfsMode, ["vfs-mode"]);
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* vfs-uid / vfs-gid
|
* vfs-uid / vfs-gid: Displays the name for an ID.
|
||||||
* Displays the name for an ID.
|
|
||||||
* Same as read-only selectAccount, except if there's no user it shows "root"
|
* Same as read-only selectAccount, except if there's no user it shows "root"
|
||||||
|
*
|
||||||
|
* @augments et2_selectAccount_ro
|
||||||
|
*/
|
||||||
|
var et2_vfsUid = et2_selectAccount_ro.extend(
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @memberOf et2_vfsUid
|
||||||
|
* @param _node
|
||||||
|
* @param _value
|
||||||
*/
|
*/
|
||||||
var et2_vfsUid = et2_selectAccount_ro.extend({
|
|
||||||
set_title: function(_node, _value) {
|
set_title: function(_node, _value) {
|
||||||
if(_value == "")
|
if(_value == "")
|
||||||
{
|
{
|
||||||
@ -438,15 +490,24 @@ et2_register_widget(et2_vfsUid, ["vfs-uid","vfs-gid"]);
|
|||||||
* and calling app is responsible to move content of that dir to entry directory, after entry is saved
|
* and calling app is responsible to move content of that dir to entry directory, after entry is saved
|
||||||
* + option: required mimetype or regular expression for mimetype to match, eg. '/^text\//i' for all text files
|
* + option: required mimetype or regular expression for mimetype to match, eg. '/^text\//i' for all text files
|
||||||
* + if path ends in a slash, multiple files can be uploaded, their original filename is kept then
|
* + if path ends in a slash, multiple files can be uploaded, their original filename is kept then
|
||||||
|
*
|
||||||
|
* @augments et2_file
|
||||||
*/
|
*/
|
||||||
var et2_vfsUpload = et2_file.extend({
|
var et2_vfsUpload = et2_file.extend(
|
||||||
|
{
|
||||||
legacyOptions: ["mime"],
|
legacyOptions: ["mime"],
|
||||||
|
|
||||||
asyncOptions: {
|
asyncOptions: {
|
||||||
url: egw_json_request.prototype._assembleAjaxUrl("etemplate_widget_vfs::ajax_upload::etemplate")
|
url: egw_json_request.prototype._assembleAjaxUrl("etemplate_widget_vfs::ajax_upload::etemplate")
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param _parent
|
||||||
|
* @param attrs
|
||||||
|
* @memberof et2_vfsUpload
|
||||||
|
*/
|
||||||
init: function(_parent, attrs) {
|
init: function(_parent, attrs) {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
this.input.addClass("et2_vfs");
|
this.input.addClass("et2_vfs");
|
||||||
|
@ -88,7 +88,7 @@ function etemplate2(_container, _menuaction)
|
|||||||
this.templates = {};
|
this.templates = {};
|
||||||
|
|
||||||
// Connect to the window resize event
|
// Connect to the window resize event
|
||||||
$j(window).resize(this, function(e) {e.data.resize()});
|
$j(window).resize(this, function(e) {e.data.resize();});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -104,7 +104,7 @@ etemplate2.prototype.resize = function()
|
|||||||
_widget.resize();
|
_widget.resize();
|
||||||
}, this, et2_IResizeable);
|
}, this, et2_IResizeable);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears the current instance.
|
* Clears the current instance.
|
||||||
@ -131,7 +131,7 @@ etemplate2.prototype.clear = function()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.templates = {};
|
this.templates = {};
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an associative array containing the data array managers for each part
|
* Creates an associative array containing the data array managers for each part
|
||||||
@ -176,7 +176,7 @@ etemplate2.prototype._createArrayManagers = function(_data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads the template from the given URL and sets the data object
|
* Loads the template from the given URL and sets the data object
|
||||||
@ -253,7 +253,7 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback)
|
|||||||
// Split the given data into array manager objects and pass those to the
|
// Split the given data into array manager objects and pass those to the
|
||||||
// widget container
|
// widget container
|
||||||
this.widgetContainer.setArrayMgrs(this._createArrayManagers(_data));
|
this.widgetContainer.setArrayMgrs(this._createArrayManagers(_data));
|
||||||
}
|
};
|
||||||
|
|
||||||
etemplate2.prototype.submit = function(button)
|
etemplate2.prototype.submit = function(button)
|
||||||
{
|
{
|
||||||
@ -285,7 +285,7 @@ etemplate2.prototype.submit = function(button)
|
|||||||
// I'm just not sure how.
|
// I'm just not sure how.
|
||||||
if(button && !values.button)
|
if(button && !values.button)
|
||||||
{
|
{
|
||||||
values.button = button.id
|
values.button = button.id;
|
||||||
var path = button.getPath();
|
var path = button.getPath();
|
||||||
var target = values;
|
var target = values;
|
||||||
for(var i = 0; i < path.length; i++)
|
for(var i = 0; i < path.length; i++)
|
||||||
@ -328,7 +328,7 @@ etemplate2.prototype.submit = function(button)
|
|||||||
egw.debug("info", "Form got submitted with values: ", values);
|
egw.debug("info", "Form got submitted with values: ", values);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does a full form post submit.
|
* Does a full form post submit.
|
||||||
@ -366,7 +366,7 @@ etemplate2.prototype.postSubmit = function()
|
|||||||
form.append(input);
|
form.append(input);
|
||||||
form.appendTo(jQuery('body')).submit();
|
form.appendTo(jQuery('body')).submit();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches all input element values and returns them in an associative
|
* Fetches all input element values and returns them in an associative
|
||||||
@ -459,7 +459,7 @@ etemplate2.prototype.getValues = function(_root)
|
|||||||
else if (jQuery.isEmptyObject(_target))
|
else if (jQuery.isEmptyObject(_target))
|
||||||
{
|
{
|
||||||
// Avoid sending back empty sub-arrays
|
// Avoid sending back empty sub-arrays
|
||||||
_target = result
|
_target = result;
|
||||||
for (var i = 0; i < path.length-1; i++)
|
for (var i = 0; i < path.length-1; i++)
|
||||||
{
|
{
|
||||||
_target = _target[path[i]];
|
_target = _target[path[i]];
|
||||||
@ -472,7 +472,7 @@ etemplate2.prototype.getValues = function(_root)
|
|||||||
|
|
||||||
egw().debug("info", "Value", result);
|
egw().debug("info", "Value", result);
|
||||||
return result;
|
return result;
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -508,8 +508,7 @@ etemplate2.prototype.refresh = function(msg, app, id, type)
|
|||||||
// Trigger refresh
|
// Trigger refresh
|
||||||
_widget.refresh(id,type);
|
_widget.refresh(id,type);
|
||||||
}, this, et2_nextmatch);
|
}, this, et2_nextmatch);
|
||||||
|
};
|
||||||
}
|
|
||||||
|
|
||||||
// Some static things to make getting into widget context a little easier //
|
// Some static things to make getting into widget context a little easier //
|
||||||
|
|
||||||
@ -559,7 +558,7 @@ etemplate2.getByApplication = function(app)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
};
|
||||||
|
|
||||||
function etemplate2_handle_load(_type, _response)
|
function etemplate2_handle_load(_type, _response)
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ function widget_browser(list_div, widget_div)
|
|||||||
this.et2 = new etemplate2(widget_div, "etemplate::ajax_process_content");
|
this.et2 = new etemplate2(widget_div, "etemplate::ajax_process_content");
|
||||||
|
|
||||||
// Normally this would be passed from app
|
// Normally this would be passed from app
|
||||||
var _data = {}
|
var _data = {};
|
||||||
|
|
||||||
// Create the basic widget container and attach it to the DOM
|
// Create the basic widget container and attach it to the DOM
|
||||||
// Not really needed, but let's be consitent with et2
|
// Not really needed, but let's be consitent with et2
|
||||||
@ -74,7 +74,7 @@ widget_browser.prototype._init_list = function()
|
|||||||
.attr('id', 'widget_attributes')
|
.attr('id', 'widget_attributes')
|
||||||
.append(attribute_table)
|
.append(attribute_table)
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User selected a widget from the list
|
* User selected a widget from the list
|
||||||
@ -122,9 +122,7 @@ widget_browser.prototype.select_widget = function(e,f)
|
|||||||
.appendTo(this.attribute_list);
|
.appendTo(this.attribute_list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -184,7 +182,7 @@ widget_browser.prototype.create_attribute = function(name, settings)
|
|||||||
value.text(this.widget.options[name]);
|
value.text(this.widget.options[name]);
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
input.appendTo(value)
|
input.appendTo(value);
|
||||||
|
|
||||||
return row;
|
return row;
|
||||||
}
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user