remove cli
This commit is contained in:
parent
61c40b48bd
commit
8ee1ffab20
4 changed files with 3 additions and 57 deletions
|
|
@ -44,10 +44,9 @@ require("pilot/environment");
|
||||||
require("demo/demo");
|
require("demo/demo");
|
||||||
|
|
||||||
require("pilot/index");
|
require("pilot/index");
|
||||||
require("cockpit/index");
|
|
||||||
require("ace/defaults");
|
require("ace/defaults");
|
||||||
|
|
||||||
var plugins = [ "pilot/index", "cockpit/index", "ace/defaults" ];
|
var plugins = [ "pilot/index", "ace/defaults" ];
|
||||||
var catalog = require("pilot/plugin_manager").catalog;
|
var catalog = require("pilot/plugin_manager").catalog;
|
||||||
catalog.registerPlugins(plugins).then(function() {
|
catalog.registerPlugins(plugins).then(function() {
|
||||||
var env = require("pilot/environment").create();
|
var env = require("pilot/environment").create();
|
||||||
|
|
|
||||||
32
demo/demo.js
32
demo/demo.js
|
|
@ -477,8 +477,7 @@ exports.launch = function(env) {
|
||||||
function onResize() {
|
function onResize() {
|
||||||
var width = (document.documentElement.clientWidth - 280);
|
var width = (document.documentElement.clientWidth - 280);
|
||||||
container.style.width = width + "px";
|
container.style.width = width + "px";
|
||||||
cockpitInput.style.width = width + "px";
|
container.style.height = document.documentElement.clientHeight + "px";
|
||||||
container.style.height = (document.documentElement.clientHeight - 22) + "px";
|
|
||||||
env.split.resize();
|
env.split.resize();
|
||||||
// env.editor.resize();
|
// env.editor.resize();
|
||||||
};
|
};
|
||||||
|
|
@ -486,9 +485,6 @@ exports.launch = function(env) {
|
||||||
window.onresize = onResize;
|
window.onresize = onResize;
|
||||||
onResize();
|
onResize();
|
||||||
|
|
||||||
// Call resize on the cli explizit. This is necessary for Firefox.
|
|
||||||
env.cli.cliView.resizer()
|
|
||||||
|
|
||||||
event.addListener(container, "dragover", function(e) {
|
event.addListener(container, "dragover", function(e) {
|
||||||
return event.preventDefault(e);
|
return event.preventDefault(e);
|
||||||
});
|
});
|
||||||
|
|
@ -560,32 +556,6 @@ exports.launch = function(env) {
|
||||||
* This demonstrates how you can define commands and bind shortcuts to them.
|
* This demonstrates how you can define commands and bind shortcuts to them.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Command to focus the command line from the editor.
|
|
||||||
canon.addCommand({
|
|
||||||
name: "focuscli",
|
|
||||||
bindKey: {
|
|
||||||
win: "Ctrl-J",
|
|
||||||
mac: "Command-J",
|
|
||||||
sender: "editor"
|
|
||||||
},
|
|
||||||
exec: function() {
|
|
||||||
env.cli.cliView.element.focus();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Command to focus the editor line from the command line.
|
|
||||||
canon.addCommand({
|
|
||||||
name: "focuseditor",
|
|
||||||
bindKey: {
|
|
||||||
win: "Ctrl-J",
|
|
||||||
mac: "Command-J",
|
|
||||||
sender: "cli"
|
|
||||||
},
|
|
||||||
exec: function() {
|
|
||||||
env.editor.focus();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Fake-Save, works from the editor and the command line.
|
// Fake-Save, works from the editor and the command line.
|
||||||
canon.addCommand({
|
canon.addCommand({
|
||||||
name: "save",
|
name: "save",
|
||||||
|
|
|
||||||
|
|
@ -40,25 +40,4 @@ body {
|
||||||
|
|
||||||
#controls td + td {
|
#controls td + td {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
|
||||||
|
|
||||||
#cockpitInput {
|
|
||||||
position: absolute;
|
|
||||||
left: 280px;
|
|
||||||
right: 0px;
|
|
||||||
bottom: 0;
|
|
||||||
|
|
||||||
border: none; outline: none;
|
|
||||||
font-family: consolas, courier, monospace;
|
|
||||||
font-size: 120%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#cockpitOutput {
|
|
||||||
padding: 10px;
|
|
||||||
margin: 0 15px;
|
|
||||||
border: 1px solid #AAA;
|
|
||||||
-moz-border-radius-topleft: 10px;
|
|
||||||
-moz-border-radius-topright: 10px;
|
|
||||||
border-top-left-radius: 4px; border-top-right-radius: 4px;
|
|
||||||
background: #DDD; color: #000;
|
|
||||||
}
|
}
|
||||||
|
|
@ -683,8 +683,6 @@ object implicits extends Application {
|
||||||
val x = Array(2, 3, 1, 4)
|
val x = Array(2, 3, 1, 4)
|
||||||
println("x = "+ x.sort((x: Int, y: Int) => x < y))
|
println("x = "+ x.sort((x: Int, y: Int) => x < y))
|
||||||
}</script>
|
}</script>
|
||||||
<input id="cockpitInput" type="text"/>
|
|
||||||
|
|
||||||
<!-- DEVEL-->
|
<!-- DEVEL-->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var require = {
|
var require = {
|
||||||
|
|
@ -700,7 +698,7 @@ object implicits extends Application {
|
||||||
<!--DEVEL -->
|
<!--DEVEL -->
|
||||||
|
|
||||||
<!--PACKAGE
|
<!--PACKAGE
|
||||||
<script src="demo/kitchen-sink.js" data-ace-base="src" type="text/javascript" charset="utf-8"></script>
|
<script src="demo/kitchen-sink-uncompressed.js" data-ace-base="src" type="text/javascript" charset="utf-8"></script>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
require("demo/boot");
|
require("demo/boot");
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue