From b4ef54b614d2d66559e2c5a5f24eaebaacef15df Mon Sep 17 00:00:00 2001 From: eb1 Date: Thu, 14 May 2015 13:04:33 -0500 Subject: [PATCH] Update chapter and verse counts --- www/js/views/DocumentViews.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/www/js/views/DocumentViews.js b/www/js/views/DocumentViews.js index 8a0cbafb..54566f77 100644 --- a/www/js/views/DocumentViews.js +++ b/www/js/views/DocumentViews.js @@ -426,6 +426,11 @@ define(function (require) { // update the last chapter's verseCount chapter.set('versecount', verseCount); chapter.trigger('change'); + // update the verse count and last adapted verse for the book + if (verseCount > 0) { + verses.push(verseCount); + } + book.set('chapters', verses); // update the status var curStatus = $("#status2").html(); if (curStatus.length > 0) { @@ -626,6 +631,9 @@ define(function (require) { sourcePhrases.add(sp); sp.trigger('change'); }); + // update the last chapter's verseCount + chapter.set('versecount', verseCount); + chapter.trigger('change'); // update the verse count and last adapted verse for the book if (verseCount > 0) { verses.push(verseCount); @@ -842,7 +850,15 @@ define(function (require) { } } } - + // update the last chapter's verseCount + chapter.set('versecount', verseCount); + chapter.trigger('change'); + // update the verse count and last adapted verse for the book + if (verseCount > 0) { + verses.push(verseCount); + } + book.set('chapters', verses); + // done parsing -- update the status if (status.length > 0) { status += "
";