func BeforeTransition(repo *model.Repo) jqeventrouter.HandlerFunc {
	return func(_ *jquery.Event, _ *js.Object, _ url.Values) bool {
		log.Debugf("logout BEFORE\n")

		button := jQuery("#logout")

		button.On("click", func() {
			log.Debugf("Trying to log out now\n")
			if err := repo.Logout(context.TODO()); err != nil {
				log.Printf("Logout failure: %s\n", err)
			}
			jQuery(":mobile-pagecontainer").Call("pagecontainer", "change", "/")
		})
		return true
	}
}
// BeforeTransition prepares the logout page before display.
BeforeTransition prepares the logout page before display.
// BeforeTransition prepares the logout page before display .
func BeforeTransition(repo *model.Repo) jqeventrouter.HandlerFunc {
	return func(_ *jquery.Event, _ *js.Object, _ url.Values) bool {
		log.Debugf("logout BEFORE\n")
		button := jQuery("#logout")
		button.On("click", func() {
			log.Debugf("Trying to log out now\n")
			if err := repo.Logout(context.TODO()); err != nil {
				log.Printf("Logout failure: %s\n", err)
			}
			jQuery(":mobile-pagecontainer").Call("pagecontainer", "change", "/")
		})
		return true
	}
}
func BeforeTransition ( repo * model . Repo ) jqeventrouter . HandlerFunc { return func ( _ * jquery . Event , _ * js . Object , _ url . Values ) bool { log . Debugf ( " \n " ) button := jQuery ( " " ) button . On ( " " , func ( ) { log . Debugf ( " \n " ) if err := repo . Logout ( context . TODO ( ) ) ; err != nil { log . Printf ( " \n " , err ) } jQuery ( " " ) . Call ( " " , " " , " " ) } ) return true } }
BeforeTransition prepares the logout page before display.
BeforeTransition prepares the logout page before display .