mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-25 02:18:51 +00:00
Updated conversation send button
This commit is contained in:
parent
48e7109db4
commit
b513814e8a
@ -25,8 +25,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#conversationsElem .create-message-form .btn {
|
#conversationsElem .create-message-form .btn {
|
||||||
padding-left: 6px;
|
padding-left: 8px;
|
||||||
padding-right:6px;
|
padding-right:8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#conversationsElem .create-message-form .btn.btn-add-image {
|
#conversationsElem .create-message-form .btn.btn-add-image {
|
||||||
|
@ -180,12 +180,18 @@ ComunicWeb.components.conversations.chatWindows = {
|
|||||||
//Add send button
|
//Add send button
|
||||||
var sendButton = createElem2({
|
var sendButton = createElem2({
|
||||||
appendTo: buttonGroup,
|
appendTo: buttonGroup,
|
||||||
type: "input",
|
type: "button",
|
||||||
class: "btn btn-primary btn-flat",
|
class: "btn btn-primary btn-flat",
|
||||||
elemType: "submit",
|
elemType: "submit",
|
||||||
value: "Send",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Add send icon
|
||||||
|
createElem2({
|
||||||
|
appendTo: sendButton,
|
||||||
|
type: "i",
|
||||||
|
class: "fa fa-send-o",
|
||||||
|
});
|
||||||
|
|
||||||
//Prevent textarea from adding a new line when pressing enter
|
//Prevent textarea from adding a new line when pressing enter
|
||||||
$(inputText).keypress(function(event){
|
$(inputText).keypress(function(event){
|
||||||
if(event.keyCode == 13){
|
if(event.keyCode == 13){
|
||||||
@ -575,7 +581,6 @@ ComunicWeb.components.conversations.chatWindows = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Lock send button
|
//Lock send button
|
||||||
form.sendButton.value = "Sending";
|
|
||||||
form.sendButton.disabled = true;
|
form.sendButton.disabled = true;
|
||||||
|
|
||||||
//Prepare what to do next
|
//Prepare what to do next
|
||||||
@ -586,7 +591,6 @@ ComunicWeb.components.conversations.chatWindows = {
|
|||||||
ComunicWeb.common.notificationSystem.showNotification("An error occured while trying to send message! Please try again...", "danger", 2);
|
ComunicWeb.common.notificationSystem.showNotification("An error occured while trying to send message! Please try again...", "danger", 2);
|
||||||
|
|
||||||
//Unlock send button
|
//Unlock send button
|
||||||
form.sendButton.value = "Send";
|
|
||||||
form.sendButton.disabled = false;
|
form.sendButton.disabled = false;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -643,7 +647,6 @@ ComunicWeb.components.conversations.chatWindows = {
|
|||||||
var form = infos.box.sendMessageForm;
|
var form = infos.box.sendMessageForm;
|
||||||
|
|
||||||
//Unlock send button and reset its value
|
//Unlock send button and reset its value
|
||||||
form.sendButton.value = "Send";
|
|
||||||
form.sendButton.disabled = false;
|
form.sendButton.disabled = false;
|
||||||
|
|
||||||
//Empty textarea
|
//Empty textarea
|
||||||
|
Loading…
Reference in New Issue
Block a user