provided ability to append the table rows from one edit pane to an existing table...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 5 Apr 2010 18:58:47 +0000 (18:58 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 5 Apr 2010 18:58:47 +0000 (18:58 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16135 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/widget/EditPane.js

index d7a8dc8..2e2cefe 100644 (file)
@@ -17,6 +17,8 @@ if(!dojo._hasResource['openils.widget.EditPane']) {
             onCancel : null, // cancel callback
             hideActionButtons : false,
             fieldDocs : null,
+            existingTable : null,
+            suppressFields : null,
 
             constructor : function(args) {
                 this.fieldList = [];
@@ -40,9 +42,12 @@ if(!dojo._hasResource['openils.widget.EditPane']) {
                 this.fieldDocs = pcrud.search('fdoc', {fm_class:this.fmClass});
                 */
 
-                var table = this.table = document.createElement('table');
+                var table = this.existingTable;
+                if(!table) {
+                    var table = this.table = document.createElement('table');
+                    this.domNode.appendChild(table);
+                }
                 var tbody = document.createElement('tbody');
-                this.domNode.appendChild(table);
                 table.appendChild(tbody);
 
                 this.limitPerms = [];
@@ -62,6 +67,8 @@ if(!dojo._hasResource['openils.widget.EditPane']) {
                     var field = this.sortedFieldList[f];
                     if(!field || field.virtual || field.nonIdl) continue;
 
+                    if(this.suppressFields && this.suppressFields.indexOf(field.name) > -1)
+                        continue;
 
                     if(field.name == this.fmIDL.pkey && this.mode == 'create' && this.fmIDL.pkey_sequence)
                         continue; /* don't show auto-generated fields on create */