modal

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2017 License: Apache-2.0 Imports: 7 Imported by: 10

Documentation

Overview

Copyright 2016 Wenhui Shen <www.webx.top>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultModal = Modal{
		ExtButtons: []Button{},
	}
	ReadConfigFile = func(file string) ([]byte, error) {
		return ioutil.ReadFile(file)
	}
)

Functions

func Clear

func Clear() error

func Remove

func Remove(confPath string) error

func Render

func Render(ctx echo.Context, param interface{}) template.HTML

Types

type Button

type Button struct {
	Attributes []HTMLAttr //按钮属性
	Text       string     //按钮文本
}

type HTMLAttr

type HTMLAttr struct {
	Attr  string      //属性名
	Value interface{} //属性值
}
type Modal struct {
	Id          string   //元素id
	Custom      bool     //是否自定义整个内容区域
	HeadTitle   string   //头部标题
	Title       string   //内容标题
	Content     string   //内容
	HelpText    string   //帮助提示
	Animate     string   //动画样式class名
	Type        string   //类型:warning/primary/success/danger
	ContentType string   //内容类型:form/blackform/""
	ExtButtons  []Button //附加按钮
}

Jump to

Keyboard shortcuts

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