fixing up the post window to extend the body when opened, so it doesn't clip stuff

v1.18.x
Julian Lam 12 years ago
parent 2ca1986b40
commit 2acd40a8bb

@ -21,6 +21,15 @@
body {
background: #fdfdfd;
-webkit-transition: margin-bottom 250ms ease;
-moz-transition: margin-bottom 250ms ease;
-ms-transition: margin-bottom 250ms ease;
-o-transition: margin-bottom 250ms ease;
transition: margin-bottom 250ms ease;
&.composing {
margin-bottom: 350px;
}
}
.none {
@ -72,6 +81,7 @@ footer.footer {
left: 0px;
bottom: 0px;
background: white;
z-index: 1500;
input {
width: 100%;

@ -100,9 +100,10 @@ var socket,
reply_title = reply_title || document.getElementById('reply_title');
post_content = post_content || document.getElementById('post_content');
post_window = post_window || document.getElementById('post_window');
jQuery(post_window).slideToggle(250);
jQuery(post_window).slideDown(250);
$(document.body).addClass('composing');
if (post_mode == 'topic') {
post_title.style.display = "block";
@ -149,7 +150,7 @@ var socket,
'topic_id' : topic_id,
'content' : content
});
jQuery(post_window).slideToggle(250);
jQuery(post_window).slideDown(250);
};
app.post_topic = function(category_id) {
@ -175,6 +176,7 @@ var socket,
jQuery('#post_title, #post_content').val('');
jQuery(post_window).slideToggle(250);
$(document.body).addClass('composing');
};

@ -76,6 +76,15 @@
right_menu.appendChild(loginEl);
}
});
// Post window events
var postWindowEl = document.getElementById('post_window'),
discardEl = document.getElementById('discard-post');
discardEl.addEventListener('click', function() {
$(postWindowEl).slideToggle(250);
$(document.body).removeClass('composing');
}, false);
}());
</script>
<!-- END Forum Info -->

@ -64,7 +64,7 @@
</div>
<div class="btn-group" style="float: right; margin-right: -12px">
<span id="submit_post_btn" class="btn" onclick="app.post_topic()"><i class="icon-ok"></i> Submit</span>
<span class="btn" onclick="jQuery(post_window).slideToggle(250);"><i class="icon-remove"></i> Discard</span>
<span class="btn" id="discard-post"><i class="icon-remove"></i> Discard</span>
</div>
</div>

Loading…
Cancel
Save