replace [0].innerHTML with .html()
remove whitespace
repalce ! with not keyword
Avoid re-initialising client unnecessarily.
Merge branch 'master' into atc-make-book-use-shared-toc-node

Conflicts:
	scripts/gh-book/toc-pointer-node.coffee
	scripts/models/content/book.coffee
make dfs/bfs and getChildren optional

Folders to not use TocPointerNode so they do not have a tree structure
Merge branch 'master' into atc-restructure-folder

Conflicts:
	scripts/gh-book/toc-pointer-node.coffee
	scripts/models/content/book.coffee
Merge branch 'master' into avoid-running-two-updaters
Don't attempt a connection when session is initialised.

A connection only makes sense once the session has been initialised with
login details. Once the app sets these details, the change event handler
will initialise the session.
Remove dead code.

The "else if" part seems to contain keys that are also tested for in the "if"
part.
More direct approach to loading the 1st module when the repo changes.

Too many things change the session in various places, so we cannot rely
on a session change to signal this. By instead explicitly firing a
settings-changed event in the one place this happens, we can bind to that
event specifically.
reset keepUpdating flag as soon as possible to avoid race condition.

It was possible for two updaters to run because the 15 second timeout runs
before the flag is set to false.
Merge remote-tracking branch 'origin/master' into avoid-running-two-updaters
Correctly flag completion of update even if the promise fails.

A failed update would leave _promiseRunning set, causing an incorrect
exception to be thrown the next time round.
Merge pull request #102 from oerpub/atc-dfs-optional

Atc make dfs/bfs and getChildren optional (Should not affect gh-book)
Merge pull request #110 from oerpub/avoid-running-two-updaters

Avoid the exception where two updaters run at the same time
Merge pull request #92 from oerpub/atc-make-book-use-shared-toc-node

Atc make book use shared toc node (Should not affect gh-book assuming other PRs merge)
Merge pull request #94 from oerpub/atc-restructure-folder

Atc restructure folder code (Should not affect gh-book; depends on PRs)
Merge pull request #99 from oerpub/atc-code-cleanup

Atc code cleanup
Merge branch 'master' into atc-new-url-for-folder