mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
This commit is contained in:
commit
b64156ca5e
|
@ -898,7 +898,7 @@ int getDocumentOnCoordinator (
|
|||
}
|
||||
if (res->status == CL_COMM_ERROR) {
|
||||
// This could be a broken connection or an Http error:
|
||||
if (!res->result->isComplete()) {
|
||||
if (!res->result || !res->result->isComplete()) {
|
||||
delete res;
|
||||
return TRI_ERROR_CLUSTER_CONNECTION_LOST;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<tr class="tableRow" id="row_newEdgeDefinitions<%= number%>">
|
||||
<th class="collectionTh">Edge definitions*:</th>
|
||||
<th class="collectionTh">
|
||||
<input onkeypress="event.stopPropagation()" type="hidden" id="newEdgeDefinitions<%= number%>" value="" placeholder="Edge definitions" tabindex="-1" class="select2-offscreen">
|
||||
<input type="hidden" id="newEdgeDefinitions<%= number%>" value="" placeholder="Edge definitions" tabindex="-1" class="select2-offscreen">
|
||||
<button id="remove_newEdgeDefinitions<%= number%>" class="graphViewer-icon-button gv_internal_remove_line gv-icon-small delete"></button>
|
||||
</th><th>
|
||||
<a class="modalTooltips" title="Some info for edge definitions">
|
||||
|
@ -13,7 +13,7 @@
|
|||
<tr class="tableRow" id="row_fromCollections<%= number%>">
|
||||
<th class="collectionTh">fromCollections*:</th>
|
||||
<th class="collectionTh">
|
||||
<input onkeypress="event.stopPropagation()" type="hidden" id="fromCollections<%= number%>" value="" placeholder="fromCollections" tabindex="-1" class="select2-offscreen">
|
||||
<input type="hidden" id="fromCollections<%= number%>" value="" placeholder="fromCollections" tabindex="-1" class="select2-offscreen">
|
||||
</th><th>
|
||||
<a class="modalTooltips" title="The collection that contain the start vertices of the relation.">
|
||||
<span class="arangoicon icon_arangodb_info"></span>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<tr class="tableRow" id="row_toCollections<%= number%>">
|
||||
<th class="collectionTh">toCollections*:</th>
|
||||
<th class="collectionTh">
|
||||
<input onkeypress="event.stopPropagation()" type="hidden" id="toCollections<%= number%>" value="" placeholder="toCollections" tabindex="-1" class="select2-offscreen">
|
||||
<input type="hidden" id="toCollections<%= number%>" value="" placeholder="toCollections" tabindex="-1" class="select2-offscreen">
|
||||
</th><th>
|
||||
<a class="modalTooltips" title="The collection that contain the end vertices of the relation.">
|
||||
<span class="arangoicon icon_arangodb_info"></span>
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
mandatory = '*';
|
||||
}
|
||||
|
||||
var disableSubmitOnEnterString = '';
|
||||
if (disableSubmitOnEnter) {
|
||||
disableSubmitOnEnterString = 'onkeypress="event.stopPropagation()"';
|
||||
}
|
||||
%>
|
||||
<tr class="tableRow" id="<%='row_' + row.id%>">
|
||||
<th class="collectionTh"><%=row.label%><%=mandatory%>:</th>
|
||||
|
@ -18,12 +14,12 @@
|
|||
switch(row.type) {
|
||||
case "text":
|
||||
%>
|
||||
<input <%=disableSubmitOnEnterString%> type="text" id="<%=row.id%>" value="<%=row.value||''%>" placeholder="<%=row.placeholder||''%>"></input>
|
||||
<input type="text" id="<%=row.id%>" value="<%=row.value||''%>" placeholder="<%=row.placeholder||''%>"></input>
|
||||
<%
|
||||
break;
|
||||
case "password":
|
||||
%>
|
||||
<input <%=disableSubmitOnEnterString%> type="password" id="<%=row.id%>" value="<%=row.value||''%>" placeholder="<%=row.placeholder||''%>"></input>
|
||||
<input type="password" id="<%=row.id%>" value="<%=row.value||''%>" placeholder="<%=row.placeholder||''%>"></input>
|
||||
<%
|
||||
break;
|
||||
case "readonly":
|
||||
|
@ -41,7 +37,7 @@
|
|||
disabled = 'disabled';
|
||||
}
|
||||
%>
|
||||
<input <%=disableSubmitOnEnterString%> type="checkbox" id="<%=row.id%>" value="<%=row.value%>" <%=checked%> <%=disabled%>></input>
|
||||
<input type="checkbox" id="<%=row.id%>" value="<%=row.value%>" <%=checked%> <%=disabled%>></input>
|
||||
<%
|
||||
break;
|
||||
case "select":
|
||||
|
@ -59,7 +55,7 @@
|
|||
break;
|
||||
case "select2":
|
||||
%>
|
||||
<input <%=disableSubmitOnEnterString%> type="hidden" id="<%=row.id%>" value="<%=row.value||''%>" placeholder="<%=row.placeholder||''%>"></input>
|
||||
<input type="hidden" id="<%=row.id%>" value="<%=row.value||''%>" placeholder="<%=row.placeholder||''%>"></input>
|
||||
<% if (row.addAdd) {%>
|
||||
<button id="<%='addAfter_' + row.id%>" class="graphViewer-icon-button gv-icon-small add"></button>
|
||||
<% } %>
|
||||
|
@ -89,7 +85,7 @@
|
|||
<tbody>
|
||||
<%
|
||||
_.each(content, function(row) {
|
||||
createTR(row, disableSubmitOnEnter);
|
||||
createTR(row);
|
||||
});
|
||||
%>
|
||||
|
||||
|
@ -111,7 +107,7 @@
|
|||
<tbody>
|
||||
<%
|
||||
_.each(advancedContent.content, function(row) {
|
||||
createTR(row, disableSubmitOnEnter);
|
||||
createTR(row);
|
||||
});
|
||||
%>
|
||||
</tbody>
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
this.events["click .tableRow"] = this.showHideDefinition.bind(this);
|
||||
this.events['change [id*="newEdgeDefinitions"]'] = this.setFromAndTo.bind(this);
|
||||
this.events["click .graphViewer-icon-button"] = this.addRemoveDefinition.bind(this);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
|
@ -89,7 +90,7 @@
|
|||
} else {
|
||||
id = e.currentTarget.id.split("row_newEdgeDefinitions")[1];
|
||||
$('#s2id_fromCollections'+id).select2("val", null);
|
||||
$('#newFCollections'+id).attr('disabled', false);
|
||||
$('#fromCollections'+id).attr('disabled', false);
|
||||
$('#s2id_toCollections'+id).select2("val", null);
|
||||
$('#toCollections'+id).attr('disabled', false);
|
||||
}
|
||||
|
@ -181,8 +182,8 @@
|
|||
index = index.replace("s2id_newEdgeDefinitions", "");
|
||||
collection = _.pluck($('#s2id_newEdgeDefinitions' + index).select2("data"), "text")[0];
|
||||
if (collection && collection !== "") {
|
||||
from = _.pluck($('#s2id_newFromCollections' + index).select2("data"), "text");
|
||||
to = _.pluck($('#s2id_newToCollections' + index).select2("data"), "text");
|
||||
from = _.pluck($('#s2id_fromCollections' + index).select2("data"), "text");
|
||||
to = _.pluck($('#s2id_toCollections' + index).select2("data"), "text");
|
||||
if (from !== 1 && to !== 1) {
|
||||
edgeDefinitions.push(
|
||||
{
|
||||
|
@ -456,7 +457,7 @@
|
|||
}
|
||||
});
|
||||
this.counter = 0;
|
||||
window.modalView.disableSubmitOnEnter = true;
|
||||
window.modalView.enableHotKeys = false;
|
||||
|
||||
tableContent.push(
|
||||
window.modalView.createTextEntry(
|
||||
|
|
|
@ -64,8 +64,8 @@
|
|||
yes: "#modal-confirm-delete",
|
||||
no: "#modal-abort-delete"
|
||||
},
|
||||
disableSubmitOnEnter : false,
|
||||
enabledHotkey: false,
|
||||
enableHotKeys : true,
|
||||
|
||||
buttons: {
|
||||
SUCCESS: "success",
|
||||
|
@ -272,7 +272,6 @@
|
|||
|
||||
var template = templateEngine.createTemplate(templateName),
|
||||
model = {};
|
||||
model.disableSubmitOnEnter = this.disableSubmitOnEnter;
|
||||
model.content = tableContent || [];
|
||||
model.advancedContent = advancedContent || false;
|
||||
$(".modal-body").html(template.render(model));
|
||||
|
@ -320,7 +319,9 @@
|
|||
this.createInitModalHotkeys();
|
||||
this.enabledHotkey = true;
|
||||
}
|
||||
if (this.enableHotKeys) {
|
||||
this.createModalHotkeys();
|
||||
}
|
||||
},
|
||||
|
||||
hide: function() {
|
||||
|
|
Loading…
Reference in New Issue