Skip to content

Commit

Permalink
Fixing combobox by hooking in the select hooks. Fix for search toggle…
Browse files Browse the repository at this point in the history
…. UI updates
  • Loading branch information
iccole committed Nov 21, 2024
1 parent eb163e0 commit 50b68d6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
10 changes: 8 additions & 2 deletions pn-site/facetbrowse.html
Original file line number Diff line number Diff line change
Expand Up @@ -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%;

Expand Down
1 change: 1 addition & 0 deletions pn-site/js/combobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
this._trigger( "select", event, {
item: ui.item.option
});
window.setTimeout(info.papyri.thill.guidesearch.tidyQueryString, 10);
},

autocompletechange: "_removeIfInvalid"
Expand Down
10 changes: 5 additions & 5 deletions pn-site/js/guidesearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ $(document).ready(

}

var combos = $(".combobox");
var combos = $(".custom-combobox");

for(var m = 0; m < combos.length; m++){

Expand All @@ -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'){
Expand All @@ -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*$/, "");
Expand Down Expand Up @@ -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);

}
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 50b68d6

Please sign in to comment.