From 63fdde068d482c670123649eca7f294c3e039e5a Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 4 Feb 2009 04:47:38 +0000 Subject: [PATCH] better handle case where grid structure may exist but just have no columns yet defined git-svn-id: svn://svn.open-ils.org/ILS/trunk@12057 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/openils/widget/AutoGrid.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js b/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js index c8bb10fefb..2031309f8b 100644 --- a/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js +++ b/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js @@ -12,7 +12,8 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) { startup : function() { this.inherited(arguments); this.initAutoEnv(); - var existing = (this.structure) ? this.structure[0].cells[0] : []; + var existing = (this.structure && this.structure[0].cells[0]) ? + this.structure[0].cells[0] : []; var fields = []; for(var f in this.sortedFieldList) { var field = this.sortedFieldList[f]; @@ -27,7 +28,6 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) { this.setStructure([{cells: [fields]}]); this.setStore(this.buildAutoStore()); }, - } ); openils.widget.AutoGrid.markupFactory = dojox.grid.DataGrid.markupFactory; -- 2.43.2