From 50b68d6696d6be2668c4f44a0a346ea4989bc852 Mon Sep 17 00:00:00 2001 From: Isaiah Coleman Date: Thu, 21 Nov 2024 16:25:09 -0500 Subject: [PATCH] Fixing combobox by hooking in the select hooks. Fix for search toggle. UI updates --- pn-site/facetbrowse.html | 10 ++++++++-- pn-site/js/combobox.js | 1 + pn-site/js/guidesearch.js | 10 +++++----- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/pn-site/facetbrowse.html b/pn-site/facetbrowse.html index 88b91e4b..663f5847 100644 --- a/pn-site/facetbrowse.html +++ b/pn-site/facetbrowse.html @@ -183,19 +183,25 @@ } + .facet-widget input#id-idno, .facet-widget input#id-volume, .facet-widget select[name=TRANSC] { + + float: right; + + } + #text-search-widget select, #text-search-widget input, #img-select input{ float: none; } - #place-selector input{ + #place-selector .custom-combobox { width: 63%; } - #nome-selector input{ + #nome-selector .custom-combobo { width: 63%; diff --git a/pn-site/js/combobox.js b/pn-site/js/combobox.js index cfcf1c57..83b38121 100644 --- a/pn-site/js/combobox.js +++ b/pn-site/js/combobox.js @@ -36,6 +36,7 @@ this._trigger( "select", event, { item: ui.item.option }); + window.setTimeout(info.papyri.thill.guidesearch.tidyQueryString, 10); }, autocompletechange: "_removeIfInvalid" diff --git a/pn-site/js/guidesearch.js b/pn-site/js/guidesearch.js index 76a95934..43f5c605 100644 --- a/pn-site/js/guidesearch.js +++ b/pn-site/js/guidesearch.js @@ -179,7 +179,7 @@ $(document).ready( } - var combos = $(".combobox"); + var combos = $(".custom-combobox"); for(var m = 0; m < combos.length; m++){ @@ -205,7 +205,7 @@ $(document).ready( var fel = filteredels[k]; var name = $(fel).attr("name"); - var val = $(fel).attr("value"); + var val = $(fel).val(); // workaround for jQuery hidden field blindness if(typeof name == 'undefined' || typeof val == 'undefined'){ @@ -217,7 +217,7 @@ $(document).ready( at v.handle (jquery-3.7.1.min.js:2:38006) */ name = fel.attr("name"); - val = fel.attr("value"); + val = fel.val(); } val = val.replace(/\s*\(\d+\)\s*$/, ""); @@ -544,7 +544,7 @@ $(document).ready( ); $("#search-toggle").unbind('click'); - $("#search-toggle").on("click", () => hic.hideSearch({ delay:325 })); + $("#search-toggle").on("click", { delay:325 }, hic.hideSearch); $.cookie(hic.COOKIE, null); } @@ -707,7 +707,7 @@ $(document).ready( $("#text-search-widget").find("input[name='target']").on("click", hic.configureSearchSettings); // select substring as default $("#substring").trigger('click'); - $(".toggle-open").on("click", () => hic.hideSearch({ delay: 325 })); + $(".toggle-open").on("click", { delay: 325 }, hic.hideSearch); $(".toggle-closed").on("click", hic.showSearch); $("#vals-and-records-wrapper").width(hic.getValsAndRecordsWidth("init")); hic.positionTogglePointer();