mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-14 08:58:05 +00:00
adding modal warning field
This commit is contained in:
parent
2a2a527c2a
commit
80d5a5b92f
@ -1577,6 +1577,22 @@ ol.toptrends-list {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.modal-warn {
|
||||
display: none;
|
||||
background: #fffbc3;
|
||||
font-size: 0.8em;
|
||||
padding: 10px;
|
||||
border: 3px solid #fff;
|
||||
}
|
||||
|
||||
.modal-warn-close {
|
||||
float:right;
|
||||
font-size: 1.2em;
|
||||
color: #e34f42;
|
||||
cursor: pointer;
|
||||
margin: -8px;
|
||||
}
|
||||
|
||||
.modal-wrapper .modal-content {
|
||||
background: #fff;
|
||||
overflow-y: auto;
|
||||
|
@ -422,6 +422,10 @@
|
||||
<span class="modal-back"><</span>
|
||||
<span class="mark-all-as-read"></span>
|
||||
</div>
|
||||
<div class="modal-warn">
|
||||
<span class="modal-warn-close">×</span>
|
||||
<span class="warn-text"></span>
|
||||
</div>
|
||||
<div class="modal-content"></div>
|
||||
<div class="modal-blackout"></div>
|
||||
</div>
|
||||
|
@ -57,6 +57,10 @@ function openModal(modal) {
|
||||
|
||||
if (modal.title)
|
||||
modal.self.find('.modal-header h3').html(modal.title);
|
||||
if (modal.warn)
|
||||
modal.self.find('.modal-warn')
|
||||
.show()
|
||||
.find('.warn-text').html(modal.warn);
|
||||
if (modal.content)
|
||||
modal.content = modal.self.find('.modal-content')
|
||||
.append(modal.content);
|
||||
@ -610,12 +614,11 @@ function openFollowersModal(peerAlias) {
|
||||
var modal = openModal({
|
||||
classAdd: 'followers-modal',
|
||||
content: twister.tmpl.followersList.clone(true),
|
||||
title: title
|
||||
title: title,
|
||||
warn: txtAlert
|
||||
});
|
||||
|
||||
appendFollowersToElem(modal.content.find('ol'), followers);
|
||||
|
||||
alertPopup({txtMessage: txtAlert});
|
||||
}
|
||||
|
||||
function appendFollowersToElem(list, followers) {
|
||||
@ -1537,7 +1540,7 @@ function postExpandFunction(e, postLi) {
|
||||
var originalLi = $('<li/>', {class: 'module post original'}).appendTo(itemOl)
|
||||
.append(originalPost);
|
||||
|
||||
setPostImagePreview(postExpandedContent, originalPost.find('a[rel="nofollow"]'));
|
||||
setPostImagePreview(postExpandedContent, originalPost.find('a[rel^="nofollow"]'));
|
||||
|
||||
postExpandedContent.slideDown('fast');
|
||||
|
||||
@ -2517,6 +2520,8 @@ function initInterfaceCommon() {
|
||||
|
||||
$('.modal-back').on('click', function() {history.back();});
|
||||
|
||||
$('.modal-warn-close').on('click', function() {$(this).closest('.modal-warn').hide()});
|
||||
|
||||
$('.prompt-close').on('click', closePrompt);
|
||||
|
||||
$('button.follow').on('click', clickFollow);
|
||||
|
Loading…
Reference in New Issue
Block a user