implemented check on numbner of batches and the bug found
git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/branches/portlets/user/PerformFISH-Apps/1.3@178573 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5a4188eec0
commit
bad5b895e0
|
@ -30,7 +30,7 @@ function closeAndReload() {
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
checkBatchesThreshold = function (theButton, endpoint, farmId, batchType) {
|
checkBatchesThreshold = function (theButton, endpoint, farmId, batchType, farmIdEncoded, batchTypeEncoded) {
|
||||||
$(theButton).html('<i class="icon-cog"> checking batches, please wait ...');
|
$(theButton).html('<i class="icon-cog"> checking batches, please wait ...');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : endpoint,
|
url : endpoint,
|
||||||
|
@ -45,7 +45,7 @@ $(function () {
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
var content = JSON.parse(data);
|
var content = JSON.parse(data);
|
||||||
if (content.success == "OK") {
|
if (content.success == "OK") {
|
||||||
location.href='${AnalyticalToolkitPortletEndpoint}?${batchTypeParamEncoded}=${batchTypeEncoded}&${farmIdParamEncoded}=${farmIdEncoded}';
|
location.href='${AnalyticalToolkitPortletEndpoint}?${batchTypeParamEncoded}='+batchTypeEncoded+'&${farmIdParamEncoded}='+farmIdEncoded;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$(theButton).html('<i class="icon-warning-sign">' + content.message);
|
$(theButton).html('<i class="icon-warning-sign">' + content.message);
|
||||||
|
@ -176,13 +176,10 @@ $(function () {
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
<div style="display: inline;">
|
<div style="display: inline;">
|
||||||
<button class="btn" type="button"
|
<button class="btn" type="button"
|
||||||
onClick="checkBatchesThreshold(this, '${checkBatchesThresholdURL}', '${farmId}', '${form.batchType}')">
|
onClick="checkBatchesThreshold(this, '${checkBatchesThresholdURL}', '${farmId}', '${form.batchType}', '${farmIdEncoded}', '${batchTypeEncoded}')">
|
||||||
Analyse
|
Analyse
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<%-- <button class="btn" type="button" ${buttonDisabled} --%>
|
|
||||||
<%-- onClick="">Analyse </button> --%>
|
|
||||||
|
|
||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|
Loading…
Reference in New Issue