junekeunsong hace 4 años
padre
commit
db58417db2

+ 1 - 1
src/main/java/com/lemon/lifecenter/controller/PatientController.java

@@ -78,7 +78,7 @@ public class PatientController extends LifeCenterController {
             @RequestParam(value="page", required=false, defaultValue="1") int page,
             
             @RequestParam(value="sortType", required=false, defaultValue="patient_name") String sortType,
-            @RequestParam(value="sort", required=false, defaultValue="asc") String sort,
+            @RequestParam(value="sort", required=false, defaultValue="desc") String sort,
             
             HttpServletRequest request,HttpServletResponse response) {
         

+ 17 - 34
src/main/webapp/WEB-INF/jsp/mobile/login/login.jsp

@@ -8,7 +8,7 @@ $( function(){
     $( "#ex_select" ).siblings('label').text( $( "#ex_select" ).children('option:selected').text() );
     
     $.validator.addMethod('selectcheck', function (value) {
-    	console.log( value );
+        console.log( value );
         return (value != "0" );
     }, "" );
     
@@ -71,27 +71,11 @@ $( function(){
 
 
 
-//     $( "#locationList" ).on( "change", function(){
-//         if($('#locationList > option:selected').val() != "0") {
-//             console.log($('#locationList').val());
-// //             $('#centerDiv').css("display", "block");
+    $( "#locationList" ).on( "change", function(){
+        if($('#locationList > option:selected').val() != "0") {
+            console.log($('#locationList').val());
+//             $('#centerDiv').css("display", "block");
 
-<<<<<<< HEAD
-//             $( "#centerList option" ).hide();
-//             if ($( "#centerList 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();
-//             }
-//         } else {
-//             $( "#centerList option" ).show();
-//             $("#centerLabel").text("치료센터 선택");
-//         }
-//     });
-=======
             $( "#centerList option:not([value='0'])" ).appendTo( "#hideList" );
             
             if ($( "#hideList option[accessKey='"+$('#locationList').val()+"']" ).length == 0) {
@@ -103,12 +87,11 @@ $( function(){
                 $( "#hideList option[accessKey='"+$('#locationList').val()+"']" ).appendTo( "#centerList" );
             }
         } else {
-        	$( "#centerList option:not([value='0'])" ).appendTo( "#hideList" );
+            $( "#centerList option:not([value='0'])" ).appendTo( "#hideList" );
             $( "#hideList option" ).appendTo( "#centerList" );
             $("#centerLabel").text("치료센터 선택");
         }
     });
->>>>>>> refs/remotes/origin/databank
 });
 
 
@@ -137,17 +120,17 @@ function autoLogin(){
                         <img src="/resources/images/mobile/login_visual.png" />
                     </div>
                     <div class="form">
-<!--                         <div class="part"> -->
-<!--                             <div class="selectbox"> -->
-<!--                                 <label for="locationList">전체</label> -->
-<!--                                 <select id="locationList" name="locationCode"> -->
-<!--                                     <option value="0" selected>전체</option> -->
-<%--                                     <c:forEach var="i" items="${locationList}"> --%>
-<%--                                         <option value="${i.locationCode}"> · <c:out value="${i.locationName}" /></option>  --%>
-<%--                                     </c:forEach> --%>
-<!--                                 </select> -->
-<!--                             </div> -->
-<!--                         </div> -->
+                        <div class="part">
+                            <div class="selectbox">
+                                <label for="locationList">전체</label>
+                                <select id="locationList" name="locationCode">
+                                    <option value="0" selected>전체</option>
+                                    <c:forEach var="i" items="${locationList}">
+                                        <option value="${i.locationCode}"> · <c:out value="${i.locationName}" /></option> 
+                                    </c:forEach>
+                                </select>
+                            </div>
+                        </div>
                         <div class="part" id="centerDiv">
                             <div class="selectbox">
                                 <label for="centerList" id="centerLabel">치료센터 선택</label>

+ 2 - 2
src/main/webapp/WEB-INF/jsp/patient/list.jsp

@@ -218,8 +218,8 @@ tr.phr-info td span.no-data{color:#999999;}
                                                         <div class="col-5">
                                                             <div class="form-group mb-xl-0">
                                                                 <select class="custom-select form-control" id="sort" name="sort">
-                                                                    <option value="desc" <c:if test="${sort eq 'asc'}">selected="selected"</c:if>>내림차순</option>
-                                                                    <option value="asc" <c:if test="${sort eq 'desc'}">selected="selected"</c:if>>오름차순</option>
+                                                                    <option value="desc" <c:if test="${sort eq 'desc'}">selected="selected"</c:if>>내림차순</option>
+                                                                    <option value="asc" <c:if test="${sort eq 'asc'}">selected="selected"</c:if>>오름차순</option>
                                                                 </select>
                                                             </div>
                                                         </div>