Revert "Split messages with newline into multiple messages"
This reverts commit 6dd35fa890
.
The commit breaks support for chrome.
This commit is contained in:
parent
52630d7901
commit
026881a29c
|
@ -105,10 +105,8 @@ body {
|
||||||
padding-bottom:70px;
|
padding-bottom:70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sendMessage {
|
input#sendMessage {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 36px;
|
|
||||||
resize: none;
|
|
||||||
}
|
}
|
||||||
#footer button {
|
#footer button {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
@ -116,7 +114,7 @@ body {
|
||||||
.panel input, .panel .input-group {
|
.panel input, .panel .input-group {
|
||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
}
|
}
|
||||||
input[type=text], input[type=password], #sendMessage, .badge {
|
input[type=text], input[type=password], .badge {
|
||||||
border: 0;
|
border: 0;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<form class="form form-horizontal" id="inputform" ng-submit="sendMessage()">
|
<form class="form form-horizontal" ng-submit="sendMessage()">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<textarea id="sendMessage" class="form-control monospace" ng-trim="false" rows="1" autocomplete="off" ng-model="command" autofocus>
|
<input id="sendMessage" type="text" class="form-control monospace" autocomplete="off" ng-model="command" autofocus>
|
||||||
</textarea>
|
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button class="btn btn-default btn-primary">Send</button>
|
<button class="btn btn-default btn-primary">Send</button>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -731,11 +731,7 @@ weechat.directive('inputBar', function() {
|
||||||
|
|
||||||
// Send the message to the websocket
|
// Send the message to the websocket
|
||||||
$scope.sendMessage = function() {
|
$scope.sendMessage = function() {
|
||||||
// Split the command into multiple commands based on line breaks
|
connection.sendMessage($scope.command);
|
||||||
var commands = $scope.command.split(/\r?\n/);
|
|
||||||
commands.forEach(function(c) {
|
|
||||||
connection.sendMessage(c);
|
|
||||||
});
|
|
||||||
$scope.command = "";
|
$scope.command = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -812,15 +808,6 @@ weechat.directive('inputBar', function() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enter to submit, shift-enter for newline
|
|
||||||
if (code == 13 && !$event.shiftKey) {
|
|
||||||
$event.preventDefault();
|
|
||||||
// Prevent inprog
|
|
||||||
setTimeout(function() {$('#inputform').submit();},0);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue