|
@@ -8,6 +8,7 @@ $( function(){
|
|
|
$( "#ex_select" ).siblings('label').text( $( "#ex_select" ).children('option:selected').text() );
|
|
|
|
|
|
$.validator.addMethod('selectcheck', function (value) {
|
|
|
+ console.log( value );
|
|
|
return (value != "0" );
|
|
|
}, "" );
|
|
|
|
|
@@ -19,9 +20,6 @@ $( function(){
|
|
|
pw : {
|
|
|
required: true
|
|
|
},
|
|
|
- locationCode : {
|
|
|
- selectcheck : true
|
|
|
- },
|
|
|
centerCode : {
|
|
|
selectcheck : true
|
|
|
}
|
|
@@ -78,17 +76,19 @@ $( function(){
|
|
|
console.log($('#locationList').val());
|
|
|
// $('#centerDiv').css("display", "block");
|
|
|
|
|
|
- $( "#centerList option" ).hide();
|
|
|
- if ($( "#centerList option[accessKey='"+$('#locationList').val()+"']" ).length == 0) {
|
|
|
+ $( "#centerList option:not([value='0'])" ).appendTo( "#hideList" );
|
|
|
+
|
|
|
+ if ($( "#hideList option[accessKey='"+$('#locationList').val()+"']" ).length == 0) {
|
|
|
$("#centerLabel").text("등록된 생활치료센터가 없습니다.");
|
|
|
// var option = "<option value='99' selected>등록된 생활치료센터가 없습니다.</option>";
|
|
|
// $('#centerList').append(option);
|
|
|
} else {
|
|
|
$("#centerLabel").text("치료센터 선택");
|
|
|
- $( "#centerList option[accessKey='"+$('#locationList').val()+"']" ).show();
|
|
|
+ $( "#hideList option[accessKey='"+$('#locationList').val()+"']" ).appendTo( "#centerList" );
|
|
|
}
|
|
|
} else {
|
|
|
- $( "#centerList option" ).show();
|
|
|
+ $( "#centerList option:not([value='0'])" ).appendTo( "#hideList" );
|
|
|
+ $( "#hideList option" ).appendTo( "#centerList" );
|
|
|
$("#centerLabel").text("치료센터 선택");
|
|
|
}
|
|
|
});
|
|
@@ -140,6 +140,8 @@ function autoLogin(){
|
|
|
<option value="${i.centerCode}" accessKey="${i.locationCode}"> · <c:out value="${i.centerName}" /></option>
|
|
|
</c:forEach>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="hideList" style="display:none;"></select>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="part">
|