action

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: Apache-2.0 Imports: 11 Imported by: 73

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func URL added in v1.2.7

func URL(id string) string

Types

type AjaxAction added in v1.2.0

type AjaxAction struct {
	BaseAction
	Url       string
	Method    string
	Data      AjaxData
	Alert     bool
	AlertData AlertData
	Handlers  []context.Handler
}

func Ajax added in v1.2.0

func Ajax(id string, handler types.Handler) *AjaxAction

func (*AjaxAction) BtnAttribute added in v1.2.0

func (ajax *AjaxAction) BtnAttribute() 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) 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

func (*AjaxAction) WithAlert added in v1.2.3

func (ajax *AjaxAction) WithAlert(data ...AlertData) *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 AlertData added in v1.2.3

type AlertData struct {
	Title              string `json:"title"`
	Type               string `json:"type"`
	ShowCancelButton   bool   `json:"showCancelButton"`
	ConfirmButtonColor string `json:"confirmButtonColor"`
	ConfirmButtonText  string `json:"confirmButtonText"`
	CloseOnConfirm     bool   `json:"closeOnConfirm"`
	CancelButtonText   string `json:"cancelButtonText"`
}

type BaseAction added in v1.2.4

type BaseAction struct {
	BtnId   string
	BtnData interface{}
	JS      template.JS
}

func (*BaseAction) BtnAttribute added in v1.2.4

func (base *BaseAction) BtnAttribute() template.HTML

func (*BaseAction) BtnClass added in v1.2.4

func (base *BaseAction) BtnClass() template.HTML

func (*BaseAction) ExtContent added in v1.2.4

func (base *BaseAction) ExtContent() template.HTML

func (*BaseAction) FooterContent added in v1.2.6

func (base *BaseAction) FooterContent() template.HTML

func (*BaseAction) GetCallbacks added in v1.2.4

func (base *BaseAction) GetCallbacks() context.Node

func (*BaseAction) Js added in v1.2.4

func (base *BaseAction) Js() template.JS

func (*BaseAction) SetBtnData added in v1.2.4

func (base *BaseAction) SetBtnData(data interface{})

func (*BaseAction) SetBtnId added in v1.2.4

func (base *BaseAction) SetBtnId(btnId string)

type FieldFilterAction added in v1.2.4

type FieldFilterAction struct {
	BaseAction
	Field string
}

func FieldFilter added in v1.2.4

func FieldFilter(field string) *FieldFilterAction

func (*FieldFilterAction) ExtContent added in v1.2.4

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

type JumpAction

type JumpAction struct {
	BaseAction
	Url         string
	Ext         template.HTML
	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

type JumpOption added in v1.2.4

type JumpOption struct {
	Value string
	Url   string
}

type JumpOptions added in v1.2.4

type JumpOptions []JumpOption

type JumpSelectBoxAction added in v1.2.4

type JumpSelectBoxAction struct {
	BaseAction
	Options     JumpOptions
	NewTabTitle string
}

func SelectBoxJump added in v1.2.4

func SelectBoxJump(options JumpOptions) *JumpSelectBoxAction

func (*JumpSelectBoxAction) ExtContent added in v1.2.4

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

type PopUpAction

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

func (*PopUpAction) BtnAttribute

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

func (*PopUpAction) FooterContent added in v1.2.6

func (pop *PopUpAction) FooterContent() 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) 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