2 var dialog = new openils.widget.EditDialog({
4 fieldOrder: ['id', 'name', 'description', 'start_date', 'end_date']
12 if(!dojo._hasResource['openils.widget.EditDialog']) {
13 dojo.provide('openils.widget.EditDialog');
14 dojo.require('openils.widget.EditPane');
15 dojo.require('dijit.Dialog');
16 dojo.require('openils.Util');
19 * Given a fieldmapper object, this builds a pop-up dialog used for editing the object
23 'openils.widget.EditDialog',
26 editPane : null, // reference to our EditPane object
28 constructor : function(args) {
30 this.editPane = args.editPane || new openils.widget.EditPane(args);
33 var onCancel = args.onCancel || this.editPane.onCancel;
34 var onSubmit = args.onPostSubmit || this.editPane.onPostSubmit;
36 this.editPane.onCancel = function() {
37 if(onCancel) onCancel();
41 this.editPane.onPostSubmit = function(r, cudResults) {
43 if(onSubmit) onSubmit(r, cudResults);
48 * Builds a basic table of key / value pairs. Keys are IDL display labels.
49 * Values are dijit's, when values set
51 startup : function() {
52 this.inherited(arguments);
53 this.attr('content', this.editPane);
54 openils.Util.addCSSClass(this.editPane.table, 'oils-fm-edit-dialog');