| function page_load_document() { | function page_load_document() { | ||||
| var docid = $('#autodoc_tab_document').data('docid'); | var docid = $('#autodoc_tab_document').data('docid'); | ||||
| console.log(docid); | console.log(docid); | ||||
| if ( docid ) { | |||||
| $('.autodoc_document_empty').addClass('d-none'); | |||||
| $('.autodoc_document_body').removeClass('d-none'); | |||||
| if ( !docid ) { | |||||
| return false; | |||||
| } | } | ||||
| $('.autodoc_document_empty').addClass('d-none'); | |||||
| $('.autodoc_document_body').removeClass('d-none'); | |||||
| $.getJSON( | |||||
| conf.openapi + "/documents/" + docid, | |||||
| function(doc) { | |||||
| for(var i=0; doc.pageId.length; i++) { | |||||
| var item = '<div><img /></div>'; | |||||
| $(item).find('img').attr('src', conf.openpi + "/pages/" + doc.pageId[i] + "/images?maxWidth=100"); | |||||
| $('.autodoc_document_carousel').append(item); | |||||
| } | |||||
| } | |||||
| ) | |||||
| } | } | ||||
| function page_load_upload() { | function page_load_upload() { |