mirror of https://github.com/mindoc-org/mindoc.git
parent
99643b0712
commit
f3e0eb2ea2
|
@ -106,6 +106,8 @@ function openCreateCatalogDialog($node) {
|
||||||
var doc_id = $node ? $node.id : 0;
|
var doc_id = $node ? $node.id : 0;
|
||||||
|
|
||||||
$then.find("input[name='parent_id']").val(doc_id);
|
$then.find("input[name='parent_id']").val(doc_id);
|
||||||
|
$then.find("input[name='doc_id']").val('');
|
||||||
|
$then.find("input[name='doc_name']").val('');
|
||||||
|
|
||||||
$then.modal("show");
|
$then.modal("show");
|
||||||
}
|
}
|
||||||
|
@ -265,11 +267,16 @@ $("#btnAddDocument").on("click",function () {
|
||||||
});
|
});
|
||||||
//用于还原创建文档的遮罩层
|
//用于还原创建文档的遮罩层
|
||||||
$("#addDocumentModal").on("hidden.bs.modal",function () {
|
$("#addDocumentModal").on("hidden.bs.modal",function () {
|
||||||
// $(this).find("form").html(window.sessionStorage.getItem("addDocumentModal"));
|
$(this).find("form").html(window.sessionStorage.getItem("MinDoc::addDocumentModal"));
|
||||||
|
var $then = $("#addDocumentModal");
|
||||||
|
|
||||||
|
$then.find("input[name='parent_id']").val('');
|
||||||
|
$then.find("input[name='doc_id']").val('');
|
||||||
|
$then.find("input[name='doc_name']").val('');
|
||||||
}).on("shown.bs.modal",function () {
|
}).on("shown.bs.modal",function () {
|
||||||
$(this).find("input[name='doc_name']").focus();
|
$(this).find("input[name='doc_name']").focus();
|
||||||
}).on("show.bs.modal",function () {
|
}).on("show.bs.modal",function () {
|
||||||
// window.sessionStorage.setItem("addDocumentModal",$(this).find("form").html())
|
window.sessionStorage.setItem("MinDoc::addDocumentModal",$(this).find("form").html())
|
||||||
});
|
});
|
||||||
|
|
||||||
function showError($msg,$id) {
|
function showError($msg,$id) {
|
||||||
|
|
|
@ -136,7 +136,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Modal -->
|
<!-- 创建文档 -->
|
||||||
<div class="modal fade" id="addDocumentModal" tabindex="-1" role="dialog" aria-labelledby="addDocumentModalLabel">
|
<div class="modal fade" id="addDocumentModal" tabindex="-1" role="dialog" aria-labelledby="addDocumentModalLabel">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<form method="post" action="{{urlfor "DocumentController.Create" ":key" .Model.Identify}}" id="addDocumentForm" class="form-horizontal">
|
<form method="post" action="{{urlfor "DocumentController.Create" ":key" .Model.Identify}}" id="addDocumentForm" class="form-horizontal">
|
||||||
|
|
Loading…
Reference in New Issue