forked from extern/egroupware
Silence some messages about missing attribute attributes
This commit is contained in:
parent
a1d344077e
commit
9b7cd5019c
@ -378,6 +378,7 @@ function et2_validateAttrib(_id, _attrib)
|
|||||||
_attrib["name"] = _id;
|
_attrib["name"] = _id;
|
||||||
et2_debug("log", "Human name ('name'-Field) for attribute '" +
|
et2_debug("log", "Human name ('name'-Field) for attribute '" +
|
||||||
_id + "' has not been supplied, set to '" + _id + "'");
|
_id + "' has not been supplied, set to '" + _id + "'");
|
||||||
|
console.debug(_attrib);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof _attrib["description"] == "undefined")
|
if (typeof _attrib["description"] == "undefined")
|
||||||
|
@ -128,7 +128,10 @@ var et2_widget = Class.extend({
|
|||||||
* function and passed as second parameter of the widget constructor
|
* function and passed as second parameter of the widget constructor
|
||||||
*/
|
*/
|
||||||
"type": {
|
"type": {
|
||||||
"ignore": true
|
"name": "Widget type",
|
||||||
|
"type": "string",
|
||||||
|
"ignore": true,
|
||||||
|
"description": "What kind of widget this is"
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -158,7 +158,7 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], {
|
|||||||
*/
|
*/
|
||||||
getDetachedAttributes: function(_attrs)
|
getDetachedAttributes: function(_attrs)
|
||||||
{
|
{
|
||||||
_attrs.push("value", "class", "image" );
|
_attrs.push("label", "value", "class", "image", "onclick" );
|
||||||
},
|
},
|
||||||
|
|
||||||
getDetachedNodes: function()
|
getDetachedNodes: function()
|
||||||
@ -177,6 +177,10 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], {
|
|||||||
{
|
{
|
||||||
this.set_id(_values["id"]);
|
this.set_id(_values["id"]);
|
||||||
}
|
}
|
||||||
|
if (typeof _values["label"] != "undefined")
|
||||||
|
{
|
||||||
|
this.set_label(_values["label"]);
|
||||||
|
}
|
||||||
if (typeof _values["value"] != "undefined")
|
if (typeof _values["value"] != "undefined")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -186,11 +190,7 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], {
|
|||||||
this.set_class(_values["class"]);
|
this.set_class(_values["class"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof _values["onclick"] == "string")
|
if (typeof _values["onclick"] != "undefined")
|
||||||
{
|
|
||||||
_values["onclick"] = new Function(_values["onclick"]);
|
|
||||||
}
|
|
||||||
if (typeof _values["onclick"] == "function")
|
|
||||||
{
|
{
|
||||||
this.options.onclick = _values["onclick"];
|
this.options.onclick = _values["onclick"];
|
||||||
}
|
}
|
||||||
|
@ -46,8 +46,14 @@ var et2_image = et2_baseWidget.extend(et2_IDetachedDOM, {
|
|||||||
"description": "widthxheight, if popup should be used, eg. 640x480"
|
"description": "widthxheight, if popup should be used, eg. 640x480"
|
||||||
},
|
},
|
||||||
"imagemap":{
|
"imagemap":{
|
||||||
|
// TODO: Do something with this
|
||||||
|
"name": "Image map",
|
||||||
|
"description": "Currently not implemented"
|
||||||
},
|
},
|
||||||
"label": {
|
"label": {
|
||||||
|
"name": "Label",
|
||||||
|
"type": "string",
|
||||||
|
"description": "Label for image"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
legacyOptions: ["href", "extra_link_target", "imagemap", "extra_link_popup", "id"],
|
legacyOptions: ["href", "extra_link_target", "imagemap", "extra_link_popup", "id"],
|
||||||
|
@ -40,6 +40,16 @@ var et2_progress = et2_valueWidget.extend(et2_IDetachedDOM,
|
|||||||
"description": "widthxheight, if popup should be used, eg. 640x480"
|
"description": "widthxheight, if popup should be used, eg. 640x480"
|
||||||
},
|
},
|
||||||
"label": {
|
"label": {
|
||||||
|
"name": "Label",
|
||||||
|
"default": "",
|
||||||
|
"type": "string",
|
||||||
|
"description": "The label is displayed as the title. 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).",
|
||||||
|
"translate": true
|
||||||
|
},
|
||||||
|
"onchange": {
|
||||||
|
"name": "onchange",
|
||||||
|
"type": "js",
|
||||||
|
"description": "JS code which is executed when the value changes."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
legacyOptions: ["href", "extra_link_target", "imagemap", "extra_link_popup", "id"],
|
legacyOptions: ["href", "extra_link_target", "imagemap", "extra_link_popup", "id"],
|
||||||
|
@ -29,8 +29,15 @@ var et2_template = et2_DOMWidget.extend({
|
|||||||
|
|
||||||
attributes: {
|
attributes: {
|
||||||
"template": {
|
"template": {
|
||||||
|
"name": "Template",
|
||||||
|
"type": "string",
|
||||||
|
"description": "Name / ID of template"
|
||||||
},
|
},
|
||||||
"group": {
|
"group": {
|
||||||
|
// TODO: Not implemented
|
||||||
|
"name": "Group",
|
||||||
|
"description":"Not implemented",
|
||||||
|
"default": 0
|
||||||
},
|
},
|
||||||
"version": {
|
"version": {
|
||||||
"name": "Version",
|
"name": "Version",
|
||||||
|
Loading…
Reference in New Issue
Block a user