3 'remoto!stdlib:js/panes/pane.js',
4 'remoto!stdlib:js/include/preferences.js',
5 'remoto!stdlib:js/widgets/widgetFactory.js',
6 'remoto!stdlib:js/paneManager/paneManager.js',
7 'remoto!stdlib:js/include/objectRegistry.js',
8 'remoto!stdlib:js/include/utils.js',
9 'remoto!stdlib:js/panes/panes/form.css',
37 pane.call(
this, layout);
43 this._attributes = {};
46 this._diffing =
false;
47 this._objectLoader =
null;
48 this._useAttributes =
false;
51 this._enabledFilter = layout.enabledFilter ||
null;
52 if (this._enabledFilter)
53 this._saveFields[
"enabledFilter"] = this._enabledFilter;
71 if (this._html)
return this._html;
75 this._formJq = $(
"<div class='formCanvas'>").appendTo(this._content);
99 this._subscribed =
true;
101 if (data.base || data.attributes)
102 { this._useAttributes =
true;
110 if (!this._objectLoader)
112 return this._objectLoader.fetchDefinition( data.base, data,
this.applyDiff.bind(
this) );
135 this._diffing =
true;
143 if (this._useAttributes && diff.attributes)
146 this._help = diff.help;
148 diff = diff.attributes;
156 for (var __i=0;__i < diffSorted.length; __i++)
158 v = diffSorted[__i].__key;
161 if (!(c instanceof Object))
167 if (this._attributes[v])
170 this._attributes[v].activeUser =
user;
172 this._attributes[v].activeUser =
null;
177 this._attributes[v].immediateValue = c.value;
180 this._attributes[v].applyOptions(c.options);
193 this._attributes[v].destroy();
194 delete this._attributes[v];
195 console.error(
"FIXME: delete widget: '"+v+
"' ... need to post update.");
198 this._attributes[v].activeUser =
null;
213 { this._attributes[v] = w;
219 this._formJq.append( w.createHTML() );
223 if (this._enabledFilter)
225 var e = this._enabledFilter;
242 console.error(
"diff was null!");
246 console.error(
"Caught exception: "+err.message);
248 console.log(diffSorted);
251 this._diffing =
false;
283 if (!this._diffing && this._path)
291 if (this._useAttributes)
292 u = { attributes:u };
320 if (field in this._attributes)
321 return this._attributes[field];
336 if (field in this._attributes)
337 return this._attributes[field].value;
355 for(var a in this._attributes)
357 v[a] = this._attributes[a].value;
380 for (var a in this._attributes)
381 { v = this._attributes[a].validate();
399 for (var a in this._attributes)
400 this._attributes[a].destroy();
404 this._attributes =
null;
406 this._wrapper =
null;
408 this._objectLoader =
null;
setter value
a setter DOCME
setter widget
a setter DOCME
applyDiff(id, diff, user, except)
setter postUpdate
Assign a callback to the paneFactory class for VFS_node::submit() commands.
Create a pane which will be mounted into a paneManager layout.
The paneManager manages panes in a user layout.
getter valid
a getter 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.
resolveContextValues(o, ctx)
Recursively resolve any context values in an object.