mirror of https://github.com/apache/cloudstack.git
Adds a new dialog field type called 'has_units'. This field has an
input box side by side with a select box. The select box is populated
with predefined units (MB, GB, TB, for example) and uses (also
predefined) conversion functions to allow automatic updating of the
input box value when the units select box is changed.
Original author: Chris Suich <chris.suich@netapp.com>
Reviewed by: Brian Federle <brian.federle@citrix.com>
Example:
fields: {
...
size: {
...
has_units: true,
units: [
{
id: 'gb',
text: 'GB',
fromBase: function(val) { ... return val; },
toBase: function(val) { ... return val; }
},
...
]
}
}
|
||
|---|---|---|
| .. | ||
| css | ||
| images | ||
| lib | ||
| modules | ||
| plugins | ||
| scripts | ||
| tests | ||
| dictionary.jsp | ||
| index.jsp | ||