action

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2020 License: Apache-2.0 Imports: 9 Imported by: 65

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AjaxAction added in v1.2.0

type AjaxAction struct {
	BtnId    string
	Url      string
	Method   string
	Data     AjaxData
	Handlers []context.Handler
}

func Ajax added in v1.2.0

func Ajax(url string, handler Handler) *AjaxAction

func (*AjaxAction) BtnAttribute added in v1.2.0

func (ajax *AjaxAction) BtnAttribute() template.HTML

func (*AjaxAction) BtnClass added in v1.2.0

func (ajax *AjaxAction) BtnClass() template.HTML

func (*AjaxAction) ExtContent added in v1.2.0

func (ajax *AjaxAction) ExtContent() template.HTML

func (*AjaxAction) GetCallbacks added in v1.2.0

func (ajax *AjaxAction) GetCallbacks() context.Node

func (*AjaxAction) Js added in v1.2.0

func (ajax *AjaxAction) Js() template.JS

func (*AjaxAction) SetBtnId added in v1.2.0

func (ajax *AjaxAction) SetBtnId(btnId string)

func (*AjaxAction) SetData added in v1.2.0

func (ajax *AjaxAction) SetData(data map[string]interface{}) *AjaxAction

func (*AjaxAction) SetMethod added in v1.2.0

func (ajax *AjaxAction) SetMethod(method string) *AjaxAction

func (*AjaxAction) SetUrl added in v1.2.0

func (ajax *AjaxAction) SetUrl(url string) *AjaxAction

type AjaxData added in v1.2.0

type AjaxData map[string]interface{}

func NewAjaxData added in v1.2.0

func NewAjaxData() AjaxData

func (AjaxData) Add added in v1.2.0

func (a AjaxData) Add(m map[string]interface{}) AjaxData

func (AjaxData) JSON added in v1.2.0

func (a AjaxData) JSON() string

type Handler added in v1.2.0

type Handler func(ctx *context.Context) (success bool, data, msg string)

func (Handler) Wrap added in v1.2.0

func (h Handler) Wrap() context.Handler

type JumpAction

type JumpAction struct {
	BtnId       string
	Url         string
	Ext         template.HTML
	JS          template.JS
	NewTabTitle string
}

func Jump

func Jump(url string, ext ...template.HTML) *JumpAction

func JumpInNewTab added in v1.2.0

func JumpInNewTab(url, title string, ext ...template.HTML) *JumpAction

func (*JumpAction) BtnAttribute

func (jump *JumpAction) BtnAttribute() template.HTML

func (*JumpAction) BtnClass added in v1.2.0

func (jump *JumpAction) BtnClass() template.HTML

func (*JumpAction) ExtContent

func (jump *JumpAction) ExtContent() template.HTML

func (*JumpAction) GetCallbacks added in v1.1.8

func (jump *JumpAction) GetCallbacks() context.Node

func (*JumpAction) Js

func (jump *JumpAction) Js() template.JS

func (*JumpAction) SetBtnId

func (jump *JumpAction) SetBtnId(btnId string)

type PopUpAction

type PopUpAction struct {
	BtnId    string
	Url      string
	Method   string
	Id       string
	Title    string
	Data     AjaxData
	Handlers []context.Handler
}
func PopUp(url, title string, handler Handler) *PopUpAction

func (*PopUpAction) BtnAttribute

func (pop *PopUpAction) BtnAttribute() template.HTML

func (*PopUpAction) BtnClass added in v1.2.0

func (pop *PopUpAction) BtnClass() template.HTML

func (*PopUpAction) ExtContent

func (pop *PopUpAction) ExtContent() template.HTML

func (*PopUpAction) GetCallbacks added in v1.1.8

func (pop *PopUpAction) GetCallbacks() context.Node

func (*PopUpAction) Js

func (pop *PopUpAction) Js() template.JS

func (*PopUpAction) SetBtnId

func (pop *PopUpAction) SetBtnId(btnId string)

func (*PopUpAction) SetData added in v1.2.0

func (pop *PopUpAction) SetData(data map[string]interface{}) *PopUpAction

func (*PopUpAction) SetMethod added in v1.1.8

func (pop *PopUpAction) SetMethod(method string) *PopUpAction

func (*PopUpAction) SetUrl added in v1.1.8

func (pop *PopUpAction) SetUrl(url string) *PopUpAction

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL