//Injects edit handler event func NewEvents() { editEvents := event.Events{ { JsEvent: "submit", Origin: "#form-new", Type: "EVENT", Route: "/model/new/", Handler: AddHandler, }, } handle, _, _ := router.GetRouter().Lookup("EVENT", "/model/new/") if handle == nil { event.AddEvents(editEvents) drops.RegisterHandlers(editEvents) } }
func NewDrops() { router.InitRouter() rtr = router.GetRouter() session.NewSessionStore() event.NewEventStore() }