From eb410e2d7f0eb65033c522f74292e9ad50a8fec2 Mon Sep 17 00:00:00 2001 From: Chanjoo Lee Date: Tue, 4 Dec 2018 00:36:12 +0900 Subject: [PATCH 1/4] Add chat room screen - use socket.io library --- static/js/matching.js | 6 +++++- static/templates/chat_room.html | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 static/templates/chat_room.html diff --git a/static/js/matching.js b/static/js/matching.js index 10cada4..676345e 100644 --- a/static/js/matching.js +++ b/static/js/matching.js @@ -150,7 +150,7 @@ function matchingSearch() { // 요청(PUT) 결과를 카드뷰로 그리기 var myHTML = ''; for(i = 0; i < userJsonArr.length; i++) { - myHTML += '
' + + myHTML += '
' + '' + '
' + '

' + userJsonArr[i]['username'] + '

' + @@ -160,4 +160,8 @@ function matchingSearch() { '
'; } user_card.innerHTML = myHTML; +} + +function startChat() { + window.open('../templates/chat_room.html', 'chat_room_popup', 'width=400, height=600'); } \ No newline at end of file diff --git a/static/templates/chat_room.html b/static/templates/chat_room.html new file mode 100644 index 0000000..f8868f6 --- /dev/null +++ b/static/templates/chat_room.html @@ -0,0 +1,10 @@ + + + + + 채팅방 + + + + + \ No newline at end of file From f7242193372e222cbae5655ef34c67dcec3906ca Mon Sep 17 00:00:00 2001 From: Chanjoo Lee Date: Tue, 4 Dec 2018 04:24:19 +0900 Subject: [PATCH 2/4] =?UTF-8?q?Add=20chat=20room=20function=20-=20only=20f?= =?UTF-8?q?unctions=20-=20todo=20:=20=EC=8B=A4=EC=8B=9C=EA=B0=84=EC=9D=B4?= =?UTF-8?q?=20=EC=95=84=EB=8B=88=EB=8D=94=EB=9D=BC=EB=8F=84=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/matching.js | 4 ++-- static/templates/chat_room.html | 31 ++++++++++++++++++++++++++++++- static/templates/matching.html | 1 - 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/static/js/matching.js b/static/js/matching.js index 31e13ca..edcad97 100644 --- a/static/js/matching.js +++ b/static/js/matching.js @@ -150,7 +150,7 @@ function matchingSearch() { // 요청(PUT) 결과를 카드뷰로 그리기 var myHTML = ''; for(i = 0; i < userJsonArr.length; i++) { - myHTML += '
' + + myHTML += '
' + '' + '
' + '

' + userJsonArr[i]['username'] + '

' + @@ -163,5 +163,5 @@ function matchingSearch() { } function startChat() { - window.open('../templates/chat_room.html', 'chat_room_popup', 'width=400, height=600'); + window.open('../templates/chat_room.html', 'chat_room_popup', 'width=450, height=600'); } \ No newline at end of file diff --git a/static/templates/chat_room.html b/static/templates/chat_room.html index f8868f6..ce01545 100644 --- a/static/templates/chat_room.html +++ b/static/templates/chat_room.html @@ -2,9 +2,38 @@ - 채팅방 + 채팅하기 + +
    +
    + +
    + + + \ No newline at end of file diff --git a/static/templates/matching.html b/static/templates/matching.html index 3a83e79..514569c 100644 --- a/static/templates/matching.html +++ b/static/templates/matching.html @@ -152,7 +152,6 @@ - From 4d709261faa14d2fec647eab01d0d0280a6db49f Mon Sep 17 00:00:00 2001 From: Chanjoo Lee Date: Tue, 4 Dec 2018 04:56:19 +0900 Subject: [PATCH 3/4] Add additional functions - delete container view after registering user. --- static/css/business-casual.css | 8 +++ static/js/matching.js | 5 +- static/templates/matching.html | 111 ++++++++++++++++++--------------- 3 files changed, 74 insertions(+), 50 deletions(-) diff --git a/static/css/business-casual.css b/static/css/business-casual.css index edfff76..a934b20 100644 --- a/static/css/business-casual.css +++ b/static/css/business-casual.css @@ -242,4 +242,12 @@ img { border-radius: 5px 5px 0 0; height: auto; width: 300px; +} + +label { + margin-bottom: 10px; +} + +select { + margin-bottom: 10px; } \ No newline at end of file diff --git a/static/js/matching.js b/static/js/matching.js index edcad97..20a69d1 100644 --- a/static/js/matching.js +++ b/static/js/matching.js @@ -43,6 +43,7 @@ var locationJsonArr = [ ]; // 매칭 사용자 등록 +var register_container = document.getElementById('register_container'); var inputUserName = document.getElementById('user_name_set') var selectCompanySet = document.getElementById('sel_company_set'); var selectLocationSet = document.getElementById('sel_location_set'); @@ -53,7 +54,8 @@ var inputUserInfo = document.getElementById('user_info_set') var selectCompany = document.getElementById('sel_company'); var selectMajor = document.getElementById('sel_major'); var selectLocation = document.getElementById('sel_location'); -var user_card = document.getElementById('user_card') +var user_card = document.getElementById('user_card'); + // TODO : JSON 파싱해서 select의 option으로 넣어주기 for(var i = 0; i < companyJsonArr.length; i++) { @@ -98,6 +100,7 @@ function setMemeber() { data: myJSON, success: function (data) { //박스 사라짐 + register_container.style.display = 'none'; alert("사용자 등록을 완료했습니다. 이제 원하는 스터디원을 검색해보세요!") console.log("사용자 등록 성공"); }, diff --git a/static/templates/matching.html b/static/templates/matching.html index 514569c..ec8d9e0 100644 --- a/static/templates/matching.html +++ b/static/templates/matching.html @@ -30,8 +30,6 @@ - - InterviewNet
    소프트웨어 팀프로젝트 1팀
    @@ -79,64 +77,79 @@ - - -
    -
    -
    -
    -
    -

    다른 사용자에게 나를 알리세요!

    -
    + +
    +
    +
    +
    +
    +

    다른 사용자에게 나를 알리세요!

    +
    +
    +
    + +
    + +
    +
    + + +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    -
    - -
    - -
    -
    - - -
    -
    - - -
    - - -
    - -
    - -
    -
    -
    +
    + + +
    +
    +
    +
    +
    +

    원하는 지역과 직종을 선택하고, 동일 직종 사용자를 찾아보세요!

    +
    +
    +
    + + + +
    + + +
    + + +
    +
    +
    +
    + +
    -
    - - - -
    - - -
    - - -
    - -
    - +
    +
    -
    - +
    +