From: erickson Date: Fri, 23 Jan 2009 17:10:07 +0000 (+0000) Subject: allow config settings to be passed in via args object to constructor X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=cd33717979ec1ef738dd6109eed6cab3ae7eea47;p=Evergreen.git allow config settings to be passed in via args object to constructor git-svn-id: svn://svn.open-ils.org/ILS/trunk@11937 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/dojo/openils/widget/EditDialog.js b/Open-ILS/web/js/dojo/openils/widget/EditDialog.js index 9fc5bfc9dd..c48f6f4ddd 100644 --- a/Open-ILS/web/js/dojo/openils/widget/EditDialog.js +++ b/Open-ILS/web/js/dojo/openils/widget/EditDialog.js @@ -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(); } diff --git a/Open-ILS/web/js/dojo/openils/widget/EditPane.js b/Open-ILS/web/js/dojo/openils/widget/EditPane.js index 1e9f56597e..7e976fd439 100644 --- a/Open-ILS/web/js/dojo/openils/widget/EditPane.js +++ b/Open-ILS/web/js/dojo/openils/widget/EditPane.js @@ -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