Merge branch 'develop'
commit
5dd6d822d2
@ -1,20 +0,0 @@
|
|||||||
define('persona/chats', ['components', 'forum/chats'], function(components, coreChats) {
|
|
||||||
var Chats = {};
|
|
||||||
|
|
||||||
Chats.init = function() {
|
|
||||||
var env = utils.findBootstrapEnvironment();
|
|
||||||
if (ajaxify.data.hasOwnProperty('roomId') && (env === 'sm' || env === 'xs')) {
|
|
||||||
app.openChat(ajaxify.data.roomId, ajaxify.data.uid);
|
|
||||||
}
|
|
||||||
components.get('chat/recent').on('click', '[component="chat/recent/room"]', function(e) {
|
|
||||||
env = utils.findBootstrapEnvironment();
|
|
||||||
if (env === 'xs' || env === 'sm') {
|
|
||||||
app.openChat($(this).attr('data-roomid'));
|
|
||||||
} else {
|
|
||||||
coreChats.switchChat($(this).attr('data-roomid'));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return Chats;
|
|
||||||
});
|
|
@ -0,0 +1,32 @@
|
|||||||
|
<!-- IF roomId -->
|
||||||
|
<div component="chat/messages" class="expanded-chat" data-roomid="{roomId}">
|
||||||
|
<button type="button" class="close" data-action="pop-out"><span aria-hidden="true"><i class="fa fa-compress"></i></span><span class="sr-only">[[modules:chat.pop-out]]</span></button>
|
||||||
|
<button class="close controlsToggle" component="expanded-chat/controlsToggle"><i class="fa fa-gear"></i></button>
|
||||||
|
|
||||||
|
<div class="controls hide" component="expanded-chat/controls">
|
||||||
|
<!-- IF showUserInput -->
|
||||||
|
<div class="users-tag-container">
|
||||||
|
<input class="users-tag-input" type="text" class="form-control" placeholder="[[modules:chat.add-users-to-room]]" tabindex="4"/>
|
||||||
|
</div>
|
||||||
|
<!-- ENDIF showUserInput -->
|
||||||
|
|
||||||
|
<input class="form-control" component="chat/room/name" value="{roomName}" <!-- IF !isOwner -->disabled<!-- ENDIF !isOwner -->/>
|
||||||
|
<hr />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="chat-content">
|
||||||
|
<!-- IMPORT partials/chats/messages.tpl -->
|
||||||
|
</ul>
|
||||||
|
<div class="input-group">
|
||||||
|
<textarea component="chat/input" placeholder="[[modules:chat.placeholder]]" class="form-control chat-input mousetrap" rows="1" <!-- IF !canReply -->readonly<!-- ENDIF !canReply -->></textarea>
|
||||||
|
<span class="input-group-btn">
|
||||||
|
<button class="btn btn-primary" type="button" data-action="send" <!-- IF !canReply -->disabled<!-- ENDIF !canReply -->>[[modules:chat.send]]</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span component="chat/message/length">0</span>/<span>{maximumChatMessageLength}</span>
|
||||||
|
</div>
|
||||||
|
<!-- ELSE -->
|
||||||
|
<div class="alert alert-info">
|
||||||
|
[[modules:chat.no-messages]]
|
||||||
|
</div>
|
||||||
|
<!-- ENDIF roomId -->
|
Loading…
Reference in New Issue