| @@ -64,7 +64,9 @@ $(document).ready(function () { | |||
| }); | |||
| $('input.autodoc_home_modal_name').change(function(e) { | |||
| home_modal_open($('#autodoc_home_modal').data('documentid')); | |||
| var docid = $('#autodoc_home_modal').data('documentid'); | |||
| document_update_name(docid, $(e.target).val()); | |||
| home_modal_open(docid); | |||
| }); | |||
| }); | |||
| @@ -479,3 +481,14 @@ function home_modal_open(docid) { | |||
| function home_modal_close(docid) { | |||
| $('#autodoc_home_modal').modal('hide'); | |||
| } | |||
| function document_update_name(docid, name) { | |||
| $.ajax({ | |||
| type: "PATCH", | |||
| url: conf.openapi + "/documents/" + docid + "?name=" + name, | |||
| data: null, | |||
| success: function(data) { | |||
| }, | |||
| }); | |||
| } | |||