From 0e785a90b05ba968b6c0c38d6fe32f069a2f635e Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Fri, 21 Sep 2012 17:05:08 -0400 Subject: [PATCH] Fix filter dialog for pkey fields, scrolliness issue, saved filters issue Signed-off-by: Lebbeous Fogle-Weekley --- Open-ILS/src/templates/url_verify/review_attempt.tt2 | 1 + .../js/dojo/openils/widget/FlattenerFilterDialog.js | 20 +++++++++++++++++++- .../web/js/dojo/openils/widget/PCrudFilterPane.js | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/templates/url_verify/review_attempt.tt2 b/Open-ILS/src/templates/url_verify/review_attempt.tt2 index d232589c9f..21118a00d8 100644 --- a/Open-ILS/src/templates/url_verify/review_attempt.tt2 +++ b/Open-ILS/src/templates/url_verify/review_attempt.tt2 @@ -40,6 +40,7 @@ autoCoreFields="true" autoCoreFieldsFilter="true" autoCoreFieldsUnsorted="true" + savedFiltersInterface="'url_verify'" fetchLock="true" mapExtras="{attempt_id:{path:'attempt.id',filter:true,_label:'[% l("Attempt ID") %]'}}" showLoadFilter="true" diff --git a/Open-ILS/web/js/dojo/openils/widget/FlattenerFilterDialog.js b/Open-ILS/web/js/dojo/openils/widget/FlattenerFilterDialog.js index 187b69f00f..bad2762fc2 100644 --- a/Open-ILS/web/js/dojo/openils/widget/FlattenerFilterDialog.js +++ b/Open-ILS/web/js/dojo/openils/widget/FlattenerFilterDialog.js @@ -6,6 +6,24 @@ if (!dojo._hasResource["openils.widget.FlattenerFilterDialog"]) { dojo.declare( "openils.widget.FlattenerFilterDialog", [ dijit.Dialog, openils.widget.FlattenerFilterPane - ] + ], { + "constructor": function() { + dojo.connect( + this, "postCreate", this, + function() { + /* Of course I don't *want* to hardcode 400px below, + * but without some kind of maxHeight, this dialog + * can just grow forever, until it's no longer + * possible to access the close button on the top or + * the buttons at the bottom. */ + dojo.style( + this.domNode, { + "maxHeight": "400px", "overflow": "auto" + } + ); + } + ); + } + } ); } diff --git a/Open-ILS/web/js/dojo/openils/widget/PCrudFilterPane.js b/Open-ILS/web/js/dojo/openils/widget/PCrudFilterPane.js index 9aaa0b1832..e19099ae09 100644 --- a/Open-ILS/web/js/dojo/openils/widget/PCrudFilterPane.js +++ b/Open-ILS/web/js/dojo/openils/widget/PCrudFilterPane.js @@ -526,6 +526,7 @@ if (!dojo._hasResource['openils.widget.PCrudFilterPane']) { var widg = new constr({ "fmClass": this.selected_field_fm_class, "fmField": this.selected_field_fm_field, + "noDisablePkey": true, "parentNode": dojo.create("span", {}, this.value_slot), "dijitArgs": {"scrollOnFocus": false} }); -- 2.11.0