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() {
|
function toggleRefine() {
|
||||||
document.getElementsByClassName("box refine")[0].style.display = document.getElementsByClassName("box refine")[0].style.display == "none" ? "block" : "none";
|
var refine_form = document.getElementsByClassName("box refine")[0];
|
||||||
return 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
|
// @license-end
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
{{block search_button() }}
|
{{block search_button() }}
|
||||||
<input class="form-input search-box" name="q" placeholder="{{ T("search")}}" type="text" value="{{Search.NameLike}}">
|
<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 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}}
|
{{end}}
|
||||||
{{block search_refine() }}
|
{{block search_refine() }}
|
||||||
<h3>{{ T("refine_search") }}</h3>
|
<h3>{{ T("refine_search") }}</h3>
|
||||||
|
|
|
@ -19,10 +19,10 @@
|
||||||
<div class="h-right">
|
<div class="h-right">
|
||||||
{{ include "layouts/partials/helpers/badgemenu" }}
|
{{ include "layouts/partials/helpers/badgemenu" }}
|
||||||
<div class="h-search">
|
<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_common() }}
|
||||||
{{ yield search_button() }}
|
{{ yield search_button() }}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Référencer dans un nouveau ticket