mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
fixing up the post window to extend the body when opened, so it doesn't clip stuff
This commit is contained in:
@@ -21,6 +21,15 @@
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
background: #fdfdfd;
|
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 {
|
.none {
|
||||||
@@ -72,6 +81,7 @@ footer.footer {
|
|||||||
left: 0px;
|
left: 0px;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
background: white;
|
background: white;
|
||||||
|
z-index: 1500;
|
||||||
|
|
||||||
input {
|
input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -100,9 +100,10 @@ var socket,
|
|||||||
reply_title = reply_title || document.getElementById('reply_title');
|
reply_title = reply_title || document.getElementById('reply_title');
|
||||||
post_content = post_content || document.getElementById('post_content');
|
post_content = post_content || document.getElementById('post_content');
|
||||||
|
|
||||||
|
|
||||||
post_window = post_window || document.getElementById('post_window');
|
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') {
|
if (post_mode == 'topic') {
|
||||||
post_title.style.display = "block";
|
post_title.style.display = "block";
|
||||||
@@ -149,7 +150,7 @@ var socket,
|
|||||||
'topic_id' : topic_id,
|
'topic_id' : topic_id,
|
||||||
'content' : content
|
'content' : content
|
||||||
});
|
});
|
||||||
jQuery(post_window).slideToggle(250);
|
jQuery(post_window).slideDown(250);
|
||||||
|
|
||||||
};
|
};
|
||||||
app.post_topic = function(category_id) {
|
app.post_topic = function(category_id) {
|
||||||
@@ -175,6 +176,7 @@ var socket,
|
|||||||
|
|
||||||
jQuery('#post_title, #post_content').val('');
|
jQuery('#post_title, #post_content').val('');
|
||||||
jQuery(post_window).slideToggle(250);
|
jQuery(post_window).slideToggle(250);
|
||||||
|
$(document.body).addClass('composing');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,15 @@
|
|||||||
right_menu.appendChild(loginEl);
|
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>
|
</script>
|
||||||
<!-- END Forum Info -->
|
<!-- END Forum Info -->
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="btn-group" style="float: right; margin-right: -12px">
|
<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 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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user