mirror of
https://github.com/chenasraf/snpr.git
synced 2026-05-17 17:38:07 +00:00
Merge pull request #413 from openSNP/fix-modal-disappearance
Fix modal disappearance, closes #176
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<button id="modal_close_<%= id %>" type="button" class="close" data-dismiss="modal">×</button>
|
||||
<%= content_for id.to_sym%>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
@@ -25,6 +25,15 @@ $(document).ready(function() {
|
||||
$("label[for=user_phenotype_variation]").hide();
|
||||
});
|
||||
});
|
||||
|
||||
// show the input-box when closing the modal
|
||||
$('#<%=id%>').on('hidden.bs.modal', function (e) {
|
||||
$('<%="#phenotype_field"+phenotype.id.to_s%>').show();
|
||||
$("label[for=user_phenotype_variation]").show();
|
||||
$("#<%=id%>").find("input:radio").prop("checked", false).end()
|
||||
.buttonset("refresh");
|
||||
});
|
||||
|
||||
// Autocomplete for variations in the input-box
|
||||
$(function () {
|
||||
$('<%="#phenotype_field"+phenotype.id.to_s%>').autocomplete({
|
||||
|
||||
Reference in New Issue
Block a user