From 026881a29c0feeaa797eadf14bf097a5ff3438ef Mon Sep 17 00:00:00 2001 From: David Cormier Date: Sat, 9 Nov 2013 12:40:27 -0500 Subject: [PATCH] Revert "Split messages with newline into multiple messages" This reverts commit 6dd35fa890123cc31b77055e38453e5f4a6c67d6. The commit breaks support for chrome. --- css/glowingbear.css | 6 ++---- directives/input.html | 5 ++--- js/websockets.js | 15 +-------------- 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/css/glowingbear.css b/css/glowingbear.css index b44c71a..983c98d 100644 --- a/css/glowingbear.css +++ b/css/glowingbear.css @@ -105,10 +105,8 @@ body { padding-bottom:70px; } -#sendMessage { +input#sendMessage { width: 100%; - height: 36px; - resize: none; } #footer button { border-radius: 0; @@ -116,7 +114,7 @@ body { .panel input, .panel .input-group { max-width: 300px; } -input[type=text], input[type=password], #sendMessage, .badge { +input[type=text], input[type=password], .badge { border: 0; border-radius: 0; color: #ccc; diff --git a/directives/input.html b/directives/input.html index 181748f..43fd60d 100644 --- a/directives/input.html +++ b/directives/input.html @@ -1,7 +1,6 @@ -
+
- + diff --git a/js/websockets.js b/js/websockets.js index db1d9af..ff222c2 100644 --- a/js/websockets.js +++ b/js/websockets.js @@ -731,11 +731,7 @@ weechat.directive('inputBar', function() { // Send the message to the websocket $scope.sendMessage = function() { - // Split the command into multiple commands based on line breaks - var commands = $scope.command.split(/\r?\n/); - commands.forEach(function(c) { - connection.sendMessage(c); - }); + connection.sendMessage($scope.command); $scope.command = ""; } @@ -812,15 +808,6 @@ weechat.directive('inputBar', function() { 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; - } - - } }