Skip to content

Instantly share code, notes, and snippets.

@MaySnow
Created September 22, 2012 07:29
Show Gist options
  • Save MaySnow/3765467 to your computer and use it in GitHub Desktop.
Save MaySnow/3765467 to your computer and use it in GitHub Desktop.
添加
<!DOCTYPE HTML>
<html >
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<style type="text/css">
.modal-backdrop.fade.in {
opacity : 0.5
}
</style>
</head>
<body>
<a href="#new" id="newfolder" style="color:#000" data-toggle="modal" class="btn">创建文件夹</a>
<div class="modal fade hide" id="new" tabindex="-1" role="dialog" aria-labelledby="newLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="newLabel">添加新文件夹</h3>
</div>
<div class="modal-body">
<form action="<%=basePath %>share/addFolder.jspx" style="margin-left:20px" method="post" id="myform">
<label>文件名称</label>
<input type="text" class="span5">
<label>文件描述</label>
<textarea name="desc" id="" class="span5" rows="8"></textarea>
<br/>
<br/>
<button class="btn btn-primary" id="save" type="button">保存</button>
<button class="btn" data-dismiss="modal" aria-hidden="true" type="button">取消</button>
</form>
</div>
</div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#new").modal({
backdrop : false,
show : false
});
$("#newfolder").click(function(){
$("body").append("<div class=\"modal-backdrop fade in\"></div>");
});
$("button").click(function(){
$(".modal-backdrop").remove();
});
$("#save").click(function(){
$("#myform").submit();
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment