diff options
Diffstat (limited to 'pki')
4 files changed, 28 insertions, 19 deletions
diff --git a/pki/dogtag/ca-ui/shared/webapps/ca/agent/ca/queryCert.template b/pki/dogtag/ca-ui/shared/webapps/ca/agent/ca/queryCert.template index 4b2ff8e02..32f30d226 100644 --- a/pki/dogtag/ca-ui/shared/webapps/ca/agent/ca/queryCert.template +++ b/pki/dogtag/ca-ui/shared/webapps/ca/agent/ca/queryCert.template @@ -463,12 +463,13 @@ if (result.header.revokeAll != null) { if (result.header.queryFilterHash != null) { document.write(renderHidden("queryFilterHash")); } - -var disabled = (result.header.querySentinelDown == null) ? "disabled='true'" : ""; +var disabledDown = ((result.header.querySentinelDown == null) || + (result.fixed.maxCount+1 >= result.header.currentRecordCount)) ? "disabled='true'" : ""; +var disabledUp = (result.header.querySentinelUp != null && result.header.querySentinelUp <= 1) ? "disabled='true'" : ""; document.write( "<button NAME=begin onClick='doNext(this)' VALUE='|<<' width='72'>|<<</button>\n"+ -"<button NAME=up onClick='doNext(this)' VALUE='<' width='72'><</button>\n"+ +"<button "+disabledUp+" NAME=up onClick='doNext(this)' VALUE='<' width='72'><</button>\n"+ "<INPUT TYPE=hidden NAME=totalRecordCount VALUE='"+ result.header.totalRecordCount+ "'>\n"+ "<INPUT TYPE=hidden NAME=queryCertFilter VALUE='"+ @@ -484,8 +485,8 @@ result.header.direction+ "'>\n"+ "<INPUT style='padding-left: 2px;' TYPE=text SIZE=16 NAME=maxCount VALUE='"+ result.header.maxCount+ "'>\n"+ -"<button "+disabled+" NAME=down onClick='doNext(this)' VALUE='>' width='72'>></button>\n"+ -"<button "+disabled+" NAME=end onClick='doNext(this)' VALUE='>>|' width='72'>>>|</button>\n"+ +"<button "+disabledDown+" NAME=down onClick='doNext(this)' VALUE='>' width='72'>></button>\n"+ +"<button NAME=end onClick='doNext(this)' VALUE='>>|' width='72'>>>|</button>\n"+ "</FORM>\n"); } diff --git a/pki/dogtag/ca-ui/shared/webapps/ca/agent/ca/queryReq.template b/pki/dogtag/ca-ui/shared/webapps/ca/agent/ca/queryReq.template index 2a4279551..9fb63a109 100644 --- a/pki/dogtag/ca-ui/shared/webapps/ca/agent/ca/queryReq.template +++ b/pki/dogtag/ca-ui/shared/webapps/ca/agent/ca/queryReq.template @@ -397,12 +397,15 @@ var seqNum=parseInt(result.recordSet[result.recordSet.length-1].seqNum) + 1; //"<div align=center> \n"+ "<FORM NAME='nextForm' METHOD='POST' ACTION=''>\n"+ renderHidden("op")); -var disabled = ""; -//(result.header.seqNumFromDown== null) ? "disabled='true'" : ""; +var disabledDown = ((result.fixed.maxCount > result.header.currentRecordCount) || + (result.header.currentRecordCount == result.header.totalRecordCount)) ? + "disabled='true'" : ""; +var disabledUp = (result.header.firstEntryOnPage != null && + result.header.firstEntryOnPage <= 1) ? "disabled='true'" : ""; document.write( "<button NAME='begin' onClick='doNext(this)' VALUE='|<<' width='72'>|<<</button>\n"+ -"<button NAME='previous' onClick='doNext(this)' VALUE='<' width='72'><</button>\n"+ +"<button "+disabledUp+" NAME='previous' onClick='doNext(this)' VALUE='<' width='72'><</button>\n"+ "<INPUT TYPE='hidden' NAME='totalRecordCount' VALUE='"+ result.header.totalRecordCount+ "'>\n"+ "<INPUT TYPE='hidden' NAME='op' VALUE='"+ "queryReq"+ "'>\n"+ @@ -429,8 +432,8 @@ result.header.totalRecordCount+ "'>\n"+ document.write("<INPUT style='padding-left: 2px;' TYPE=text SIZE=16 NAME=maxCount VALUE='"+ result.fixed.maxCount+ "'>\n"+ -"<button "+disabled+" NAME='next' onClick='doNext(this)' VALUE='>' width='72'>></button>\n"+ -"<button "+disabled+" NAME='end' onClick='doNext(this)' VALUE='>>|' width='72'>>>|</button>\n"+ +"<button "+disabledDown+" NAME='next' onClick='doNext(this)' VALUE='>' width='72'>></button>\n"+ +"<button NAME='end' onClick='doNext(this)' VALUE='>>|' width='72'>>>|</button>\n"+ "</FORM>\n"); } } diff --git a/pki/dogtag/ca-ui/shared/webapps/ca/ee/ca/queryCert.template b/pki/dogtag/ca-ui/shared/webapps/ca/ee/ca/queryCert.template index d115a1e1f..a6dcf31f3 100644 --- a/pki/dogtag/ca-ui/shared/webapps/ca/ee/ca/queryCert.template +++ b/pki/dogtag/ca-ui/shared/webapps/ca/ee/ca/queryCert.template @@ -434,11 +434,13 @@ if (result.header.queryFilterHash != null) { document.write(renderHidden("queryFilterHash")); } -var disabled = (result.header.querySentinelDown == null) ? "disabled='true'" : ""; +var disabledDown = ((result.header.querySentinelDown == null) || + (result.fixed.maxCount+1 >= result.header.currentRecordCount)) ? "disabled='true'" : ""; +var disabledUp = (result.header.querySentinelUp != null && result.header.querySentinelUp <= 1) ? "disabled='true'" : ""; document.write( "<button NAME=begin onClick='doNext(this)' VALUE='|<<' width='72'>|<<</button>\n"+ -"<button NAME=up onClick='doNext(this)' VALUE='<' width='72'><</button>\n"+ +"<button "+disabledUp+" NAME=up onClick='doNext(this)' VALUE='<' width='72'><</button>\n"+ "<INPUT TYPE=hidden NAME=totalRecordCount VALUE='"+ result.header.totalRecordCount+ "'>\n"+ "<INPUT TYPE=hidden NAME=queryCertFilter VALUE='"+ @@ -454,8 +456,8 @@ result.header.direction+ "'>\n"+ "<INPUT style='padding-left: 2px;' TYPE=text SIZE=16 NAME=maxCount VALUE='"+ result.header.maxCount+ "'>\n"+ -"<button "+disabled+" NAME=down onClick='doNext(this)' VALUE='>' width='72'>></button>\n"+ -"<button "+disabled+" NAME=end onClick='doNext(this)' VALUE='>>|' width='72'>>>|</button>\n"+ +"<button "+disabledDown+" NAME=down onClick='doNext(this)' VALUE='>' width='72'>></button>\n"+ +"<button NAME=end onClick='doNext(this)' VALUE='>>|' width='72'>>>|</button>\n"+ "</FORM>\n"); } diff --git a/pki/dogtag/kra-ui/shared/webapps/kra/agent/kra/queryReq.template b/pki/dogtag/kra-ui/shared/webapps/kra/agent/kra/queryReq.template index 2a7072346..47db884fa 100644 --- a/pki/dogtag/kra-ui/shared/webapps/kra/agent/kra/queryReq.template +++ b/pki/dogtag/kra-ui/shared/webapps/kra/agent/kra/queryReq.template @@ -330,12 +330,15 @@ var seqNum=parseInt(result.recordSet[result.recordSet.length-1].seqNum) + 1; //"<div align=center> \n"+ "<FORM NAME='nextForm' METHOD='POST' ACTION=''>\n"+ renderHidden("op")); -var disabled = ""; -//(result.header.seqNumFromDown== null) ? "disabled='true'" : ""; +var disabledDown = ((result.fixed.maxCount > result.header.currentRecordCount) || + (result.header.currentRecordCount == result.header.totalRecordCount)) ? + "disabled='true'" : ""; +var disabledUp = (result.header.firstEntryOnPage != null && + result.header.firstEntryOnPage <= 1) ? "disabled='true'" : ""; document.write( "<button NAME='begin' onClick='doNext(this)' VALUE='|<<' width='72'>|<<</button>\n"+ -"<button NAME='previous' onClick='doNext(this)' VALUE='<' width='72'><</button>\n"+ +"<button "+disabledUp+" NAME='previous' onClick='doNext(this)' VALUE='<' width='72'><</button>\n"+ "<INPUT TYPE='hidden' NAME='totalRecordCount' VALUE='"+ result.header.totalRecordCount+ "'>\n"+ "<INPUT TYPE='hidden' NAME='op' VALUE='"+ "queryReq"+ "'>\n"+ @@ -362,8 +365,8 @@ result.header.totalRecordCount+ "'>\n"+ document.write("<INPUT style='padding-left: 2px;' TYPE=text SIZE=16 NAME=maxCount VALUE='"+ result.fixed.maxCount+ "'>\n"+ -"<button "+disabled+" NAME='next' onClick='doNext(this)' VALUE='>' width='72'>></button>\n"+ -"<button "+disabled+" NAME='end' onClick='doNext(this)' VALUE='>>|' width='72'>>>|</button>\n"+ +"<button "+disabledDown+" NAME='next' onClick='doNext(this)' VALUE='>' width='72'>></button>\n"+ +"<button NAME='end' onClick='doNext(this)' VALUE='>>|' width='72'>>>|</button>\n"+ "</FORM>\n"); } |