|
|
|
|
|
|
|
|
$('.autodoc_home_modal_tags_add').removeClass('d-none'); |
|
|
$('.autodoc_home_modal_tags_add').removeClass('d-none'); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// document page |
|
|
|
|
|
// make primary button |
|
|
|
|
|
$('.autodoc_document_btn_primary').click(function(e) { |
|
|
|
|
|
$(e.target).addClass('disabled'); |
|
|
|
|
|
var docid = $('.autodoc_tab_document').data('docid'); |
|
|
|
|
|
var pageid = $('.autodoc_document_image').data('pageid'); |
|
|
|
|
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
|
|
type: "PATCH", |
|
|
|
|
|
url: conf.openapi + "/documents/" + docid + "?primarypage=" + pageid, |
|
|
|
|
|
success: function () { |
|
|
|
|
|
$('autodoc_document_btn_primary').removeClass('disabled'); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
// tag menu select |
|
|
// tag menu select |
|
|
$('.autodoc_tag_list').change(function (e) { |
|
|
$('.autodoc_tag_list').change(function (e) { |
|
|
console.log(e); |
|
|
console.log(e); |
|
|
|
|
|
|
|
|
$('.autodoc_document_image').attr('src', |
|
|
$('.autodoc_document_image').attr('src', |
|
|
conf.openapi + "/pages/" + $(e.target).parent().data('pageid') + "/image" |
|
|
conf.openapi + "/pages/" + $(e.target).parent().data('pageid') + "/image" |
|
|
); |
|
|
); |
|
|
|
|
|
$('.autodoc_document_image').data('pageid', doc.pageId[i]); |
|
|
}); |
|
|
}); |
|
|
$('.autodoc_document_carousel').append(item); |
|
|
$('.autodoc_document_carousel').append(item); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
$('.autodoc_document_image').attr('src', conf.openapi + "/pages/" + doc.primaryPage + "/image"); |
|
|
$('.autodoc_document_image').attr('src', conf.openapi + "/pages/" + doc.primaryPage + "/image"); |
|
|
|
|
|
$('.autodoc_document_image').data('pageid', doc.primaryPage); |
|
|
|
|
|
|
|
|
$('.autodoc_document_carousel').slick({ |
|
|
$('.autodoc_document_carousel').slick({ |
|
|
lazyLoad: 'ondemand', |
|
|
lazyLoad: 'ondemand', |
|
|
slidesToShow: 3, |
|
|
slidesToShow: 3, |