1
0
Fork 0
This commit is contained in:
Heiko Kernbach 2013-04-19 17:54:50 +02:00
parent e1dae88f7b
commit 1d203859b3
6 changed files with 34 additions and 8 deletions

View File

@ -4,7 +4,7 @@
text-align: center; text-align: center;
left: 0; left: 0;
right: 0; right: 0;
margin-top:300px; margin-top:500px;
} }
.footerExtra { .footerExtra {

View File

@ -32,6 +32,10 @@ input {
box-shadow: 0; box-shadow: 0;
} }
#transparentHeader h4 {
margin-top: 7px;
}
.navbar .nav li.dropdown.open > .dropdown-toggle, .navbar .nav li.dropdown.active > .dropdown-toggle, .navbar .nav li.dropdown.open.active > .dropdown-toggle { .navbar .nav li.dropdown.open > .dropdown-toggle, .navbar .nav li.dropdown.active > .dropdown-toggle, .navbar .nav li.dropdown.open.active > .dropdown-toggle {
background: #788f3d; background: #788f3d;
} }

View File

@ -1,3 +1,10 @@
.ui-resizable-s {
bottom: 0;
height: 10px;
background-color: #686766 !important;
cursor: ns-resize;
}
#queryOutput .ace_cursor-layer { #queryOutput .ace_cursor-layer {
display:none; display:none;
} }
@ -31,6 +38,7 @@
#aqlEditor { #aqlEditor {
width: 898px; width: 898px;
height: 200px; height: 200px;
min-height: 100px;
border: 1px solid #C0C0C0; border: 1px solid #C0C0C0;
margin-bottom: 20px; margin-bottom: 20px;
} }
@ -59,9 +67,9 @@
#queryOutput { #queryOutput {
width: 898px; width: 898px;
background-color: white; background-color: white;
height: 350px; height: 200px;
min-height: 100px;
overflow-y: hidden; overflow-y: hidden;
resize: vertical !important;
border: 1px solid #c0c0c0; border: 1px solid #c0c0c0;
} }

View File

@ -12,7 +12,7 @@
margin-top: 30px; margin-top: 30px;
margin-left: 20px; margin-left: 20px;
margin-bottom: -20px; margin-bottom: -20px;
height: 500px; height: 400px;
background-color: black; background-color: black;
} }

View File

@ -27,9 +27,7 @@ var queryView = Backbone.View.extend({
editor.getSession().setMode("ace/mode/aql"); editor.getSession().setMode("ace/mode/aql");
editor2.getSession().setMode("ace/mode/json"); editor2.getSession().setMode("ace/mode/json");
editor.setTheme("ace/theme/merbivore_soft"); editor.setTheme("ace/theme/merbivore_soft");
editor.resize();
editor2.setValue(''); editor2.setValue('');
editor2.resize();
$('#queryOutput').resizable({ $('#queryOutput').resizable({
handles: "s", handles: "s",
@ -42,7 +40,7 @@ var queryView = Backbone.View.extend({
$('#aqlEditor').resizable({ $('#aqlEditor').resizable({
handles: "s", handles: "s",
ghost: true, ghost: true,
helper: "resizable-helper", //helper: "resizable-helper",
stop: function () { stop: function () {
var editor = ace.edit("aqlEditor"); var editor = ace.edit("aqlEditor");
editor.resize(); editor.resize();
@ -58,6 +56,14 @@ var queryView = Backbone.View.extend({
editor.setValue(queryContent); editor.setValue(queryContent);
editor2.setValue(queryOutput); editor2.setValue(queryOutput);
} }
var windowHeight = $(window).height() - 250;
$('#queryOutput').height(windowHeight/2);
$('#aqlEditor').height(windowHeight/2);
editor.resize();
editor2.resize();
return this; return this;
}, },
submitQuery: function() { submitQuery: function() {
@ -84,7 +90,7 @@ var queryView = Backbone.View.extend({
try { try {
var temp = JSON.parse(data.responseText); var temp = JSON.parse(data.responseText);
editor2.setValue('[' + temp.errorNum + '] ' + temp.errorMessage); editor2.setValue('[' + temp.errorNum + '] ' + temp.errorMessage);
if(typeof(Storage) !== "undefined") { if(typeof(Storage) !== "undefined") {
localStorage.setItem("queryContent", editor.getValue()); localStorage.setItem("queryContent", editor.getValue());
localStorage.setItem("queryOutput", editor2.getValue()); localStorage.setItem("queryOutput", editor2.getValue());
@ -95,6 +101,7 @@ var queryView = Backbone.View.extend({
} }
} }
}); });
editor2.resize();
}, },
FormatJSON: function(oData, sIndent) { FormatJSON: function(oData, sIndent) {

View File

@ -9,14 +9,21 @@ var shellView = Backbone.View.extend({
render: function() { render: function() {
$(this.el).html(this.template.text); $(this.el).html(this.template.text);
this.replShell(); this.replShell();
this.editor(); this.editor();
var windowHeight = $(window).height() - 200;
$('#shell_workspace').height(windowHeight);
$("#shell_workspace").splitter({ $("#shell_workspace").splitter({
dock: true dock: true
}); });
$("#shell_workspace").trigger("resize", [ 200 ]); $("#shell_workspace").trigger("resize", [ 200 ]);
$('.vsplitbar').append('<div id="editor-run"><img src="img/right_icon.png"></img></div>'); $('.vsplitbar').append('<div id="editor-run"><img src="img/right_icon.png"></img></div>');
$.gritter.removeAll(); $.gritter.removeAll();
return this; return this;
}, },
renderEditor: function () { renderEditor: function () {