Skip to content

Commit

Permalink
Removed old terminal code.
Browse files Browse the repository at this point in the history
  • Loading branch information
toddsundsted committed May 4, 2012
1 parent e047e70 commit f5eb255
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 146 deletions.
1 change: 0 additions & 1 deletion files/public/css/moo-0.0.3.min.css

This file was deleted.

76 changes: 12 additions & 64 deletions files/public/css/moo-0.0.3.css → files/public/css/moo-0.0.4.css
Expand Up @@ -3,29 +3,16 @@
.simple-object-panel .object-summary { .simple-object-panel .object-summary {
padding: 5px 0; padding: 5px 0;


background-color: #0a0605; background: #606c88;
background-color: #c5c0cd; background: -moz-linear-gradient(top, #606c88 0%, #3f4c6b 100%);
background-color: #3d3d55; background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#606c88), color-stop(100%,#3f4c6b));

background: -webkit-linear-gradient(top, #606c88 0%,#3f4c6b 100%);
background: #3f4c6b; background: -o-linear-gradient(top, #606c88 0%,#3f4c6b 100%);
background: -moz-linear-gradient(top, #3f4c6b 0%, #606c88 100%); background: -ms-linear-gradient(top, #606c88 0%,#3f4c6b 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3f4c6b), color-stop(100%,#606c88)); background: linear-gradient(top, #606c88 0%,#3f4c6b 100%);
background: -webkit-linear-gradient(top, #3f4c6b 0%,#606c88 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#606c88', endColorstr='#3f4c6b', GradientType=0);
background: -o-linear-gradient(top, #3f4c6b 0%,#606c88 100%);
background: -ms-linear-gradient(top, #3f4c6b 0%,#606c88 100%); border: 1px solid #000;
background: linear-gradient(top, #3f4c6b 0%,#606c88 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#3f4c6b', endColorstr='#606c88', GradientType=0);

background: #606c88;
background: -moz-linear-gradient(top, #606c88 0%, #3f4c6b 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#606c88), color-stop(100%,#3f4c6b));
background: -webkit-linear-gradient(top, #606c88 0%,#3f4c6b 100%);
background: -o-linear-gradient(top, #606c88 0%,#3f4c6b 100%);
background: -ms-linear-gradient(top, #606c88 0%,#3f4c6b 100%);
background: linear-gradient(top, #606c88 0%,#3f4c6b 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#606c88', endColorstr='#3f4c6b', GradientType=0);

border: 1px solid #000; /*rgba(0, 0, 0, 0.05);*/


-moz-border-radius: 4px; -moz-border-radius: 4px;
-webkit-border-radius: 4px; -webkit-border-radius: 4px;
Expand All @@ -40,12 +27,10 @@ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#606c88', endC
font-size: 48px; font-size: 48px;
line-height: 48px; line-height: 48px;


color: #ff9b00;
color: #1b1e21;
color: #fff; color: #fff;


text-shadow: 1px 1px 2px #000; text-shadow: 1px 1px 2px #000;
filter: dropshadow(color=#000, offx=1, offy=1); filter: dropshadow(color=#000, offx=1, offy=1);
} }


.simple-object-panel .object-summary .flag, .simple-object-panel .object-summary .flag-container { .simple-object-panel .object-summary .flag, .simple-object-panel .object-summary .flag-container {
Expand Down Expand Up @@ -130,40 +115,3 @@ filter: dropshadow(color=#000, offx=1, offy=1);
position: absolute; position: absolute;
top: -1000px; top: -1000px;
} }

.command-panel {
}

.command-panel .top, .command-panel .bottom {
font-family: monospace;
line-height: 1.25em;
width: 100%;
clear: both;
}

.command-panel .input, .command-panel .output {
white-space: pre;
}

.command-panel .input {
background-color: #eee;
}

.command-panel .output {
background-color: #fff;
}

.command-panel .bottom {
height: 2em;
background-color: #ddd;
}

.command-panel .bottom input {
width: 100%;
height: 100%;
background-color: transparent;
font-family: monospace;
border: 0;
margin: 0;
padding: 0;
}
1 change: 1 addition & 0 deletions files/public/css/moo-0.0.4.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 0 additions & 80 deletions files/public/js/moo-0.0.3.js → files/public/js/moo-0.0.4.js
Expand Up @@ -569,84 +569,4 @@ if (!window.Moo && !document.Moo)
this.element.html(''); this.element.html('');
} }
}); });

$.widget('moo.commandPanel', {

options: {
host: 'localhost',
port: 8888
},

_setOption: function(key, value) {
},

_create: function() {
var widget = this;

widget.output = $('<div class="top"></div>');
widget.input = $('<div class="bottom"><input type="text"></div>');
var panel = $('<div class="command-panel"></div>');
panel.append(widget.output);
panel.append(widget.input);
widget.element.append(panel);

var print = function(direction, text) {
var $this = widget.output;
var $last = $this.children(':last');
if (!$last.hasClass(direction)) {
$last = $("<div class='" + direction + "'></div>");
$this.append($last);
}
$last.text($last.text() + text);
widget.input.get(0).scrollIntoView(false);
};

var history = [];
var position = -1;

$('input', widget.input).keypress(function(event) {
var text;
if (event.which == 13) {
if ((text = $(this).val())) {
event.preventDefault();
history.unshift(text);
position = -1;
text = text + '\n';
print('input', text);
interactive.send(text);
$(this).val('');
}
}
});
$('input', widget.input).keyup(function(event) {
var text;
if (event.which == 38) {
if ((text = history[position + 1])) {
$(this).val(text);
position++;
}
}
else if (event.which == 40) {
if ((text = history[position - 1])) {
$(this).val(text);
position--;
}
}
});

var interactive = new Moo.Interactive(widget.options.host, widget.options.port, {
callback: function(text) {
print('output', text);
}
});
},

_init: function() {
},

destroy: function() {
this.element.html('');
}
});

})(Moo); })(Moo);

0 comments on commit f5eb255

Please sign in to comment.