[open-ils-commits] r16135 - trunk/Open-ILS/web/js/dojo/openils/widget (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 5 14:58:52 EDT 2010
Author: erickson
Date: 2010-04-05 14:58:47 -0400 (Mon, 05 Apr 2010)
New Revision: 16135
Modified:
trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js
Log:
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
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js 2010-04-05 18:58:46 UTC (rev 16134)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js 2010-04-05 18:58:47 UTC (rev 16135)
@@ -17,6 +17,8 @@
onCancel : null, // cancel callback
hideActionButtons : false,
fieldDocs : null,
+ existingTable : null,
+ suppressFields : null,
constructor : function(args) {
this.fieldList = [];
@@ -40,9 +42,12 @@
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 @@
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 */
More information about the open-ils-commits
mailing list