1
0
Fork 0

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

This commit is contained in:
Jan Steemann 2014-04-02 16:29:50 +02:00
commit b188cbf608
1 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,75 @@
<script id="modalTable.ejs" type="text/template">
<table>
<tbody>
<%
_.each(model, function(row) {
%>
<tr>
<th class="collectionTh"><%=row.label%>:</th>
<th class="collectionTh">
<%
switch(row.type) {
case "text":
%>
<input type="text" id="<%=row.id%>" value="<%=row.value||''%>" placeholder="<%=row.placeholder||''%>"></input>
<%
break;
case "password":
%>
<input type="password" id="<%=row.id%>" value="<%=row.value||''%>" placeholder="<%=row.placeholder||''%>"></input>
<%
break;
case "readonly":
%>
<div class="modal-text"><%=row.value||''%></div>
<%
break;
case "checkbox":
var checked = '',
disabled = '';
if (row.checked) {
checked = 'checked';
}
if (row.checked) {
disabled = 'disabled';
}
%>
<input type="checkbox" id="<%=row.id%>" value="<%=row.value%>" <%=checked%> <%=disabled%>></input>
<%
break;
case "select":
%>
<select id="<%=row.id%>" class="modalSelect">
<%
_.each(row.options, function(opt) {
%>
<option value="<%=opt.value%>"><%=opt.label%></option>
<%
});
%>
</select>
<%
break;
}
if (row.info) {
%>
<th>
<div>
<a class="modalTooltips" data-toggle="tooltip" data-placement="left" title="<%=row.info%>">
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
</a>
</div>
</th>
<%
}
%>
<tr>
<%
});
%>
</tbody>
</table>
</script>