From ed8b82f63eee1f2b78bfdd0f88e6c4d4411b2126 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 5 Apr 2010 18:58:47 +0000 Subject: [PATCH] provided ability to append the table rows from one edit pane to an existing table. this is useful for inserting edit panes for different objects into a single, consistently formatted table 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 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/js/dojo/openils/widget/EditPane.js b/Open-ILS/web/js/dojo/openils/widget/EditPane.js index d7a8dc8ab0..2e2cefedb1 100644 --- a/Open-ILS/web/js/dojo/openils/widget/EditPane.js +++ b/Open-ILS/web/js/dojo/openils/widget/EditPane.js @@ -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 */ -- 2.43.2