mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-15 02:42:30 +02:00
Moved et2 core interfaces to own file; implemented Class.free which cares about calling 'destroy', removing all references the object may hold and rendering the object unusable after 'free' has been called; added 'getMem_freeMem_trace' which helps hunting down memory leaks with objects derriving from Class; added first implementation of the nextmatch widget - currently does nothing else but rendering the header and clicking on the nextmatch_sortheader labels
This commit is contained in:
74
etemplate/js/et2_core_interfaces.js
Normal file
74
etemplate/js/et2_core_interfaces.js
Normal file
@ -0,0 +1,74 @@
|
||||
/**
|
||||
* eGroupWare eTemplate2 - File which contains all interfaces
|
||||
*
|
||||
* @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$
|
||||
*/
|
||||
|
||||
"use strict"
|
||||
|
||||
/*egw:uses
|
||||
et2_core_inheritance;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface for all widget classes, which are based on a DOM node.
|
||||
*/
|
||||
var et2_IDOMNode = new Interface({
|
||||
/**
|
||||
* Returns the DOM-Node of the current widget. The return value has to be
|
||||
* a plain DOM node. If you want to return an jQuery object as you receive
|
||||
* it with
|
||||
*
|
||||
* obj = $j(node);
|
||||
*
|
||||
* simply return obj[0];
|
||||
*
|
||||
* @param _sender The _sender parameter defines which widget is asking for
|
||||
* the DOMNode. Depending on that, the widget may return different nodes.
|
||||
* This is used in the grid. Normally the _sender parameter can be omitted
|
||||
* in most implementations of the getDOMNode function.
|
||||
* However, you should always define the _sender parameter when calling
|
||||
* getDOMNode!
|
||||
*/
|
||||
getDOMNode: function(_sender) {}
|
||||
});
|
||||
|
||||
/**
|
||||
* Interface for all widgets which support returning a value
|
||||
*/
|
||||
var et2_IInput = new Interface({
|
||||
/**
|
||||
* getValue has to return the value of the input widget
|
||||
*/
|
||||
getValue: function() {},
|
||||
|
||||
/**
|
||||
* Is dirty returns true if the value of the widget has changed since it
|
||||
* was loaded.
|
||||
*/
|
||||
isDirty: function() {},
|
||||
|
||||
/**
|
||||
* Causes the dirty flag to be reseted.
|
||||
*/
|
||||
resetDirty: function() {}
|
||||
});
|
||||
|
||||
/**
|
||||
* Interface for widgets which should be automatically resized
|
||||
*/
|
||||
var et2_IResizeable = new Interface({
|
||||
/**
|
||||
* Called whenever the window is resized
|
||||
*/
|
||||
resize: function() {}
|
||||
});
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user