diff options
| author | luccioman <luccioman@users.noreply.github.com> | 2017-10-12 07:16:19 +0200 |
|---|---|---|
| committer | luccioman <luccioman@users.noreply.github.com> | 2017-10-12 07:16:19 +0200 |
| commit | 8303e15419e789cad94b94a1d65e00f9627cd5f1 (patch) | |
| tree | d0fcf936286efece8a87da0c3400e3eaa2a373c5 /htroot/yacysearchtrailer.html | |
| parent | 2ac78e2cca3d04b894a65452f56adf0bc6e07550 (diff) | |
Reduced number of search navigators refresh requests in JS resort mode
The SearchEvent listen to changes on each of its navigators, and the
information about their overall state is sent with each fetched search
item (as a "data-nav-generation" attribute). Then the browser can
regularly fetch a fresh version of yacysearchtrailer.html only if
necessary (when that nav-generation value change).
Diffstat (limited to 'htroot/yacysearchtrailer.html')
| -rw-r--r-- | htroot/yacysearchtrailer.html | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/htroot/yacysearchtrailer.html b/htroot/yacysearchtrailer.html index ca6f9c4cf..4c134e4c4 100644 --- a/htroot/yacysearchtrailer.html +++ b/htroot/yacysearchtrailer.html @@ -43,7 +43,8 @@ #(/resource-select)# <p class="navbutton"></p> -<div class="btn-group btn-group-justified"> +<div id="rankingButtons" class="btn-group btn-group-justified" data-nav-generation="#[nav-generation]#"> + <!-- data-nav-generation attribute helps the browser know whether the search navigators have to be refreshed --> <div class="btn-group btn-group-xs"><button type="button" id="sort_button_context" class="btn btn-default" onclick="document.getElementById('search').value=document.getElementById('search').value.replace(' /date','');document.searchform.submit();">Context Ranking</button></div> <div class="btn-group btn-group-xs"><button type="button" id="sort_button_date" class="btn btn-default" onclick="document.getElementById('search').value=document.getElementById('search').value + ' /date';document.searchform.submit();">Sort by Date</button></div> </div> |
