Merge pull request #698 from himanish-star/delete-btn-background-red

Popup for delete button attached
This commit is contained in:
Danny Coates 2018-01-09 10:58:50 -08:00 committed by GitHub
commit 9811a9a3e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 16 deletions

View File

@ -82,22 +82,23 @@ module.exports = function(state, emit) {
class="btn"
title="${state.translate('deleteFileButton')}"
onclick=${showPopup}>${state.translate('deleteFileButton')}
<div class="popup">
</button>
<div id="deletePopup" class="popup">
<div class="popuptext" onblur=${cancel} tabindex="-1">
<div class="popup-message">${state.translate(
'deletePopupText'
)}</div>
<div class="popup-message">${state.translate('deletePopupText')}
</div>
<div class="popup-action">
<span class="popup-no" onclick=${cancel}>${state.translate(
'deletePopupCancel'
)}</span>
)}
</span>
<span class="popup-yes" onclick=${deleteFile}>${state.translate(
'deletePopupYes'
)}</span>
)}
</span>
</div>
</div>
</div>
</button>
<a class="send-new"
data-state="completed"
href="/"
@ -113,7 +114,7 @@ module.exports = function(state, emit) {
function cancel(e) {
e.stopPropagation();
const popupText = e.target.parentElement.parentElement;
const popupText = document.querySelector('.popuptext');
popupText.classList.remove('show');
}

View File

@ -636,6 +636,11 @@ tbody {
color: #313131;
}
#deletePopup {
position: relative;
bottom: 50px;
}
#delete-file:hover {
background: #efeff1;
}