mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 06:55:46 +01:00
fixed the chat modal
This commit is contained in:
@@ -141,15 +141,10 @@ footer.footer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#chat-content {
|
#chat-content {
|
||||||
width:95%;
|
|
||||||
height:200px;
|
height:200px;
|
||||||
resize:none;
|
resize:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#chat-message-input {
|
|
||||||
width:95%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#content{
|
#content{
|
||||||
padding-bottom:20px;
|
padding-bottom:20px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
$('#upload-progress-bar').css('width', '0%');
|
$('#upload-progress-bar').css('width', '0%');
|
||||||
$('#upload-progress-box').show();
|
$('#upload-progress-box').show();
|
||||||
|
$('#upload-progress-box').removeClass('hide');
|
||||||
|
|
||||||
if(!$('#userPhotoInput').val()) {
|
if(!$('#userPhotoInput').val()) {
|
||||||
error('select an image to upload!');
|
error('select an image to upload!');
|
||||||
@@ -159,6 +160,7 @@ $(document).ready(function() {
|
|||||||
updateImages();
|
updateImages();
|
||||||
|
|
||||||
$('#change-picture-modal').modal('show');
|
$('#change-picture-modal').modal('show');
|
||||||
|
$('#change-picture-modal').removeClass('hide');
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
@@ -197,6 +199,7 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
$('#change-picture-modal').modal('hide');
|
$('#change-picture-modal').modal('hide');
|
||||||
$('#upload-picture-modal').modal('show');
|
$('#upload-picture-modal').modal('show');
|
||||||
|
$('#upload-picture-modal').removeClass('hide');
|
||||||
|
|
||||||
hideAlerts();
|
hideAlerts();
|
||||||
|
|
||||||
|
|||||||
@@ -281,17 +281,16 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('.topic-buttons').delegate('.chat', 'click', function(e) {
|
$('.topic-buttons').delegate('.chat', 'click', function(e) {
|
||||||
var username = $(this).parents('li').attr('data-username');
|
var username = $(this).parents('li.row').attr('data-username');
|
||||||
var touid = $(this).parents('li').attr('data-uid');
|
var touid = $(this).parents('li.row').attr('data-uid');
|
||||||
|
|
||||||
if(username === app.username || !app.username)
|
if(username === app.username || !app.username)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
require(['chat'], function(chat) {
|
require(['chat'], function(chat) {
|
||||||
var chatModal = chat.createModalIfDoesntExist(username, touid);
|
var chatModal = chat.createModalIfDoesntExist(username, touid);
|
||||||
chatModal.show();
|
chatModal.modal();
|
||||||
chat.bringModalToTop(chatModal);
|
chat.bringModalToTop(chatModal); // I don't think this is necessary
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -14,17 +14,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="chat-modal" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
||||||
|
<div id="chat-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
<h3 id="myModalLabel">Chat with <span id="chat-with-name"></span></h3>
|
<h3 id="myModalLabel">Chat with <span id="chat-with-name"></span></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<textarea id="chat-content" cols="40" rows="10" readonly></textarea><br/>
|
<textarea class="form-control" id="chat-content" cols="40" rows="10" readonly></textarea><br/>
|
||||||
<input id="chat-message-input" type="text" name="chat-message" placeholder="type chat message here press enter to send"/><br/>
|
<input id="chat-message-input" type="text" class="form-control" name="chat-message" placeholder="type chat message, here press enter to send"/>
|
||||||
<button type="button" id="chat-message-send-btn" href="#" class="btn btn-primary">Send</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" id="chat-message-send-btn" href="#" class="btn btn-primary btn-lg btn-block
|
||||||
|
">Send</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div><!-- /.modal-content -->
|
||||||
|
</div><!-- /.modal-dialog -->
|
||||||
|
</div><!-- /.modal -->
|
||||||
|
|
||||||
|
|
||||||
<div id="alert_window"></div>
|
<div id="alert_window"></div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user