浏览代码

nicer

master
Pascal Gloor 5 年前
父节点
当前提交
c99711d1a6
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 8
    8
      www/js/autodoc.js

+ 8
- 8
www/js/autodoc.js 查看文件

@@ -65,11 +65,8 @@ $(document).ready(function () {

$('input.autodoc_home_modal_name').change(function(e) {
var docid = $('#autodoc_home_modal').data('documentid');
document_update_name(docid, $(e.target).val()), function() {
home_modal_open(docid);
$('span.autodoc_home_modal_name').removeClass('d-none');
$('input.autodoc_home_modal_name').addClass('d-none');
}});
document_update_name(docid, $(e.target).val(), docid);
});
});

$(window).bind("hashchange", function () {
@@ -484,11 +481,14 @@ function home_modal_close(docid) {
$('#autodoc_home_modal').modal('hide');
}

function document_update_name(docid, name, cb) {
function document_update_name(docid, name) {
$.ajax({
type: "PATCH",
url: conf.openapi + "/documents/" + docid + "?name=" + encodeURIComponent(name),
data: null,
success: function(data) { cb(); },
success: function(data) {
$('span.autodoc_home_modal_name').removeClass('d-none');
$('input.autodoc_home_modal_name').addClass('d-none');
home_modal_open(docid);
}
});
}

正在加载...
取消
保存