From e15b1232aea606c61b59f185376ef83bc48dc582 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 27 Mar 2012 11:42:29 -0400 Subject: [PATCH] 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 --- Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js | 9 +++++++++ 1 file changed, 9 insertions(+) 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); } } -- 2.11.0