Browse Source

length is a property, not a function ;)

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

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



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);


$.getJSON(conf.openapi + "/documents/" + docid, function (data) { $.getJSON(conf.openapi + "/documents/" + docid, function (data) {
$('#autodoc_home_modal_body').data('document', data); $('#autodoc_home_modal_body').data('document', data);
var pageNum; var pageNum;
for (var i = 0; i < data.pageId.length(); i++) {
for (var i = 0; i < data.pageId.length; i++) {
if (data.pageId[i] == data.primaryPage) { if (data.pageId[i] == data.primaryPage) {
pageNum = i; pageNum = i;
break; break;

Loading…
Cancel
Save