Design changes

This commit is contained in:
Mattias Erming 2014-04-26 21:56:04 +02:00
parent 4952a11e10
commit 88e694d0c1
3 changed files with 15 additions and 17 deletions

View File

@ -49,7 +49,9 @@
{{partial "#users"}} {{partial "#users"}}
</div> </div>
<div class="messages"> <div class="messages">
<button class="show-more">Show more</button> <div class="show-more">
<button class="show-more-button">Show more</button>
</div>
{{partial "#messages"}} {{partial "#messages"}}
</div> </div>
<form onSubmit="return false;"> <form onSubmit="return false;">
@ -72,7 +74,7 @@
</script> </script>
<script type="text/html" id="messages"> <script type="text/html" id="messages">
{{#slice messages limit="100"}} {{#slice messages limit="200"}}
<div class="msg {{type}}"> <div class="msg {{type}}">
<span class="time"> <span class="time">
{{time}} {{time}}

View File

@ -84,12 +84,11 @@ $(function() {
.tabComplete({after: " ", list: commands}) .tabComplete({after: " ", list: commands})
.inputHistory({submit: true}) .inputHistory({submit: true})
.end() .end()
.find(".messages")
.scrollGlue({speed: 400})
.end()
.find(".hidden") .find(".hidden")
.prev(".show-more") .prev(".show-more")
.show() .show()
.parent()
.scrollGlue({speed: 400})
.end(); .end();
sidebar.html(render("#networks", {networks: data.networks})) sidebar.html(render("#networks", {networks: data.networks}))
@ -155,11 +154,10 @@ $(function() {
}); });
}); });
chat.on("click", ".show-more", function() { chat.on("click", ".show-more-button", function() {
var btn = $(this); var more = $(this).parent();
btn.replaceWith($.parseHTML( var html = $.parseHTML(more.next(".hidden").remove().html());
btn.next(".hidden").remove().html() more.replaceWith(html);
));
}); });
sidebar.on("click", ".channel", function(e) { sidebar.on("click", ".channel", function(e) {

View File

@ -16,12 +16,6 @@ h2 {
font: inherit; font: inherit;
margin: 0; margin: 0;
} }
ul,
li {
list-style: none;
margin: 0;
padding: 0;
}
.user { .user {
background: none; background: none;
border: 0; border: 0;
@ -136,7 +130,11 @@ li {
} }
#chat .show-more { #chat .show-more {
display: none; display: none;
margin-left: 14px; padding: 2px 8px 0 16px;
}
#chat .show-more-button {
padding: 6px 0;
width: 100%;
} }
#chat .msg { #chat .msg {
border-left: 8px solid transparent; border-left: 8px solid transparent;