Browse Source

adding modal warning field

readme-update
erqan 8 years ago
parent
commit
80d5a5b92f
  1. 16
      css/style.css
  2. 4
      home.html
  3. 13
      js/interface_common.js

16
css/style.css

@ -1577,6 +1577,22 @@ ol.toptrends-list { @@ -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;

4
home.html

@ -422,6 +422,10 @@ @@ -422,6 +422,10 @@
<span class="modal-back">&lt;</span>
<span class="mark-all-as-read"></span>
</div>
<div class="modal-warn">
<span class="modal-warn-close">&times;</span>
<span class="warn-text"></span>
</div>
<div class="modal-content"></div>
<div class="modal-blackout"></div>
</div>

13
js/interface_common.js

@ -57,6 +57,10 @@ function openModal(modal) { @@ -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) { @@ -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) { @@ -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() { @@ -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…
Cancel
Save