|
89 |
{ |
89 |
{ |
90 |
type: 'TextBox', |
90 |
type: 'TextBox', |
91 |
name: 'name', |
91 |
name: 'name', |
92 |
label: this._("Component Name") |
92 |
label: this._("Component Name"), |
93 |
}, |
93 |
}, |
94 |
{ |
94 |
{ |
95 |
type: 'TextBox', |
95 |
type: 'TextBox', |
|
159 |
this._form = new umc.modules._updater.Form({ |
159 |
this._form = new umc.modules._updater.Form({ |
160 |
widgets: widgets, |
160 |
widgets: widgets, |
161 |
layout: layout, |
161 |
layout: layout, |
|
|
162 |
scrollable: true, |
162 |
//buttons: buttons, |
163 |
//buttons: buttons, |
163 |
moduleStore: umc.store.getModuleStore('name','updater/components'), |
164 |
moduleStore: umc.store.getModuleStore('name','updater/components') |
164 |
// This is (a) the submit handler of the form, but |
|
|
165 |
// also (b) the onClick handler of the 'Apply' button |
166 |
onSubmit: dojo.hitch(this,function() { |
167 |
this._form.standby(true); |
168 |
this._form.save(this._save_options); |
169 |
}) |
170 |
}); |
165 |
}); |
171 |
this.addChild(this._form); |
166 |
this.addChild(this._form); |
172 |
|
167 |
|
|
|
168 |
// A tip from Alexander: the onSubmit event of our base class |
169 |
// should remain intact in all cases: instead of overwriting that event we should |
170 |
// better connect to it. |
171 |
dojo.connect(this._form,'onSubmit',dojo.hitch(this,function() { |
172 |
this.standby(true); |
173 |
this._form.save(this._save_options); |
174 |
})); |
175 |
|
173 |
dojo.connect(this._form,'onSaved',dojo.hitch(this, function(success,data) { |
176 |
dojo.connect(this._form,'onSaved',dojo.hitch(this, function(success,data) { |
174 |
this.standby(false); |
177 |
this.standby(false); |
175 |
try |
178 |
try |