go-admin: github.com/GoAdminGroup/go-admin/template/types/action Index | Files

package action

import "github.com/GoAdminGroup/go-admin/template/types/action"

Index

Package Files

ajax.go base.go event.go fieldfilter.go file_upload.go jump.go jump_selectbox.go popup.go

func InitOperationHandlerSetter Uses

func InitOperationHandlerSetter(p context.NodeProcessor)

func URL Uses

func URL(id string) string

type AjaxAction Uses

type AjaxAction struct {
    BaseAction
    Url         string
    Method      string
    Data        AjaxData
    Alert       bool
    AlertData   AlertData
    SuccessJS   template.JS
    ErrorJS     template.JS
    ParameterJS template.JS
    Event       Event
    Handlers    []context.Handler
}

func Ajax Uses

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

func (*AjaxAction) AddData Uses

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

func (*AjaxAction) BtnAttribute Uses

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

func (*AjaxAction) ChangeHTMLWhenSuccess Uses

func (ajax *AjaxAction) ChangeHTMLWhenSuccess(identify string, text ...string) *AjaxAction

func (*AjaxAction) GetCallbacks Uses

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

func (*AjaxAction) Js Uses

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

func (*AjaxAction) SetData Uses

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

func (*AjaxAction) SetErrorJS Uses

func (ajax *AjaxAction) SetErrorJS(errorJS template.JS) *AjaxAction

func (*AjaxAction) SetEvent Uses

func (ajax *AjaxAction) SetEvent(event Event) *AjaxAction

func (*AjaxAction) SetMethod Uses

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

func (*AjaxAction) SetParameterJS Uses

func (ajax *AjaxAction) SetParameterJS(parameterJS template.JS) *AjaxAction

func (*AjaxAction) SetSuccessJS Uses

func (ajax *AjaxAction) SetSuccessJS(successJS template.JS) *AjaxAction

func (*AjaxAction) SetUrl Uses

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

func (*AjaxAction) WithAlert Uses

func (ajax *AjaxAction) WithAlert(data ...AlertData) *AjaxAction

type AjaxData Uses

type AjaxData map[string]interface{}

func NewAjaxData Uses

func NewAjaxData() AjaxData

func (AjaxData) Add Uses

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

func (AjaxData) JSON Uses

func (a AjaxData) JSON() string

type AlertData Uses

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 Uses

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

func (*BaseAction) BtnAttribute Uses

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

func (*BaseAction) BtnClass Uses

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

func (*BaseAction) ExtContent Uses

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

func (*BaseAction) FooterContent Uses

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

func (*BaseAction) GetCallbacks Uses

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

func (*BaseAction) Js Uses

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

func (*BaseAction) SetBtnData Uses

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

func (*BaseAction) SetBtnId Uses

func (base *BaseAction) SetBtnId(btnId string)

type Event Uses

type Event string
const (
    EventBlur        Event = "blur"
    EventFocus       Event = "focus"
    EventFocusin     Event = "focusin"
    EventFocusout    Event = "focusout"
    EventLoad        Event = "load"
    EventResize      Event = "resize"
    EventScroll      Event = "scroll"
    EventUnload      Event = "unload"
    EventClick       Event = "click"
    EventDblclick    Event = "dblclick"
    EventMousedown   Event = "mousedown"
    EventMouseup     Event = "mouseup"
    EventMousemove   Event = "mousemove"
    EventMouseover   Event = "mouseover"
    EventMouseout    Event = "mouseout"
    EventMouseenter  Event = "mouseenter"
    EventMouseleave  Event = "mouseleave"
    EventChange      Event = "change"
    EventSelect      Event = "select"
    EventSubmit      Event = "submit"
    EventKeydown     Event = "keydown"
    EventKeypress    Event = "keypress"
    EventKeyup       Event = "keyup"
    EventError       Event = "error"
    EventContextmenu Event = "contextmenu"
)

type FieldFilterAction Uses

type FieldFilterAction struct {
    BaseAction
    Field string
}

func FieldFilter Uses

func FieldFilter(field string) *FieldFilterAction

func (*FieldFilterAction) ExtContent Uses

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

type FileUploadAction Uses

type FileUploadAction struct {
    BaseAction
    Url      string
    Method   string
    FileName string
    Handlers []context.Handler
}

func FileUpload Uses

func FileUpload(id string, handler types.Handler) *FileUploadAction

func (*FileUploadAction) BtnAttribute Uses

func (file *FileUploadAction) BtnAttribute() template.HTML

func (*FileUploadAction) FooterContent Uses

func (file *FileUploadAction) FooterContent() template.HTML

func (*FileUploadAction) GetCallbacks Uses

func (file *FileUploadAction) GetCallbacks() context.Node

func (*FileUploadAction) Js Uses

func (file *FileUploadAction) Js() template.JS

func (*FileUploadAction) SetMethod Uses

func (file *FileUploadAction) SetMethod(method string) *FileUploadAction

func (*FileUploadAction) SetUrl Uses

func (file *FileUploadAction) SetUrl(url string) *FileUploadAction

type GetForm Uses

type GetForm func(panel *types.FormPanel) *types.FormPanel

type IframeData Uses

type IframeData struct {
    Width          string
    Height         string
    Src            string
    AddParameterFn func(ctx *context.Context) string
}

type JumpAction Uses

type JumpAction struct {
    BaseAction
    Url         string
    Target      string
    Ext         template.HTML
    NewTabTitle string
}

func Jump Uses

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

func JumpInNewTab Uses

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

func JumpWithTarget Uses

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

func (*JumpAction) BtnAttribute Uses

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

func (*JumpAction) BtnClass Uses

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

func (*JumpAction) ExtContent Uses

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

func (*JumpAction) GetCallbacks Uses

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

type JumpOption Uses

type JumpOption struct {
    Value string
    Url   string
}

type JumpOptions Uses

type JumpOptions []JumpOption

type JumpSelectBoxAction Uses

type JumpSelectBoxAction struct {
    BaseAction
    Options     JumpOptions
    NewTabTitle string
}

func SelectBoxJump Uses

func SelectBoxJump(options JumpOptions) *JumpSelectBoxAction

func (*JumpSelectBoxAction) ExtContent Uses

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

type PopUpAction Uses

type PopUpAction struct {
    BaseAction
    Url         string
    Method      string
    Id          string
    Title       string
    Draggable   bool
    Width       string
    Height      string
    HasIframe   bool
    HideFooter  bool
    BtnTitle    template.HTML
    ParameterJS template.JS
    Data        AjaxData
    Handlers    []context.Handler
    Event       Event
}
func PopUp(id, title string, handler types.Handler) *PopUpAction

func PopUpWithForm Uses

func PopUpWithForm(data PopUpData, fn GetForm, url string) *PopUpAction

func PopUpWithIframe Uses

func PopUpWithIframe(id, title string, data IframeData, width, height string) *PopUpAction

func (*PopUpAction) BtnAttribute Uses

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

func (*PopUpAction) FooterContent Uses

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

func (*PopUpAction) GetCallbacks Uses

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

func (*PopUpAction) Js Uses

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

func (*PopUpAction) SetBtnTitle Uses

func (pop *PopUpAction) SetBtnTitle(title template.HTML) *PopUpAction

func (*PopUpAction) SetData Uses

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

func (*PopUpAction) SetDraggable Uses

func (pop *PopUpAction) SetDraggable() *PopUpAction

func (*PopUpAction) SetEvent Uses

func (pop *PopUpAction) SetEvent(event Event) *PopUpAction

func (*PopUpAction) SetHeight Uses

func (pop *PopUpAction) SetHeight(height string) *PopUpAction

func (*PopUpAction) SetMethod Uses

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

func (*PopUpAction) SetParameterJS Uses

func (pop *PopUpAction) SetParameterJS(parameterJS template.JS) *PopUpAction

func (*PopUpAction) SetUrl Uses

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

func (*PopUpAction) SetWidth Uses

func (pop *PopUpAction) SetWidth(width string) *PopUpAction

type PopUpData Uses

type PopUpData struct {
    Id     string
    Title  string
    Width  string
    Height string
}

Package action imports 14 packages (graph) and is imported by 8 packages. Updated 2020-08-13. Refresh now. Tools for package owners.