Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | var UIBootstrapGrowl = function() { |
| 2 | |||
| 3 | return { |
||
| 4 | //main function to initiate the module |
||
| 5 | init: function() { |
||
| 6 | |||
| 7 | |||
| 8 | $('#bs_growl_show').click(function(event) { |
||
| 9 | |||
| 10 | $.bootstrapGrowl($('#growl_text').val(), { |
||
| 11 | ele: 'body', // which element to append to |
||
| 12 | type: $('#growl_type').val(), // (null, 'info', 'danger', 'success', 'warning') |
||
| 13 | offset: { |
||
| 14 | from: $('#growl_offset').val(), |
||
| 15 | amount: parseInt($('#growl_offset_val').val()) |
||
| 16 | }, // 'top', or 'bottom' |
||
| 17 | align: $('#growl_align').val(), // ('left', 'right', or 'center') |
||
| 18 | width: parseInt($('#growl_width')), // (integer, or 'auto') |
||
| 19 | delay: $('#growl_delay').val(), // Time while the message will be displayed. It's not equivalent to the *demo* timeOut! |
||
| 20 | allow_dismiss: $('#glowl_dismiss').is(":checked"), // If true then will display a cross to close the popup. |
||
| 21 | stackup_spacing: 10 // spacing between consecutively stacked growls. |
||
| 22 | }); |
||
| 23 | |||
| 24 | }); |
||
| 25 | |||
| 26 | } |
||
| 27 | |||
| 28 | }; |
||
| 29 | |||
| 30 | }(); |
||
| 31 | |||
| 32 | jQuery(document).ready(function() { |
||
| 33 | UIBootstrapGrowl.init(); |
||
| 34 | }); |