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