2011-08-25 15:35:53 +02:00
|
|
|
/**
|
2013-04-13 21:00:13 +02:00
|
|
|
* EGroupware eTemplate2 - File which contains all interfaces
|
2011-08-25 15:35:53 +02:00
|
|
|
*
|
|
|
|
* @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
|
|
|
|
*/
|
|
|
|
/**
|
2020-01-21 10:12:39 +01:00
|
|
|
* Checks if an object / et2_widget implements given methods
|
|
|
|
*
|
|
|
|
* @param obj
|
|
|
|
* @param methods
|
|
|
|
*/
|
|
|
|
function implements_methods(obj, methods) {
|
|
|
|
for (var i = 0; i < methods.length; ++i) {
|
|
|
|
if (typeof obj[methods[i]] !== 'function') {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
2020-01-21 15:12:29 +01:00
|
|
|
var et2_IDOMNode = "et2_IDOMNode";
|
2020-01-21 10:12:39 +01:00
|
|
|
function implements_et2_IDOMNode(obj) {
|
|
|
|
return implements_methods(obj, ["getDOMNode"]);
|
|
|
|
}
|
2020-01-21 15:12:29 +01:00
|
|
|
var et2_IInput = "et2_IInput";
|
2020-01-21 10:12:39 +01:00
|
|
|
function implements_et2_IInput(obj) {
|
|
|
|
return implements_methods(obj, ["getValue", "isDirty", "resetDirty", "isValid"]);
|
|
|
|
}
|
2020-01-21 15:12:29 +01:00
|
|
|
var et2_IResizeable = "et2_IResizeable";
|
2020-01-21 10:12:39 +01:00
|
|
|
function implements_et2_IResizeable(obj) {
|
|
|
|
return implements_methods(obj, ["resize"]);
|
|
|
|
}
|
2020-01-21 15:12:29 +01:00
|
|
|
var et2_IAligned = "et2_IAligned";
|
2020-01-21 10:12:39 +01:00
|
|
|
function implements_et2_IAligned(obj) {
|
|
|
|
return implements_methods(obj, ["get_align"]);
|
|
|
|
}
|
2020-01-21 15:12:29 +01:00
|
|
|
var et2_ISubmitListener = "et2_ISubmitListener";
|
2020-01-21 10:12:39 +01:00
|
|
|
function implements_et2_ISubmitListener(obj) {
|
|
|
|
return implements_methods(obj, ["submit"]);
|
|
|
|
}
|
2020-01-21 15:12:29 +01:00
|
|
|
var et2_IDetachedDOM = "et2_IDetachedDOM";
|
2020-01-21 10:12:39 +01:00
|
|
|
function implements_et2_IDetachedDOM(obj) {
|
|
|
|
return implements_methods(obj, ["getDetachedAttributes", "getDetachedNodes", "setDetachedAttributes"]);
|
|
|
|
}
|
2020-01-21 15:12:29 +01:00
|
|
|
var et2_IPrint = "et2_IPrint";
|
2020-01-21 10:12:39 +01:00
|
|
|
function implements_et2_IPrint(obj) {
|
|
|
|
return implements_methods(obj, ["beforePrint", "afterPrint"]);
|
|
|
|
}
|
2020-01-21 19:45:21 +01:00
|
|
|
//# sourceMappingURL=et2_core_interfaces.js.map
|