33
GvaScript Library
Embed Size (px)
DESCRIPTION
yet another javascript widgets library
Citation preview
2.
- pronounced as gee-vascript
- javascriptlibrary born in Geneva, Switzerland
3.
-
http://search.cpan.org/dist/Alien-GvaScript/lib/Alien/GvaScript.pm
- http://code.google.com/p/gvascript/
4. 5. core extends prototype framework fills in the blanks where
prototype left off 6.
- binds a handler to an event for elements matching a
selector
- Event.register&Event.unregister
- Element#register&Element#unregister
- document.register&document.unregister
7.
- binds a handler to a sequence of keys for a given
element/document
8.
- Prototype.getJSON(url, callback)
- loads a JSON from a remote URL
- when ready -> callback(json_data)
9.
10. 11.
- 4 different types for datasource
12.
-
- autoSuggest / autosuggestDelay
-
- minWidth / maxHeight / offsetX
13.
14.
- easy mapping of dependent fields
-
- options.dependentFields = {src: target[, ]}
=> DEMO 15.
- Support node lazy loading
- Support node HTML content
16.
-
- onBeforeLoadContent / onAfterLoadContent
=> DEMO 17.
- Neat rendering of buttons (CSS)
- Easy navigation with keys
=> DEMO 18.
- Easy navigation with keys
- Easy inclusion of CustomButtons
19.
=> DEMO 20.
- Helpers to serialize/de-serialize form data
-
- GvaScript.Form#fill_from_tree
- Easy inclusion of custom buttons
21.
- Support for repeatable sections
GvaScript.Form.add('authors') GvaScript.Form.remove('authors.1')
22.
- Uses event delegation to register events on the form level
- SupportsallW3C standard events
-
- click, mouseover, mouseout, focus, blur, change
- Supports a custom event init on form controls
- init gets fired when a control gets initialized with
GvaScript.Form#init
23.
24.
25. new GvaScript.Form(...) onInit form.submit() onBeforeSubmit
? onSubmit onChange control change [return false] onBeforeDestroy
form.destroy() 26.
- Use fire method to fire custom events
- GvaScript.Form#fire(XYZ, arg)
-
- calls onXYZ callback if any
-
- passes instance as a first argument
27.
- Applicable to all GvaScript.Form instances
- Execute*after*instance callback
28.
- Applicable to all GvaScript.Form instances
- Execute*before*instance callback
29. form.fire('XYZ'[, arg]) EarlyResponders Responders callback
Execution chain will stop whenever *any* of the responders or
instance callback returns *false* 30.
- Global Responders can be used to
-
- Define global behavior of forms
-
- Plugin form control masking
=> DEMO 31. 32.
- Use GvaScript.KeyMap to extend DOM elements with
-
- Element#keyListen(keyRegex, handler)
-
- Element#stopKeyListening(keyRegex[, handler])
33. Thanks !!Questions ??