3 'remoto!stdlib:js/widgets/widget.js',
4 'remoto!stdlib:js/widgets/widgetFactory.js',
5 'remoto!stdlib:js/include/utils.js',
38 var
value = dd.value || {};
42 dd.defaultValue = undefined;
46 this._fixed = this._options.equal ||
false;
47 this._useValue = this._options.useValue ===
false ? false :
true;
52 for (var __i=0;__i < valueSorted.length; __i++)
54 v = valueSorted[__i].__key;
64 this._children[v] = w;
68 throw "Bad Widget: "+v;
84 if (this._widgetJq)
return this._widgetJq;
86 var g = $(
"<div class='widgetGroup' id='"+this._id+
"'/>");
87 var r = $(
"<div class='widgetGroupRow'/>").appendTo(g);
90 g.css(
"table-layout",
"fixed");
93 for (var c in this._children)
95 k = this._children[c];
105 r.append( k.createHTML() );
110 return this._widgetJq;
143 this._change( this._variable, u,
widget );
160 for (var c in this._children)
161 this._children[c].activate();
181 for (var c in this._children)
182 this._children[c].deactivate();
198 for (var c in this._children)
199 this._children[c].destroy();
215 groupWidget.prototype.__defineGetter__(
"value",
function()
227 for (var c in this._children)
230 { v[c] = {
"value": this._children[c].value };
233 v[c] = this._children[c].value;
244 groupWidget.prototype.__defineSetter__(
"value",
function(v)
248 if (c in this._children)
250 this._children[c].activeUser = this._activeUser;
252 if (this._immediate) this._children[c].immediateValue = (this._useValue && (typeof(v[c]) ==
"object") && (
"value" in v[c])) ? v[c].
value : v[c];
253 else this._children[c].value = (this._useValue && (typeof(v[c]) ==
"object") && (
"value" in v[c])) ? v[c].
value : v[c];
257 console.error(
"FIXME: need a group value setter that creates new attributes as needed.");
262 this._activeUser =
null;
273 groupWidget.prototype.__defineGetter__(
"isDefault",
function()
275 for (var c in this._children)
288 groupWidget.prototype.__defineGetter__(
"nonDefaultValue",
function()
293 for (var c in this._children)
294 { d = this._children[c].nonDefaultValue;
301 return f ? {
value:v} : undefined;
setter value
a setter DOCME
setter widget
a setter DOCME
Utility functions for javascript clients.
copyObject(source, dest)
Create a deep copy of a JSON object, extending the destination object recursively.
sortObjectByMemberAttribute(o, attr)
Sort an object by the value of an attribute of members of the object.