Make refine button submit form if refine dropdown doesn't exist (#1149)
* Update site.jet.html * Update main.js * remove onload * Update main.js
Cette révision appartient à :
Parent
4adf0774eb
révision
acf0ae0fad
3 fichiers modifiés avec 7 ajouts et 5 suppressions
|
@ -87,7 +87,9 @@ function playVoice() {
|
|||
}
|
||||
|
||||
function toggleRefine() {
|
||||
document.getElementsByClassName("box refine")[0].style.display = document.getElementsByClassName("box refine")[0].style.display == "none" ? "block" : "none";
|
||||
return 0;
|
||||
var refine_form = document.getElementsByClassName("box refine")[0];
|
||||
refine_form.type = "button";
|
||||
if(refine_form != "undefined") refine.style.display = refine.style.display == "none" ? "block" : "none";
|
||||
else document.getElementById("header-form").submit();
|
||||
}
|
||||
// @license-end
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
{{block search_button() }}
|
||||
<input class="form-input search-box" name="q" placeholder="{{ T("search")}}" type="text" value="{{Search.NameLike}}">
|
||||
<button type="submit" class="form-input icon-search"></button>
|
||||
<button type="submit" class="form-input refine" name="refine" onclick="toggleRefine();" onload="this.type='button';">{{ T("refine")}}</button>
|
||||
<button type="submit" class="form-input refine" name="refine" onclick="toggleRefine();">{{ T("refine")}}</button>
|
||||
{{end}}
|
||||
{{block search_refine() }}
|
||||
<h3>{{ T("refine_search") }}</h3>
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
<div class="h-right">
|
||||
{{ include "layouts/partials/helpers/badgemenu" }}
|
||||
<div class="h-search">
|
||||
<form role="search" action="{{URL.Parse("/search")}}" method="get">
|
||||
<form role="search" action="{{URL.Parse("/search")}}" id="header-form" method="get">
|
||||
{{ yield search_common() }}
|
||||
{{ yield search_button() }}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Référencer dans un nouveau ticket