fixed usability issue on accounts list page
This commit is contained in:
parent
fba6194f7f
commit
1c819ffb0b
2 changed files with 17 additions and 3 deletions
|
@ -8,6 +8,20 @@ function changeAction(form, url) {
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
// If filtering by role, make sure the role is included as a parameter (1) when the
|
||||||
|
// page count changes or (2) when the next or previous links are clicked.
|
||||||
|
if ( $('#roleFilterUri').val().length > 0 ) {
|
||||||
|
var roleURI = $('#roleFilterUri').val().substring($('#roleFilterUri').val().indexOf("=")+1);
|
||||||
|
roleURI = roleURI.replace("%3A%2F%2F","://").replace("%23","#").replace(/%2F/g,"/")
|
||||||
|
$('input#roleTypeContainer').val(roleURI);
|
||||||
|
var prevHref = $('a#previousPage').attr('href');
|
||||||
|
var nextHref = $('a#nextPage').attr('href');
|
||||||
|
prevHref += "&roleFilterUri=" + roleURI.replace("#","%23");
|
||||||
|
nextHref += "&roleFilterUri=" + roleURI.replace("#","%23");
|
||||||
|
$('a#previousPage').attr('href',prevHref);
|
||||||
|
$('a#nextPage').attr('href',nextHref);
|
||||||
|
}
|
||||||
|
|
||||||
//Accounts per page
|
//Accounts per page
|
||||||
//Hide if javascript is enabled
|
//Hide if javascript is enabled
|
||||||
$('input[name="accounts-per-page"]').addClass('hidden');
|
$('input[name="accounts-per-page"]').addClass('hidden');
|
||||||
|
|
|
@ -33,13 +33,13 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
${i18n().accounts_per_page} <input type="submit" name="accounts-per-page" value="${i18n().update_button}" /> |
|
${i18n().accounts_per_page} <input type="submit" name="accounts-per-page" value="${i18n().update_button}" /> |
|
||||||
|
<input id="roleTypeContainer" type="hidden" name="roleFilterUri" value="">
|
||||||
<#if page.previous?has_content>
|
<#if page.previous?has_content>
|
||||||
<a href="${formUrls.list}?accountsPerPage=${accountsPerPage}&pageIndex=${page.previous}" title="${i18n().previous}">${i18n().previous}</a> <!-- only present if current page is not 1.-->
|
<a id="previousPage" href="${formUrls.list}?accountsPerPage=${accountsPerPage}&pageIndex=${page.previous}" title="${i18n().previous}">${i18n().previous}</a> <!-- only present if current page is not 1.-->
|
||||||
</#if>
|
</#if>
|
||||||
${page.current} of ${page.last}
|
${page.current} of ${page.last}
|
||||||
<#if page.next?has_content>
|
<#if page.next?has_content>
|
||||||
<a href="${formUrls.list}?accountsPerPage=${accountsPerPage}&pageIndex=${page.next}" title="${i18n().next_capitalized}">${i18n().next_capitalized}</a><!-- only present if current page is not last page.-->
|
<a id="nextPage" href="${formUrls.list}?accountsPerPage=${accountsPerPage}&pageIndex=${page.next}" title="${i18n().next_capitalized}">${i18n().next_capitalized}</a><!-- only present if current page is not last page.-->
|
||||||
</#if>
|
</#if>
|
||||||
</nav>
|
</nav>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue