mirror of https://gitee.com/bigwinds/arangodb
Fix: Save (Update) on AQL query editor will now persist changed query text.
This commit is contained in:
parent
2c812af557
commit
f28e829586
|
@ -326,6 +326,7 @@
|
|||
e.stopPropagation();
|
||||
var inputEditor = ace.edit("aqlEditor");
|
||||
var saveName = $('#new-query-name').val();
|
||||
var isUpdate = $('#modalButton1').text() === 'Update';
|
||||
|
||||
if ($('#new-query-name').hasClass('invalid-input')) {
|
||||
return;
|
||||
|
@ -343,7 +344,7 @@
|
|||
$.each(this.customQueries, function (k, v) {
|
||||
if (v.name === saveName) {
|
||||
v.value = content;
|
||||
quit = true;
|
||||
quit = !isUpdate;
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
@ -354,10 +355,12 @@
|
|||
return;
|
||||
}
|
||||
|
||||
this.customQueries.push({
|
||||
name: saveName,
|
||||
value: content
|
||||
});
|
||||
if (!isUpdate) {
|
||||
this.customQueries.push({
|
||||
name: saveName,
|
||||
value: content
|
||||
});
|
||||
}
|
||||
|
||||
window.modalView.hide();
|
||||
|
||||
|
|
Loading…
Reference in New Issue