Fixed some dependencies

This commit is contained in:
Andreas Stöckel 2011-08-10 14:39:35 +00:00
parent 68c7a5550e
commit 510c482eef
4 changed files with 58 additions and 55 deletions

View File

@ -115,4 +115,59 @@ var et2_baseWidget = et2_DOMWidget.extend({
});
/**
* Simple container object
*/
var et2_container = et2_baseWidget.extend({
init: function() {
this._super.apply(this, arguments);
this.setDOMNode(document.createElement("div"));
}
});
/**
* Container object for not-yet supported widgets
*/
var et2_placeholder = et2_baseWidget.extend({
init: function() {
this._super.apply(this, arguments);
// The attrNodes object will hold the DOM nodes which represent the
// values of this object
this.attrNodes = {};
// Create the placeholder div
this.placeDiv = $j(document.createElement("span"))
.addClass("et2_placeholder");
var headerNode = $j(document.createElement("span"))
.text(this.type)
.addClass("et2_caption")
.appendTo(this.placeDiv);
this.setDOMNode(this.placeDiv[0]);
},
loadAttributes: function(_attrs) {
for (var i = 0; i < _attrs.length; i++)
{
var attr = _attrs[i];
if (typeof this.attrNodes[attr.name] == "undefined")
{
this.attrNodes[attr.name] = $j(document.createElement("span"))
.addClass("et2_attr");
this.placeDiv.append(this.attrNodes[attr.name]);
}
this.attrNodes[attr.name].text(attr.name + "=" + attr.value);
}
}
});

View File

@ -43,7 +43,7 @@ var et2_IInput = new Interface({
* interface. When derriving from this class, call setDOMNode with an input
* DOMNode.
*/
var et2_inputWidget = et2_simpleWidget.extend(et2_IInput, {
var et2_inputWidget = et2_baseWidget.extend(et2_IInput, {
attributes: {
"value": {

View File

@ -595,58 +595,4 @@ var et2_DOMWidget = et2_widget.extend(et2_IDOMNode, {
});
/**
* Common container object
*/
var et2_container = et2_simpleWidget.extend({
init: function() {
this._super.apply(this, arguments);
this.setDOMNode(document.createElement("div"));
}
});
/**
* Container object for not-yet supported widgets
*/
var et2_placeholder = et2_baseWidget.extend({
init: function() {
this._super.apply(this, arguments);
// The attrNodes object will hold the DOM nodes which represent the
// values of this object
this.attrNodes = {};
// Create the placeholder div
this.placeDiv = $j(document.createElement("span"))
.addClass("et2_placeholder");
var headerNode = $j(document.createElement("span"))
.text(this.type)
.addClass("et2_caption")
.appendTo(this.placeDiv);
this.setDOMNode(this.placeDiv[0]);
},
loadAttributes: function(_attrs) {
for (var i = 0; i < _attrs.length; i++)
{
var attr = _attrs[i];
if (typeof this.attrNodes[attr.name] == "undefined")
{
this.attrNodes[attr.name] = $j(document.createElement("span"))
.addClass("et2_attr");
this.placeDiv.append(this.attrNodes[attr.name]);
}
this.attrNodes[attr.name].text(attr.name + "=" + attr.value);
}
}
});

View File

@ -7,6 +7,8 @@
<script src="../et2_inheritance.js"></script>
<script src="../et2_common.js"></script>
<script src="../et2_widget.js"></script>
<script src="../et2_baseWidget.js"></script>
<script src="../et2_inputWidget.js"></script>
<script src="../et2_template.js"></script>
<script src="../et2_description.js"></script>
<script src="../et2_grid.js"></script>