From 32c0312c7ec951eefd41d5b8a7a18cb5e608f65d Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 4 Oct 2012 09:20:07 -0400 Subject: [PATCH] removed resing event from jquery-terminal --- ChangeLog | 2 ++ README.md | 1 - lib/client/terminal.js | 16 ++++++++++------ .../terminal/jquery-terminal/jquery.terminal.css | 5 ++++- .../terminal/jquery-terminal/jquery.terminal.js | 7 +++---- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 83a922b1..72ac659b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,8 @@ started. * Added more demo mirrors to readme (appfog, cloudfoundry). +* Removed resing event from jquery-terminal. + 2012.10.01, Version 0.1.7 diff --git a/README.md b/README.md index 827f0315..4bcc82b9 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,6 @@ we moves to *limited mode*. Limited-mode features --------------- -- only 1 panel available - no keybinding - no local caching - full loading of all web page(with styles, js-scripts, html-page etc). diff --git a/lib/client/terminal.js b/lib/client/terminal.js index 7fbf605b..2a86fd6c 100644 --- a/lib/client/terminal.js +++ b/lib/client/terminal.js @@ -28,21 +28,25 @@ var CloudCommander, $; Util.jsload('lib/client/socket.js'); - var lLoadTerm_func = function(){ + var lLoadTerm_func = function(){ Util.jsload('lib/client/terminal/jquery-terminal/jquery.terminal.js', function(){ init(); - + $(function($, undefined) { - Term = JqueryTerminal.Term = $('#terminal').terminal(function(command, term){ + Term = JqueryTerminal.Term = $('#terminal').terminal(function(command, term){ term.echo(''); cloudcmd.Socket.send(command); }, { - greetings : 'Javascript Interpreter', - prompt : 'cloudcmd> ' + greetings : '[[;#729FCF;]Cloud Commander Terminal]', + prompt : '[[;#729FCF;]cloudcmd> ]', + color : '#729FCF;' }); }); - + /* removing resize function, no need for us */ + Term.resize = function(){}; + $(window).unbind('resize'); + JqueryTerminal.show(); }); }; diff --git a/lib/client/terminal/jquery-terminal/jquery.terminal.css b/lib/client/terminal/jquery-terminal/jquery.terminal.css index a5450638..f4391f9c 100644 --- a/lib/client/terminal/jquery-terminal/jquery.terminal.css +++ b/lib/client/terminal/jquery-terminal/jquery.terminal.css @@ -26,7 +26,10 @@ font-family: FreeMono, monospace; color: #aaa; background-color: #000; - line-height: 14px; + line-height: 16px; + /* removing breaking the lines */ + white-space: nowrap; + overflow:hidden; } .terminal .cmd span { float: left; diff --git a/lib/client/terminal/jquery-terminal/jquery.terminal.js b/lib/client/terminal/jquery-terminal/jquery.terminal.js index dadc8880..749c83fd 100644 --- a/lib/client/terminal/jquery-terminal/jquery.terminal.js +++ b/lib/client/terminal/jquery-terminal/jquery.terminal.js @@ -1656,9 +1656,7 @@ function get_stack(caller) { div = $('
').html(encodeHTML(string)); } output.append(div); - /* - div.width('100%'); - */ + div.width('100%'); scroll_to_bottom(); return div; } @@ -1853,7 +1851,7 @@ function get_stack(caller) { }).get().join('\n'); } }, - resize: function(width, height) { + resize: function(width, height) { if (width && height) { self.width(width); self.height(height); @@ -2363,6 +2361,7 @@ function get_stack(caller) { } else { self.disable(); } + $(window).resize(self.resize); self.click(function() { self.focus();