Skip to content

Commit

Permalink
Float the "send message" container to the right (openhab#105)
Browse files Browse the repository at this point in the history
Otherwise, the container will be displayed directly under the aside navigation
container, if it hasn't enough items to "move" the "send message" container
to the right. This is inconsistent behaviour dependant on the number of devices
the user has registered.

With the float to right, the "send message" container is always visible on the
right side of the page.
  • Loading branch information
FlorianSW authored and digitaldan committed May 27, 2017
1 parent 5484be9 commit d8703be
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
3 changes: 3 additions & 0 deletions public/css/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,9 @@ nav#projectsNav ul li a {
#projectsNavAlt ul li a:hover{text-decoration:none;}
/* single project v2 */

#deviceSendMessage {
float: right;
}


section#projectImages {
Expand Down
15 changes: 15 additions & 0 deletions uncss.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var uncss = require('uncss');

var files = ['http://localhost:3000'],
options = {
ignoreSheets : [/bootstrap/],
};

uncss(files, options, function (error, output) {
console.log(output);
});

/* Look Ma, no options! */
uncss(files, function (error, output) {
console.log(output);
});
6 changes: 3 additions & 3 deletions views/devices.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@
</table>
<% } %>
</div>
<div class="span9">
<% if (userDevices.length > 0 ) { %>
<% if (userDevices.length > 0 ) { %>
<div class="span9" id="deviceSendMessage">
<h3>Send a message to this device</h3>
<div class="divider"><span></span></div>
<form method="post" action="/devices/<%=userDevices[selectedDeviceArrayId].id%>/sendmessage">
<input type="hidden" name="_csrf" value="<%= token %>">
<textarea id="messagetext" name="messagetext" maxlength="250" rows="4"></textarea>
<button type="submit" class="btn">Send message</button>
</form>
<% } %>
</div>
<% } %>
</div>
</div>
</div>
Expand Down

0 comments on commit d8703be

Please sign in to comment.