浏览代码

cb

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

+ 7
- 11
www/js/autodoc.js 查看文件

@@ -65,13 +65,11 @@ $(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());
$('span.autodoc_home_modal_name').html($('input.autodoc_home_modal_name').val());
$('span.autodoc_home_modal_name').removeClass('d-none');
$('input.autodoc_home_modal_name').addClass('d-none');

home_modal_open(docid);
});
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');
}});
});

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

function document_update_name(docid, name) {
function document_update_name(docid, name, cb) {
$.ajax({
type: "PATCH",
url: conf.openapi + "/documents/" + docid + "?name=" + encodeURIComponent(name),
data: null,
success: function(data) {

},
success: function(data) { cb(); },
});
}

正在加载...
取消
保存