From 5998fd562dc87a676ab2fa0e20d47e836065d899 Mon Sep 17 00:00:00 2001 From: Darren Date: Mon, 29 Oct 2012 19:34:23 +0000 Subject: [PATCH] Client: Pasting multiple lines --- client/assets/css/style.css | 14 +++++++++----- client/assets/dev/view.js | 7 +++++-- client/index.html | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/client/assets/css/style.css b/client/assets/css/style.css index 500cec4..4190677 100644 --- a/client/assets/css/style.css +++ b/client/assets/css/style.css @@ -10,15 +10,18 @@ a img { border:none; } #kiwi { overflow:hidden; position:relative; height:100%; - font-family:Arial, Helvetica, sans-serif; - font-size:14px; line-height:1.4em; background: url(../img/background-light.png) left top repeat-x #E3E3E3; color: #555555; } +#kiwi, #kiwi input, #kiwi textarea { + font-family:Arial, Helvetica, sans-serif; + font-size:14px; line-height:1.4em; +} + -#kiwi input { +#kiwi input, textarea { box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5),0 1px 0px rgba(255, 255, 255, 0.3); border: none; border-radius: 3px; @@ -165,11 +168,12 @@ a img { border:none; } right:7px; left: 12.2em; height:1.7em; } -#controlbox .input input { +#controlbox .input .inp { border: medium none; box-shadow: none; border-radius: 0; - outline:none; + outline:none; resize:none; + overflow:hidden; position:relative; height:100%; width:100%; } diff --git a/client/assets/dev/view.js b/client/assets/dev/view.js index d140cb3..0b3eed2 100644 --- a/client/assets/dev/view.js +++ b/client/assets/dev/view.js @@ -623,7 +623,7 @@ kiwi.view.TopicBar = Backbone.View.extend({ kiwi.view.ControlBox = Backbone.View.extend({ events: { - 'keydown input.inp': 'process', + 'keydown .inp': 'process', 'click .nick': 'showNickChange' }, @@ -672,13 +672,16 @@ kiwi.view.ControlBox = Backbone.View.extend({ inp_val = inp_val.trim(); if (inp_val) { - this.processInput(inp_val); + $.each(inp_val.split('\n'), function (idx, line) { + that.processInput(line); + }); this.buffer.push(inp_val); this.buffer_pos = this.buffer.length; } inp.val(''); + return false; break; diff --git a/client/index.html b/client/index.html index ab95be9..b5f8cfe 100644 --- a/client/index.html +++ b/client/index.html @@ -45,7 +45,7 @@
-
+
-- 2.25.1