]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/js/dojo/openils/widget/EditDialog.js
added a new editpane class, which models the basic edit table of key/value pairs...
[working/Evergreen.git] / Open-ILS / web / js / dojo / openils / widget / EditDialog.js
1 if(!dojo._hasResource['openils.widget.EditDialog']) {
2     dojo.provide('openils.widget.EditDialog');
3     dojo.require('openils.widget.EditPane');
4     dojo.require('dijit.Dialog');
5
6
7     /**
8      * Given a fieldmapper object, this builds a pop-up dialog used for editing the object
9      */
10
11     dojo.declare(
12         'openils.widget.EditDialog',
13         [dijit.Dialog],
14         {
15             fmClass : '',
16             fmObject : null,
17             mode : 'update',
18             fieldOrder : null, // ordered list of field names, optional.
19
20             /**
21              * Builds a basic table of key / value pairs.  Keys are IDL display labels.
22              * Values are dijit's, when values set
23              */
24             startup : function() {
25                 this.inherited(arguments);
26                 var pane = new openils.widget.EditPane();
27                 pane.mode = this.mode;
28                 pane.fmClass = this.fmClass;
29                 pane.fmObject = this.fmObject;
30                 pane.fieldOrder = this.fieldOrder;
31                 pane.startup();
32                 this.domNode.appendChild(pane.domNode);
33             }
34         }
35     );
36 }
37