/
javascript.txt
62 lines (33 loc) · 1.68 KB
/
javascript.txt
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
56
57
58
59
60
61
62
JavaScript
==========
Nuit provides a number of JavaScript hooks to dynamically alter the Nuit elements of your page.
.. function:: nuit.add_message(alert_type, message)
Inject a message box onto the page.
:param str alert_type: The type of message: one of ``debug``, ``info``, ``success``, ``warning``, or ``error``.
:param str message: The message to display.
.. function:: nuit.confirmation_box(options)
Display a confirmation box.
:param dict options: Optional parameters to customise the confirmation box.
.. attribute:: title
:default: 'Confirmation required'
The title for the confirmation box.
.. attribute:: description
:default: '<p>Are you sure you wish to perform this action?</p>'
A more detailed description of what the confirmation box is for.
.. attribute:: size
:default: 'tiny'
A Foundation attribute for the size of the box: one of ``tiny``, ``small``, ``medium``, ``large``, ``xlarge``. Applied as a class, so you can define your own.
.. attribute:: yes
:default: 'Yes'
The text for the confirm button.
.. attribute:: no
:default: 'No'
The text for the abort button.
.. attribute:: on_confirm
A function that gets executed when the user clicks the confirm button.
.. attribute:: on_abort
A function that gets executed when the user clicks the abort button.
.. function:: nuit.button_bar_value(button_bar, [value])
Get or set the value of a button bar.
:param obj button_bar: a jQuery object of the button bar.
:param str value: The value to set the object to. If ommitted, the current value is returned instead.