mirror of https://gitee.com/bigwinds/arangodb
issue #86: don't suppress backspace and cursor keys
This commit is contained in:
parent
d5beb4bc7b
commit
516e642b64
|
@ -104,7 +104,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td>journalSize:</td></td>
|
<tr><td>journalSize:</td></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" onkeypress='validate(event)'class="smallInput" id="createCollSize"></input>
|
<input type="text" onkeypress='validate(event)' class="smallInput" id="createCollSize"></input>
|
||||||
</td>
|
</td>
|
||||||
<td class="longTD">
|
<td class="longTD">
|
||||||
(MB) The maximal size of a journal or datafile. Note that this also limits the maximal size of a single object. Must be at least 1MB.
|
(MB) The maximal size of a journal or datafile. Note that this also limits the maximal size of a single object. Must be at least 1MB.
|
||||||
|
|
|
@ -1326,7 +1326,7 @@ var logTable = $('#logTableID').dataTable({
|
||||||
collSize = JSON.parse(collSize) * 1024 * 1024;
|
collSize = JSON.parse(collSize) * 1024 * 1024;
|
||||||
|
|
||||||
if (collName == '') {
|
if (collName == '') {
|
||||||
alert("Nothing to do...");
|
alert("No collection name entered. Aborting...");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1344,7 +1344,13 @@ var logTable = $('#logTableID').dataTable({
|
||||||
drawCollectionsTable();
|
drawCollectionsTable();
|
||||||
},
|
},
|
||||||
error: function(data) {
|
error: function(data) {
|
||||||
alert(JSON.stringify(data));
|
try {
|
||||||
|
var responseText = JSON.parse(data.responseText);
|
||||||
|
alert(responseText.errorMessage);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
alert(data.responseText);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -2277,8 +2283,12 @@ function evaloutput (data) {
|
||||||
function validate(evt) {
|
function validate(evt) {
|
||||||
var theEvent = evt || window.event;
|
var theEvent = evt || window.event;
|
||||||
var key = theEvent.keyCode || theEvent.which;
|
var key = theEvent.keyCode || theEvent.which;
|
||||||
|
|
||||||
|
if ((key == 37 || key == 39) && !theEvent.shiftKey) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
key = String.fromCharCode( key );
|
key = String.fromCharCode( key );
|
||||||
var regex = /[0-9]|\./;
|
var regex = /[0-9\.\b]/;
|
||||||
if( !regex.test(key) ) {
|
if( !regex.test(key) ) {
|
||||||
theEvent.returnValue = false;
|
theEvent.returnValue = false;
|
||||||
if(theEvent.preventDefault) theEvent.preventDefault();
|
if(theEvent.preventDefault) theEvent.preventDefault();
|
||||||
|
|
Loading…
Reference in New Issue