1
0
Fork 0

Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel

This commit is contained in:
Jan Steemann 2012-05-25 13:50:51 +02:00
commit 46ced25901
3 changed files with 40 additions and 22 deletions

View File

@ -7,8 +7,8 @@
} }
.writeable { .writeable {
width: 100%;
word-wrap: break-word; word-wrap: break-word;
width:auto !important;
} }
#delete { #delete {
@ -346,6 +346,13 @@ form {
float:right; float:right;
} }
#formatshellJSONyesno {
float:right;
padding-right:10px;
margin-top: -3px;
color: #797979;
}
#formatJSONyesno { #formatJSONyesno {
margin-top: -40px; margin-top: -40px;
float:right; float:right;
@ -654,7 +661,7 @@ form {
line-height: 1; line-height: 1;
text-align: center; text-align: center;
text-shadow: 0 1px 0 #fff; text-shadow: 0 1px 0 #fff;
width: 80px; width: 90px;
} }
#menue button.minimal:hover { #menue button.minimal:hover {
background: #d9d9d9; background: #d9d9d9;

View File

@ -397,6 +397,11 @@
<input type="text" class="editBox" id="avocshContent"></input><button class="minimal" id="submitAvoc">Ok</button> <input type="text" class="editBox" id="avocshContent"></input><button class="minimal" id="submitAvoc">Ok</button>
</form> </form>
<button class="minimal" id="refreshShell">Refresh</button> <button class="minimal" id="refreshShell">Refresh</button>
<form action="#" id="formatshellJSONyesno">
Format JSON?
<input type="radio" name="formatshellJSONyesno" value=true checked>yes</input>
<input type="radio" name="formatshellJSONyesno" value=false>no</input>
</form>
<a href="http://www.arangodb.org/manuals/UserManual.html" target="_blank">ArangoDB Shell - click for more information</a> <a href="http://www.arangodb.org/manuals/UserManual.html" target="_blank">ArangoDB Shell - click for more information</a>
</div> </div>
@ -410,12 +415,11 @@
<a id="aqlinfo" href="http://www.arangodb.org/manuals/Aql.html" target="_blank">ArangoDB Query Language - click for more information</a> <a id="aqlinfo" href="http://www.arangodb.org/manuals/Aql.html" target="_blank">ArangoDB Query Language - click for more information</a>
<br></br> <br></br>
</form> </form>
<form action="#" id="formatJSONyesno"> <form action="#" id="formatJSONyesno">
Format JSON? Format JSON?
<input type="radio" name="formatJSONyesno" value=true checked>yes</input> <input type="radio" name="formatJSONyesno" value=true checked>yes</input>
<input type="radio" name="formatJSONyesno" value=false>no</input> <input type="radio" name="formatJSONyesno" value=false>no</input>
</form> </form>
</div> </div>
</div> </div>

View File

@ -160,7 +160,7 @@ var collectionTable = $('#collectionsTableID').dataTable({
"bAutoWidth": false, "bAutoWidth": false,
"iDisplayLength": -1, "iDisplayLength": -1,
"bJQueryUI": true, "bJQueryUI": true,
"aoColumns": [{"sWidth":"120px", "bSortable":false}, {"sWidth": "200px"}, {"sWidth": "200px"}, {"sWidth": "200px"}, {"sWidth": "200px"}, null ], "aoColumns": [{"sWidth":"150px", "bSortable":false}, {"sWidth": "200px"}, {"sWidth": "200px"}, null, {"sWidth": "200px"}, {"sWidth": "200px"} ],
"aoColumnDefs": [{ "sClass": "alignRight", "aTargets": [ 4, 5 ] }], "aoColumnDefs": [{ "sClass": "alignRight", "aTargets": [ 4, 5 ] }],
"oLanguage": {"sEmptyTable": "No collections"} "oLanguage": {"sEmptyTable": "No collections"}
}); });
@ -176,12 +176,11 @@ var documentEditTable = $('#documentEditTableID').dataTable({
"bSortable": false, "bSortable": false,
"bLengthChange": false, "bLengthChange": false,
"bDeferRender": true, "bDeferRender": true,
"bAutoWidth": true,
"iDisplayLength": -1, "iDisplayLength": -1,
"bJQueryUI": true, "bJQueryUI": true,
"aoColumns": [{ "sClass":"center", "sClass":"read_only","bSortable": false, "sWidth": "30px"}, "aoColumns": [{ "sClass":"center", "sClass":"read_only","bSortable": false, "sWidth": "30px"},
{"sClass":"writeable", "bSortable": false, "sWidth":"250px" }, {"sClass":"writeable", "bSortable": false, "sWidth":"300px" },
{"sClass":"writeable", "bSortable": false }, {"sClass":"writeable", "bSortable": false},
{"bVisible": false } ], {"bVisible": false } ],
"oLanguage": {"sEmptyTable": "No documents"} "oLanguage": {"sEmptyTable": "No documents"}
}); });
@ -218,7 +217,7 @@ var documentsTable = $('#documentsTableID').dataTable({
"bAutoWidth": true, "bAutoWidth": true,
"iDisplayLength": -1, "iDisplayLength": -1,
"bJQueryUI": true, "bJQueryUI": true,
"aoColumns": [{ "sClass":"center", "sClass":"read_only","bSortable": false, "sWidth": "70px"}, "aoColumns": [{ "sClass":"read_only","bSortable": false, "sWidth": "80px"},
{"sClass":"read_only","bSortable": false, "sWidth": "125px"}, {"sClass":"read_only","bSortable": false, "sWidth": "125px"},
{"sClass":"read_only","bSortable": false, "sWidth": "60px"}, {"sClass":"read_only","bSortable": false, "sWidth": "60px"},
{"bSortable": false}], {"bSortable": false}],
@ -716,8 +715,9 @@ var logTable = $('#logTableID').dataTable({
createnav ("ArangoDB Shell"); createnav ("ArangoDB Shell");
$('#avocshContent').focus(); $('#avocshContent').focus();
if (printedHelp === false) { if (printedHelp === false) {
print(welcomeMSG + HELP); print(welcomeMSG + require("arangosh").HELP);
printedHelp = true; printedHelp = true;
start_pretty_print();
} }
} }
@ -805,7 +805,6 @@ var logTable = $('#logTableID').dataTable({
}); });
} }
catch(e) { catch(e) {
console.log(e);
alert("Please make sure the entered value is a valid json string."); alert("Please make sure the entered value is a valid json string.");
} }
} }
@ -903,7 +902,6 @@ var logTable = $('#logTableID').dataTable({
}); });
} }
catch(e) { catch(e) {
console.log(e);
alert("Please make sure the entered value is a valid json string."); alert("Please make sure the entered value is a valid json string.");
} }
} }
@ -971,7 +969,6 @@ var logTable = $('#logTableID').dataTable({
} }
catch(e) { catch(e) {
console.log(e);
alert("Please make sure the entered value is a valid json string."); alert("Please make sure the entered value is a valid json string.");
} }
@ -1185,6 +1182,8 @@ var logTable = $('#logTableID').dataTable({
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// submit avocsh content /// submit avocsh content
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
var lastFormatQuestion = true;
$('#submitAvoc').live('click', function () { $('#submitAvoc').live('click', function () {
var data = $('#avocshContent').val(); var data = $('#avocshContent').val();
@ -1196,7 +1195,17 @@ var logTable = $('#logTableID').dataTable({
location.reload(); location.reload();
return false; return false;
} }
formatQuestion = JSON.parse($('input:radio[name=formatshellJSONyesno]:checked').val());
if (formatQuestion != lastFormatQuestion) {
if (formatQuestion == true) {
start_pretty_print();
lastFormatQuestion = true;
}
if (formatQuestion == false) {
stop_pretty_print();
lastFormatQuestion = false;
}
}
var client = "arangosh> " + escapeHTML(data) + "<br>"; var client = "arangosh> " + escapeHTML(data) + "<br>";
$('#avocshWindow').append('<b class="avocshClient">' + client + '</b>'); $('#avocshWindow').append('<b class="avocshClient">' + client + '</b>');
@ -1237,7 +1246,6 @@ var logTable = $('#logTableID').dataTable({
} }
}, },
error: function(data) { error: function(data) {
console.log(data);
var temp = JSON.parse(data.responseText); var temp = JSON.parse(data.responseText);
$("#queryOutput").empty(); $("#queryOutput").empty();
$("#queryOutput").append('<a class="queryError"><font color=red>[' + temp.errorNum + '] ' + temp.errorMessage + '</font></a>'); $("#queryOutput").append('<a class="queryError"><font color=red>[' + temp.errorNum + '] ' + temp.errorMessage + '</font></a>');
@ -1948,8 +1956,8 @@ function showCursor() {
} }
function cutByResolution (string) { function cutByResolution (string) {
if (string.length > 150) { if (string.length > 100) {
return escaped(string.substr(0, 150)) + '...'; return escaped(string.substr(0, 100)) + '...';
} }
return escaped(string); return escaped(string);
} }
@ -2237,7 +2245,6 @@ $('#submitDocPageInput').live('click', function () {
} }
else { else {
console.log("out of reach");
return false; return false;
} }
} }