mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-16 21:13:16 +01:00
8b2dae28f7
- Added indexOf function for IE compatiblity - this and some other code is redundant to that in egw_action_common.js - Probably this code should be merged into jsapi and jsapi.js should be cleaned up and splitted into multiple files - Implemented template widget - Implemented dummy implementation of description widget - Improved et2_placeholder - it now shows all properties set for that placeholder - Improved and extended test page - Improved interface system in et2_inheritance.js - each object derrived from Class now has a instanceOf function which checks, whether the object is either an instance of the given class or implements the given interface (same behaviour as instanceOf in Java) - Widgets can now define which other widget classes are allowed inside of them
48 lines
828 B
JavaScript
48 lines
828 B
JavaScript
/**
|
|
* eGroupWare eTemplate2 - JS Template base class
|
|
*
|
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
|
* @package etemplate
|
|
* @subpackage api
|
|
* @link http://www.egroupware.org
|
|
* @author Andreas Stöckel
|
|
* @copyright Stylite 2011
|
|
* @version $Id$
|
|
*/
|
|
|
|
/*egw:uses
|
|
jquery.jquery;
|
|
et2_widget;
|
|
*/
|
|
|
|
/**
|
|
* Class which implements the "description" XET-Tag
|
|
*/
|
|
et2_description = et2_DOMWidget.extend({
|
|
|
|
init: function(_parent) {
|
|
this.span = $j(document.createElement("span"));
|
|
|
|
this._super.apply(this, arguments);
|
|
this.value = "";
|
|
},
|
|
|
|
set_value: function(_value) {
|
|
if (_value != this.value)
|
|
{
|
|
this.value = _value;
|
|
|
|
this.span.text(_value);
|
|
}
|
|
},
|
|
|
|
getDOMNode: function() {
|
|
return this.span[0];
|
|
}
|
|
|
|
});
|
|
|
|
et2_register_widget(et2_description, ["description"]);
|
|
|
|
|