Rewrote dialogs for AngularJS.
Merge branch 'dialogs'