oerpub/github-bookeditor — pull request #129 by izak (2013-12-13 12:03:09+00:00)
Title: Update Editor title when deleting a book, handle deletion of first book.

This PR fixes two issues. I set up wanting to fix the editor title issue, but ended up fixing the other one too.

When you delete the first book, the editor did not properly switch to a new book. This happened because the removeMe() call uses require() to pull in EpubContainer, and this causes the actual deletion to be delayed enough that the "first next book" is the same book.

Secondly, the editor title is now cleared when the editor is closed, which has the effect that deleting a book no longer leaves the module title hanging.