Browse Source

beautify

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

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

page_home_scroll(); page_home_scroll();
}); });


$('#autodoc_home_modal_left').mouseenter(function(e) {
$(e.target).fadeTo("slow", 0.8);
})
.mouseleave(function(e) {
$('#autodoc_home_modal_left').mouseenter(function (e) {
$(e.target).fadeTo("slow", 0.8);
})
.mouseleave(function (e) {
$(e.target).fadeTo("slow", 0.15); $(e.target).fadeTo("slow", 0.15);
}) })
.click(function(e) {
home_modal_page_prev();
.click(function (e) {
home_modal_page_prev();
}); });


$('#autodoc_home_modal_right').mouseenter(function(e) {
$(e.target).fadeTo("slow", 0.8);
})
.mouseleave(function(e) {
$('#autodoc_home_modal_right').mouseenter(function (e) {
$(e.target).fadeTo("slow", 0.8);
})
.mouseleave(function (e) {
$(e.target).fadeTo("slow", 0.15); $(e.target).fadeTo("slow", 0.15);
}) })
.click(function(e) {
home_modal_page_next();
.click(function (e) {
home_modal_page_next();
}); });


}); });




function home_modal_page(pageNum) { function home_modal_page(pageNum) {
var doc = $('#autodoc_home_modal_body').data('document');
var doc = $('#autodoc_home_modal_body').data('document');
var pageTotal = doc.pageId.length(); var pageTotal = doc.pageId.length();


$('#autodoc_home_modal_body').data('pageNum', pageNum); $('#autodoc_home_modal_body').data('pageNum', pageNum);


$('#autodoc_home_modal_img').attr('src', $('#autodoc_home_modal_img').attr('src',
conf.openapi +
"/pages/" +
doc.pageId[pageNum] +
"/image");
conf.openapi +
"/pages/" +
doc.pageId[pageNum] +
"/image");
} }


function home_modal_page_prev() { function home_modal_page_prev() {
home_modal_page(
$('#autodoc_home_modal_body').data('pageNum') - 1 );
home_modal_page(
$('#autodoc_home_modal_body').data('pageNum') - 1);
} }


function home_modal_page_next() { function home_modal_page_next() {
home_modal_page(
$('#autodoc_home_modal_body').data('pageNum') + 1 );
home_modal_page(
$('#autodoc_home_modal_body').data('pageNum') + 1);
} }


function home_modal_open(docid) { function home_modal_open(docid) {
$.getJSON(conf.openapi + "/documents/" + docid, function(data) {
$('#autodoc_home_modal_body').data('document', data);
home_modal_page(data.primaryPage);
$('#autodoc_home_modal').modal('show');
$.getJSON(conf.openapi + "/documents/" + docid, function (data) {
$('#autodoc_home_modal_body').data('document', data);
home_modal_page(data.primaryPage);
$('#autodoc_home_modal').modal('show');
}); });
} }



Loading…
Cancel
Save