work in progress
adding check to see if page is draft
removing extra spaces
adding back in check for undefined page state
using asPage() method to check to see if page is a draft.
removing unused method
Merge pull request #740 from Connexions/exiting-preview-causes-content-to-be-editable

Exiting preview causes content to be editable