js函数重构

This commit is contained in:
guange 2015-09-11 15:03:20 +08:00
parent e9f9dd44b9
commit ca8f943a97
1 changed files with 8 additions and 1 deletions

View File

@ -124,7 +124,8 @@ $(function(){
$('#textarea_input_test').focus();
});
$("#BluePopupBox a.BlueCirBtn").on('click', function(){
var saveProgramAnswers = function() {
var test_numbers = 0;
var valid = true;
var input = null;
@ -159,6 +160,12 @@ $(function(){
$('.program-input').remove();
var html=bt('t:program-input-list',data);
$("input[name=homework_type]").after(html);
}
return valid;
}
$("#BluePopupBox a.BlueCirBtn").on('click', function(){
if(saveProgramAnswers()){
if($( "#BluePopupBox" ).dialog( "isOpen" )){
$("#BluePopupBox").dialog( "close" );
}