allow config settings to be passed in via args object to constructor
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 23 Jan 2009 17:10:07 +0000 (17:10 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 23 Jan 2009 17:10:07 +0000 (17:10 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11937 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 9fc5bfc..c48f6f4 100644 (file)
@@ -14,8 +14,8 @@ if(!dojo._hasResource['openils.widget.EditDialog']) {
         {
             editPane : null, // reference to our EditPane object
 
-            constructor : function() {
-                this.editPane = new openils.widget.EditPane();
+            constructor : function(args) {
+                this.editPane = new openils.widget.EditPane(args);
                 var self = this;
                 this.editPane.onCancel = function() { self.hide(); }
                 this.editPane.onPostApply = function() { self.hide(); }
index 1e9f565..7e976fd 100644 (file)
@@ -22,6 +22,11 @@ if(!dojo._hasResource['openils.widget.EditPane']) {
             onCancel : null, // cancel callback
             hideActionButtons : false,
 
+            constructor : function(args) {
+                for(var k in args)
+                    this[k] = args[k];
+            },
+
             /**
              * Builds a basic table of key / value pairs.  Keys are IDL display labels.
              * Values are dijit's, when values set