Node.js based forum software built for the modern web
restyling composer window to be smaller widthwise attempted to fix vertical-alignment of post_window relative to taskbar
Julian Lam18c991fd4256
diff --git a/public/css/style.less b/public/css/style.lessindex fb614ba160..53e4d8688e 100644--- a/public/css/style.less+++ b/public/css/style.less@@ -508,6 +508,7 @@ body .navbar .nodebb-inline-block {display: none;> div {+ position: absolute;height: 100%;background: rgba(64, 64, 64, 0.6);diff --git a/public/src/modules/composer.js b/public/src/modules/composer.jsindex cc0ae8fbd0..fafaea1e49 100644--- a/public/src/modules/composer.js+++ b/public/src/modules/composer.js@@ -14,7 +14,7 @@ define(['taskbar'], function(taskbar) {composer.postContainer = document.createElement('div');composer.postContainer.className = 'post-window row-fluid';- composer.postContainer.innerHTML = '<div class="span10 offset1">' ++ composer.postContainer.innerHTML = '<div class="span5">' +'<input type="text" tabIndex="1" placeholder="Enter your topic title here..." />' +'<div class="btn-toolbar">' +'<div class="btn-group formatting-bar">' +@@ -158,10 +158,16 @@ define(['taskbar'], function(taskbar) {composer.load = function(post_uuid) {var post_data = composer.posts[post_uuid],titleEl = composer.postContainer.querySelector('input'),- bodyEl = composer.postContainer.querySelector('textarea');+ bodyEl = composer.postContainer.querySelector('textarea'),+ postWindowEl = composer.postContainer.querySelector('.span5'),+ taskbarBtn = document.querySelector('#taskbar [data-uuid="' + post_uuid + '"]'),+ btnRect = taskbarBtn.getBoundingClientRect(),+ windowRect;composer.postContainer.style.display = 'block';- // composer.postContainer.style.bottom = composer.btnContainer.offsetHeight + "px";+ windowRect = postWindowEl.getBoundingClientRect();+ postWindowEl.style.left = (btnRect.left + btnRect.width - windowRect.width) + 'px';+ composer.postContainer.style.bottom = btnRect.height + "px";composer.postContainer.setAttribute('data-uuid', post_uuid);if (parseInt(post_data.tid) > 0) {titleEl.value = 'Replying to: ' + post_data.title;