我遇到了bootstrap的问题,其中Modals在Safari中的表单提交时没有关闭,但在Chrome中它很好。请注意,这是一个Django项目,但我不认为这是问题。
此外,我正在使用此上传进度条进行上传,但我遇到了此问题和没有问题。
这是我的HTML
<html lang="en"><head>
<meta charset="UTF-8">
<title>VideoOrganiser</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="/static/mfo/base_style.css" rel="stylesheet" type="text/css">
<script src="/static/scripts/index.js" type="text/javascript"></script>
<script src="/static/scripts/bootstrap-uploadprogress.js" type="text/javascript"> </script>
</head>
<body data-spy="spyscroll">
<nav class="navbar navbar-custom">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="/" style="font-size: 200%">VideoOrganiser</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li style="padding-top: 11px">
<!-- Trigger the modal with a button -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">Upload Media</button>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<!-- Modal -->
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Upload Media</h4>
</div>
<div class="modal-body">
<form id="upload_form" enctype="multipart/form-data" action="" method="post">
<input type="hidden" name="csrfmiddlewaretoken" value="N9n4G7teXfsWt8qXue6S9hOja0I2lLzhe61qPs6OXpZQxX5vYSOVL0LQLDYMuO5a">
<label for="id_uploaded_file">Uploaded file:</label><input id="id_uploaded_file" name="uploaded_file" type="file" required="">
<input type="submit" id="upload_submit" style="margin-top: 10px" class="btn btn-default" value="Upload">
</form>
<script>
$("#upload_form").uploadprogress({redirect_url: "/"})
</script>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="jumbotron" id="file_system_jumbo"><p><span class="glyphicon glyphicon-folder-open"></span>/Users/ryanrushton/Movies</p><ul class="list-group" id="file_system_list"><li class="list-group-item"><p><a onclick="get_file_system('/Users/ryanrushton/Movies/Movies');"><span class="glyphicon glyphicon-folder-close"></span>Movies</a></p></li><li class="list-group-item"><p><a onclick="get_file_system('/Users/ryanrushton/Movies/TV Shows');"><span class="glyphicon glyphicon-folder-close"></span>TV Shows</a></p></li></ul></div>
</div></body></html>
这是Safari中呈现的HTML
do over (tables=FitStatistics Type3_Tests LSM Diff) ;
PROC EXPORT DATA= WORK.tables
OUTFILE="file.xls"
DBMS=EXCEL REPLACE;
SHEET=tables;
RUN;
loop;
欢呼帮助!
编辑:删除了views.py并根据请求添加了呈现的HTML。