From: Bill Erickson Date: Tue, 27 Mar 2012 15:42:29 +0000 (-0400) Subject: Added GridColumnPicker support to FlattenerGrid X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e15b1232aea606c61b59f185376ef83bc48dc582;p=evergreen%2Fequinox.git Added GridColumnPicker support to FlattenerGrid The columnpicker is assumed to be enabled. Even when the user setting required to persist the settings does not exist, the columpicker can be used on a per-page basis. Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js b/Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js index 8e07821734..4fd1b9e02e 100644 --- a/Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js +++ b/Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js @@ -4,6 +4,7 @@ if (!dojo._hasResource["openils.widget.FlattenerGrid"]) { dojo.require("DojoSRF"); dojo.require("dojox.grid.DataGrid"); dojo.require("openils.FlattenerStore"); + dojo.require("openils.widget.GridColumnPicker"); dojo.declare( "openils.widget.FlattenerGrid", @@ -12,6 +13,7 @@ if (!dojo._hasResource["openils.widget.FlattenerGrid"]) { "fmClass": null, "fmIdentifier": null, "mapExtras": null, + "columnPickerPrefix": null, /* _generate_map() lives to interpret the attributes of the * FlattenerGrid dijit itself plus those definined in @@ -96,6 +98,13 @@ if (!dojo._hasResource["openils.widget.FlattenerGrid"]) { }); } + if (!this.columnPicker) { + this.columnPicker = + new openils.widget.GridColumnPicker( + null, this.columnPickerPrefix, this); + this.columnPicker.load(); + } + this.inherited(arguments); } }