Browse Source

carousel!

master
Pascal Gloor 5 years ago
parent
commit
08ec24c231
1 changed files with 16 additions and 4 deletions
  1. 16
    4
      www/js/autodoc.js

+ 16
- 4
www/js/autodoc.js View File

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() {

Loading…
Cancel
Save