forked from nyarly/NinjaScript
-
Notifications
You must be signed in to change notification settings - Fork 1
Configuration
Judson edited this page Jul 7, 2011
·
3 revisions
By sending an object to Ninja.configure()
, you can set lots of defaults for prepackaged behaviors. Any setting can be passed here, and will be applied across the whole application in preference to the shipped defaults for the packaged behaviors. A few settings come pre-set. The details of those settings are:
- messageList: string
- A selector to find the block that messages should be appended to. If it’s missing, messages will be silently dropped. Default value:
#messages
- messageWrapping: function(text, classes)
- A function that receives the text of a message for the user, and a classes and returns an HTML fragment to be inserted into the messages node. The default emits something like:
- busyLaziness: millis
- Delay before we put an overlay over “busy” elements – helps reduce flickering overlays. Default: 200
<div class='flash {classes}"'><p>{text}</p></div>