Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
SAK-44248 use blockUI to prevent user from mashing Question Progress …
Browse files Browse the repository at this point in the history
  • Loading branch information
ottenhoff authored Sep 30, 2020
1 parent 842f955 commit 1e31b17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion samigo/samigo-app/src/webapp/js/questionProgress.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@

questionProgress.disableLink = function(link) {
link.style.display = 'none';
link.parentNode.firstChild.style.display = 'inline-block';
link.parentNode.firstChild.style.display = 'inline-block'; // This displays the loading.gif spinner
$.blockUI({ message: '<h3>' + please_wait + ' <img src="/library/image/sakai/spinner.gif" /></h3>', overlayCSS: { backgroundColor: '#ccc', opacity: 0.25} });
return true;
};
}( window.questionProgress = window.questionProgress || {}, jQuery )) ;
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<f:verbatim><p class="progressItem"></f:verbatim>
<h:panelGroup styleClass="#{((question.number eq delivery.questionIndex+1) and (part.number eq delivery.partIndex+1)) ? 'currentQuestion' : ''} #{((delivery.navigation eq '1') and ((part.number le delivery.partIndex+1 and question.number lt delivery.questionIndex+1) or (part.number lt delivery.partIndex+1))) ? 'linearPastQuestion' : ''}">
<h:graphicImage alt="Loading question..." url="/images/loading.gif" style="display:none;padding-left:1em;"/>
<h:commandLink title="#{question.strippedText} (#{question.pointsDisplayString}#{question.roundedMaxPoints} #{deliveryMessages.pt})" action="#{delivery.gotoQuestion}" rendered="#{delivery.navigation eq '2'}" onmouseup="questionProgress.disableLink(this); serializeImagePoints();">
<h:commandLink title="#{question.strippedText} (#{question.pointsDisplayString}#{question.roundedMaxPoints} #{deliveryMessages.pt})" action="#{delivery.gotoQuestion}" rendered="#{delivery.navigation eq '2'}" onclick="questionProgress.disableLink(this); serializeImagePoints();">
<h:outputText escape="false" value="#{question.sequence} " >
<f:convertNumber maxFractionDigits="2"/>
</h:outputText>
Expand Down

0 comments on commit 1e31b17

Please sign in to comment.