Browse Source

moved slick load

master
Pascal Gloor 5 years ago
parent
commit
5feb81e7f7
1 changed files with 9 additions and 9 deletions
  1. 9
    9
      www/js/autodoc.js

+ 9
- 9
www/js/autodoc.js View File



function page_load_document(args) { function page_load_document(args) {
var [docid] = args; var [docid] = args;
console.log(docid);
if ( !docid ) {
return false;
}

if ( !docid ) { return false; }
$('.autodoc_document_empty').addClass('d-none'); $('.autodoc_document_empty').addClass('d-none');
$('.autodoc_document_body').removeClass('d-none'); $('.autodoc_document_body').removeClass('d-none');
function(doc) { function(doc) {
for(var i=0; i<doc.pageId.length; i++) { for(var i=0; i<doc.pageId.length; i++) {
$('.autodoc_document_carousel').append('<div><img /></div>'); $('.autodoc_document_carousel').append('<div><img /></div>');
$('.autodoc_document_carousel').children().last().children().attr('src',
$('.autodoc_document_carousel').children().last().children().attr('data-lazy',
conf.openapi + "/pages/" + doc.pageId[i] + "/image?maxWidth=100"); conf.openapi + "/pages/" + doc.pageId[i] + "/image?maxWidth=100");
} }
$('.autodoc_document_carousel').slick({
lazyLoad: 'ondemand',
slidesToShow: 4,
slidesToScroll: 4
});
} }
); );
$('.autodoc_document_carousel').slick({
slidesToShow: 4,
slidesToScroll: 4
});
} }


function page_load_upload() { function page_load_upload() {

Loading…
Cancel
Save