Move align interface with the rest

This commit is contained in:
Nathan Gray 2012-07-23 18:01:04 +00:00
parent b5b98f9a8b
commit e5c508a609
3 changed files with 22 additions and 8 deletions

View File

@ -18,13 +18,6 @@
et2_core_DOMWidget;
*/
/**
* Interface for widgets which have the align attribute
*/
var et2_IAligned = new Interface({
get_align: function() {}
});
/**
* Class which manages the DOM node itself. The simpleWidget class is derrived
* from et2_DOMWidget and implements the getDOMNode function. A setDOMNode

View File

@ -70,6 +70,13 @@ var et2_IResizeable = new Interface({
resize: function() {}
});
/**
* Interface for widgets which have the align attribute
*/
var et2_IAligned = new Interface({
get_align: function() {}
});
/**
* Interface for widgets which want to e.g. perform clientside validation before
* the form is submitted.

View File

@ -24,7 +24,7 @@
* This also includes repeating the last row in the grid and filling
* it with content data
*/
var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM], {
var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned], {
createNamespace: true,
@ -33,6 +33,12 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM], {
"border": {
"ignore": true
},
"align": {
"name": "Align",
"type": "string",
"default": "left",
"description": "Position of this element in the parent hbox"
},
"spacing": {
"ignore": true
},
@ -623,6 +629,14 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM], {
return this._super(this, vis);
},
set_align: function(_value) {
this.align = _value;
},
get_align: function(_value) {
return this.align;
},
/**
* Code for implementing et2_IDetachedDOM
* This doesn't need to be implemented.