Skip to content

Commit

Permalink
Update chapter and verse counts
Browse files Browse the repository at this point in the history
  • Loading branch information
eb1 committed May 14, 2015
1 parent ef01483 commit b4ef54b
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion www/js/views/DocumentViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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 += "<br>";
Expand Down

0 comments on commit b4ef54b

Please sign in to comment.