-
Notifications
You must be signed in to change notification settings - Fork 6
/
misc.go
55 lines (42 loc) · 1.31 KB
/
misc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package event
import (
"github.com/goradd/goradd/pkg/page"
)
func Change() *page.Event {
return &page.Event{JsEvent: "change"}
}
// DragDrop returns an event that responds to the javascript drop event
func DragDrop() *page.Event {
return &page.Event{JsEvent: "drop"}
}
func Input() *page.Event {
return &page.Event{JsEvent: "input"}
}
func Select() *page.Event {
return &page.Event{JsEvent: "select"}
}
// TableSort is a custom event for responding to a table sort event
func TableSort() *page.Event {
e := &page.Event{JsEvent: "grsort"}
return e
}
const DialogButtonEvent = "gr-dlgbtn"
// DialogButton returns an event that detects clicking on a dialog's button.
func DialogButton() *page.Event {
e := &page.Event{JsEvent: DialogButtonEvent}
return e
}
const DialogClosedEvent = "grdlgclosed"
// DialogClosed indicates that a dialog has closed. This is a good time to do any required cleanup.
func DialogClosed() *page.Event {
e := &page.Event{JsEvent: DialogClosedEvent}
return e
}
// TimerExpired is used in conjunction with a JsTimer control to detect the expiration of the timer
func TimerExpired() *page.Event {
return &page.Event{JsEvent: "goradd.timerexpired"}
}
// Custom returns an event that responds to the given javascript event
func Event(event string) *page.Event {
return &page.Event{JsEvent: event}
}