Subversion Repositories Integrator Subversion

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 espaco 1
var UINotific8 = function () {
2
 
3
    return {
4
        //main function to initiate the module
5
        init: function () {
6
 
7
 
8
                    $('#notific8_show').click(function(event) {
9
                        var settings = {
10
                                theme: $('#notific8_theme').val(),
11
                                sticky: $('#notific8_sticky').is(':checked'),
12
                                horizontalEdge: $('#notific8_pos_hor').val(),
13
                                verticalEdge: $('#notific8_pos_ver').val()
14
                            },
15
                            $button = $(this);
16
 
17
                        if ($.trim($('#notific8_heading').val()) != '') {
18
                            settings.heading = $.trim($('#notific8_heading').val());
19
                        }
20
 
21
                        if (!settings.sticky) {
22
                            settings.life = $('#notific8_life').val();
23
                        }
24
 
25
                        $.notific8('zindex', 11500);
26
                        $.notific8($.trim($('#notific8_text').val()), settings);
27
 
28
                        $button.attr('disabled', 'disabled');
29
 
30
                        setTimeout(function() {
31
                            $button.removeAttr('disabled');
32
                        }, 1000);
33
 
34
                    });
35
 
36
        }
37
 
38
    };
39
 
40
}();
41
 
42
jQuery(document).ready(function() {    
43
   UINotific8.init();
44
});