Panel API: JS #243
taufik-nurrohman
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This article is a draft and will be moved to the official web site when the API is matured.
To prevent conflicts with third-party libraries, all JavaScript features related to Panel need to be contained in global variable
_.Dialog
_.dialog(content: string|Array|Node|NodeList, then?: Function): PromiseSpawn a basic dialog box with overlay.
_.dialog.alert(description: string): PromiseSpawn an alert dialog box with overlay.
_.dialog.confirm(description: string): PromiseSpawn a confirmation dialog box with overlay.
_.dialog.prompt(key: string, value?: string): PromiseSpawn a prompt dialog box with overlay.
Hook
_.fire(hook: string, data?: Array): Window_.off(hook: string, context?: Function): Window_.on(hook: string, then: Function): Windowchangex\panel\type\menu(),x\panel\type\stacks()andx\panel\type\tabs()can work properly when those components are rendered by AJAX call.change.stackchange.tabOnce the component is loaded by AJAX call, make sure to trigger the
changeevent:Event consumers can then re-execute their DOM manipulation tasks via this
changeevent:Keys
Global keyboard’s key maps.
Commands
Global reusable commands. Usually will be used by the
_.keysimplementation.Beta Was this translation helpful? Give feedback.
All reactions