Make sure chat-info msgs are not auto-removed
This commit is contained in:
parent
18fc903563
commit
c845d11f26
@ -194,11 +194,11 @@ ul.participant-list li.moderator {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-event, .chat-date, .chat-help {
|
.chat-event, .chat-date, .chat-info {
|
||||||
color: #808080;
|
color: #808080;
|
||||||
}
|
}
|
||||||
|
|
||||||
li.chat-help {
|
li.chat-info {
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
36
converse.js
36
converse.js
@ -368,7 +368,7 @@
|
|||||||
var $chat_content = this.$el.find('.chat-content'), i,
|
var $chat_content = this.$el.find('.chat-content'), i,
|
||||||
msgs_length = msgs.length;
|
msgs_length = msgs.length;
|
||||||
for (i=0; i<msgs_length; i++) {
|
for (i=0; i<msgs_length; i++) {
|
||||||
$chat_content.append($('<div class="chat-help">'+msgs[i]+'</div>'));
|
$chat_content.append($('<div class="chat-info">'+msgs[i]+'</div>'));
|
||||||
}
|
}
|
||||||
this.scrollDown();
|
this.scrollDown();
|
||||||
},
|
},
|
||||||
@ -499,20 +499,20 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
template: _.template(
|
template: _.template(
|
||||||
'<div class="chat-head chat-head-chatbox">' +
|
'<div class="chat-head chat-head-chatbox">' +
|
||||||
'<a class="close-chatbox-button">X</a>' +
|
'<a class="close-chatbox-button">X</a>' +
|
||||||
'<a href="{{url}}" target="_blank" class="user">' +
|
'<a href="{{url}}" target="_blank" class="user">' +
|
||||||
'<div class="chat-title"> {{ fullname }} </div>' +
|
'<div class="chat-title"> {{ fullname }} </div>' +
|
||||||
'</a>' +
|
'</a>' +
|
||||||
'<p class="user-custom-message"><p/>' +
|
'<p class="user-custom-message"><p/>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div class="chat-content"></div>' +
|
'<div class="chat-content"></div>' +
|
||||||
'<form class="sendXMPPMessage" action="" method="post">' +
|
'<form class="sendXMPPMessage" action="" method="post">' +
|
||||||
'<textarea ' +
|
'<textarea ' +
|
||||||
'type="text" ' +
|
'type="text" ' +
|
||||||
'class="chat-textarea" ' +
|
'class="chat-textarea" ' +
|
||||||
'placeholder="Personal message"/>'+
|
'placeholder="Personal message"/>'+
|
||||||
'</form>'),
|
'</form>'),
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
this.$el.attr('id', this.model.get('box_id'))
|
this.$el.attr('id', this.model.get('box_id'))
|
||||||
@ -645,9 +645,9 @@
|
|||||||
$.getJSON(portal_url + "/search-users?q=" + $(ev.target).find('input.username').val(), function (data) {
|
$.getJSON(portal_url + "/search-users?q=" + $(ev.target).find('input.username').val(), function (data) {
|
||||||
var $ul= $('.search-xmpp ul');
|
var $ul= $('.search-xmpp ul');
|
||||||
$ul.find('li.found-user').remove();
|
$ul.find('li.found-user').remove();
|
||||||
$ul.find('li.chat-help').remove();
|
$ul.find('li.chat-info').remove();
|
||||||
if (!data.length) {
|
if (!data.length) {
|
||||||
$ul.append('<li class="chat-help">No users found</li>');
|
$ul.append('<li class="chat-info">No users found</li>');
|
||||||
}
|
}
|
||||||
|
|
||||||
$(data).each(function (idx, obj) {
|
$(data).each(function (idx, obj) {
|
||||||
@ -1038,7 +1038,7 @@
|
|||||||
'click a.configure-chatroom-button': 'configureChatRoom',
|
'click a.configure-chatroom-button': 'configureChatRoom',
|
||||||
'keypress textarea.chat-textarea': 'keyPressed'
|
'keypress textarea.chat-textarea': 'keyPressed'
|
||||||
},
|
},
|
||||||
info_template: _.template('<div class="chat-event">{{message}}</div>'),
|
info_template: _.template('<div class="chat-info">{{message}}</div>'),
|
||||||
|
|
||||||
sendChatRoomMessage: function (body) {
|
sendChatRoomMessage: function (body) {
|
||||||
var match = body.replace(/^\s*/, "").match(/^\/(.*?)(?: (.*))?$/) || [false],
|
var match = body.replace(/^\s*/, "").match(/^\/(.*?)(?: (.*))?$/) || [false],
|
||||||
|
Loading…
Reference in New Issue
Block a user