Skip to content

Commit

Permalink
Fixed issue #08914: Allow to click next/submit more than once
Browse files Browse the repository at this point in the history
Dev: strangely [active] selector don't seem to work on some browser (chromium 27)
Dev: use class is the quickest way to have it for whole browser ...
  • Loading branch information
Shnoulle committed Mar 29, 2014
1 parent 5c4ba36 commit 30c43b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/survey_runtime.js
Expand Up @@ -83,8 +83,12 @@ function setJsVar(){
}
// Deactivate all other button on submit
function limesurveySubmitHandler(){
$(document).on("click",".disabled",function(){return false;});
// Return false disallow all other system
$(document).on("click",".disabled",function(){return false});
$(document).on("click",'.active',function(){return false;});// "[active]" don't seem to work with jquery-1.10.2

$(document).on('click',".button", function(event){
$(this).prop('active',true).addClass('active');
$(".button.ui-button" ).not($(this)).button( "option", "disabled", true );
$(".button").not($(this)).prop('disabled',true).addClass('disabled');
});
Expand All @@ -107,6 +111,7 @@ function needConfirmHandler(){
}
$(".button.ui-button" ).button( "option", "disabled", false );
$(".button").prop('disabled',false).removeClass('disabled');
$(this).prop('active',false).removeClass('active');
return false;
});
}
Expand Down

0 comments on commit 30c43b6

Please sign in to comment.