From db7c09260f5a460b9694e02a4de3713ee500a6e2 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 24 Feb 2018 20:42:30 +0530 Subject: [PATCH] Feat:Add feedback button --- public/css/styles.css | 7 +++++++ public/js/chat.js | 11 ++++++++++- views/chat.hbs | 18 ++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/public/css/styles.css b/public/css/styles.css index b93ba49e..a37ff6aa 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -14,6 +14,9 @@ margin-bottom: 2.5px; margin-top: 2.5px; } +.feed{ + font-size: 2em; +} .white-text { color: white; @@ -72,8 +75,12 @@ .ui.mini.modal { margin-top: -5%; + text-align: center; } +#feedBtn{ + margin-left:10px; +} #msgs .one .right, #msgs .one .left { position: relative; diff --git a/public/js/chat.js b/public/js/chat.js index 5eb746d7..ace15c2e 100644 --- a/public/js/chat.js +++ b/public/js/chat.js @@ -15,6 +15,7 @@ let newbtn = document.querySelector('#newbtn'); let close = document.querySelector('#close'); let cancel = document.querySelector('#cancel'); + let cancelFeed = document.querySelector('#cancelFeed'); socket.emit('privateRoom', { "room": "private room" }); @@ -85,12 +86,20 @@ let confirm = document.querySelector('#confirm'); confirm.classList.add('visible'); }); + feedBtn.addEventListener('click', () => { + let feedback = document.querySelector('#feedback'); + feedback.classList.add('visible'); + }); cancel.addEventListener('click', () => { let confirm = document.querySelector('#confirm'); confirm.classList.remove('visible'); }); - + cancelFeed.addEventListener('click', () => { + let confirmFeedback = document.querySelector('#feedback') + confirmFeedback.classList.remove('visible'); + }); + close.addEventListener('click', () => { let confirm = document.querySelector('#confirm'); message.classList.add('hide'); diff --git a/views/chat.hbs b/views/chat.hbs index ba1122e8..8e768761 100644 --- a/views/chat.hbs +++ b/views/chat.hbs @@ -46,6 +46,10 @@ Send +