From 9f162c0703c9bae4d82d4d25701f3dcf208127ad Mon Sep 17 00:00:00 2001 From: Soumya Himanish Mohapatra Date: Sat, 23 Dec 2017 08:50:19 +0530 Subject: [PATCH] Popup attached for delete Button --- app/templates/share.js | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/app/templates/share.js b/app/templates/share.js index abf5d018..24a204e9 100644 --- a/app/templates/share.js +++ b/app/templates/share.js @@ -65,7 +65,23 @@ module.exports = function(state, emit) { + onclick=${showPopup}>${state.translate('deleteFileButton')} + + `; + function showPopup() { + const popupText = document.querySelector('.popuptext'); + popupText.classList.add('show'); + } + + function cancel(e) { + e.stopPropagation(); + const popupText = e.target.parentElement.parentElement; + popupText.classList.remove('show'); + } + async function sendNew(e) { e.preventDefault(); await fadeOut('share-link');