1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-07 07:56:23 +00:00
This commit is contained in:
Loic Blot 2014-10-05 10:28:21 +00:00
parent 922a5bf853
commit 89b9082e11
3 changed files with 37 additions and 5 deletions

View File

@ -44,8 +44,29 @@
color: #333;
}
#app-content {
#app-content-wrapper {
padding: 15px;
margin-top: 70px;
}
#app-content-header {
background-color: #E6E6E6;
min-height: 30px;
width: 100%;
float: left;
position: fixed;
top: 45px;
padding: 15px;
}
#ocsms-phone-label {
font-weight: bold;
color: #555;
}
#ocsms-phone-opt-number {
color: #999;
padding-left: 15px;
}
.msg-sent, .msg-recv {

View File

@ -34,7 +34,7 @@ var refreshConversation = function() {
conversationBuf = formatConversation(jsondata);
if (conversationBuf != '') {
$('.msg-endtag').before(conversationBuf);
$('#app-content').scrollTop(1E10);
$('#app-content-wrapper').scrollTop(1E10);
}
}
);
@ -48,9 +48,17 @@ function fetchConversation(phoneNumber) {
function(jsondata, status) {
conversationBuf = formatConversation(jsondata);
conversationBuf += '<div class="msg-endtag"></div>';
if (typeof jsondata['contactName'] == 'undefined') {
$('#ocsms-phone-label').html(phoneNumber);
$('#ocsms-phone-opt-number').html('');
}
else {
$('#ocsms-phone-label').html(jsondata['contactName']);
$('#ocsms-phone-opt-number').html(phoneNumber);
}
$('#app-content').html(conversationBuf);
$('#app-content').scrollTop(1E10);
$('#app-content-wrapper').html(conversationBuf);
$('#app-content-wrapper').scrollTop(1E10);
curPhoneNumber = phoneNumber;
}

View File

@ -8,8 +8,11 @@
<ul>
</ul>
</div>
<div id="app-content">
<div id="app-content-header">
<div id="ocsms-phone-label"></div>
<div id="ocsms-phone-opt-number"></div>
</div>
<div id="app-content-wrapper">
No conversation loaded
</div>