Skip to content

Node.js based forum software built for the modern web

Merge branch 'master' of github.com:designcreateplay/NodeBB fixing missing height in post-window, removed for some reason

Julian Lam81cfe0c8d043
diff --cc public/css/style.less
index 53e4d8688e,ebe23677f2..b3ade8d0b5
--- a/public/css/style.less
+++ b/public/css/style.less
@@@ -504,11 -504,9 +504,11 @@@ body .navbar .nodebb-inline-block
.post-window {
position: fixed;
bottom: 45px;
- height: 450px;
display: none;
++ height: 450px;
> div {
+ position: absolute;
height: 100%;
background: rgba(64, 64, 64, 0.6);
@@@ -528,7 -522,7 +528,7 @@@
input {
width: 100%;
text-align: center;
-- background: rgba(255, 255, 255, 0.9);
++ background: rgba(255, 255, 255, 0.5);
border: none;
padding: 0.5em 0;
-webkit-border-radius: 0px;
diff --cc public/src/modules/composer.js
index 0d5445fb1e,9137ec6bd3..feff528dc8
--- a/public/src/modules/composer.js
+++ b/public/src/modules/composer.js
@@@ -156,20 -238,15 +238,23 @@@ define(['taskbar'], function(taskbar)
}
composer.load = function(post_uuid) {
- var post_data = composer.posts[post_uuid],
+ var post_data = composer.posts[post_uuid],
titleEl = composer.postContainer.querySelector('input'),
bodyEl = composer.postContainer.querySelector('textarea'),
- dropDiv = $(composer.postContainer).find('#imagedrop');
+ postWindowEl = composer.postContainer.querySelector('.span5'),
+ taskbarBtn = document.querySelector('#taskbar [data-uuid="' + post_uuid + '"]'),
+ btnRect = taskbarBtn.getBoundingClientRect(),
+ taskbarRect = document.getElementById('taskbar').getBoundingClientRect(),
++ dropDiv = $(composer.postContainer).find('#imagedrop'),
+ windowRect, leftPos;
+ dropDiv.html('Drag and drop images here').hide();
+
composer.postContainer.style.display = 'block';
- // composer.postContainer.style.bottom = composer.btnContainer.offsetHeight + "px";
+ windowRect = postWindowEl.getBoundingClientRect();
+ leftPos = btnRect.left + btnRect.width - windowRect.width;
+ postWindowEl.style.left = (leftPos > 0 ? leftPos : 0) + 'px';
+ composer.postContainer.style.bottom = taskbarRect.height + "px";
composer.postContainer.setAttribute('data-uuid', post_uuid);
if (parseInt(post_data.tid) > 0) {
titleEl.value = 'Replying to: ' + post_data.title;