Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Fix wrong JS variable name & some css stuff (#1151)

* Update main.js

* remove workaround that doesn't work

* Update torrents.jet.html

* Update search_handler.go

* Update search.jet.html

* Update main.js

* Update main.js

* Update search_handler.go

* Update main.js
Cette révision appartient à :
kilo 2017-07-10 09:33:26 +02:00 révisé par ewhal
Parent 83c352c724
révision 06442da77f
4 fichiers modifiés avec 12 ajouts et 7 suppressions

Voir le fichier

@ -56,7 +56,7 @@ func SearchHandler(c *gin.Context) {
searchForm := newSearchForm(c) searchForm := newSearchForm(c)
searchForm.TorrentParam, searchForm.Category = searchParam, category searchForm.TorrentParam, searchForm.Category = searchParam, category
if c.Request.URL.Path == "/" { if c.Query("refine") == "" {
searchForm.ShowRefine = false searchForm.ShowRefine = false
} }

Voir le fichier

@ -86,10 +86,15 @@ function playVoice() {
} }
} }
var refine_button = document.getElementsByClassName("box refine")[0];
refine_button.type = "button";
function toggleRefine() { function toggleRefine() {
var refine_form = document.getElementsByClassName("box refine")[0]; if(refine_button != "undefined") {
refine_form.type = "button"; refine_button.style.display = refine_button.style.display == "none" ? "block" : "none";
if(refine_form != "undefined") refine.style.display = refine.style.display == "none" ? "block" : "none"; if(document.getElementsByClassName("form-input refine-searchbox")[0].value == "")
document.getElementsByClassName("form-input refine-searchbox")[0].value = document.getElementsByClassName("form-input search-box")[0].value;
}
else document.getElementById("header-form").submit(); else document.getElementById("header-form").submit();
} }
// @license-end // @license-end

Voir le fichier

@ -17,8 +17,8 @@
<form style="display: grid;" method="GET" action=""> <form style="display: grid;" method="GET" action="">
<input type="hidden" name="c" value="{{Search.Category}}"/> <input type="hidden" name="c" value="{{Search.Category}}"/>
<input type="hidden" name="userID" value="{{Search.UserID}}"/> <input type="hidden" name="userID" value="{{Search.UserID}}"/>
<input type="hidden" name="q" value="{{Search.NameLike}}"/> <span class="form-refine">Search for: <input type="text" class="form-input refine-searchbox" size="30" name="q" value="{{Search.NameLike}}"/></span>
<span class="form-refine">Show <select name="s" class="form-input" style="margin-right: 8px;"> <span class="form-refine">Show: <select name="s" class="form-input" style="margin-right: 8px;">
- <option value="0">{{ T("show_all")}}</option> - <option value="0">{{ T("show_all")}}</option>
- <option value="2" {{if Search.Status == 2}}selected{{end}}>{{ T("filter_remakes")}}</option> - <option value="2" {{if Search.Status == 2}}selected{{end}}>{{ T("filter_remakes")}}</option>
- <option value="3" {{if Search.Status == 3}}selected{{end}}>{{ T("trusted")}}</option> - <option value="3" {{if Search.Status == 3}}selected{{end}}>{{ T("trusted")}}</option>

Voir le fichier

@ -38,7 +38,7 @@
{{torrent.Name}} {{torrent.Name}}
</a> </a>
</td> </td>
<td class="tr-links user-td"> <td class="tr-links home-td">
<a href="{{torrent.Magnet}}" title="{{ T("magnet_link") }}"> <a href="{{torrent.Magnet}}" title="{{ T("magnet_link") }}">
<div class="icon-magnet"></div> <div class="icon-magnet"></div>
</a> </a>