Subversion Repositories My Stuff

Rev

Rev 13 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13 Rev 15
Line 6... Line 6...
6
# Author: Andrzej Kardaś
6
# Author: Andrzej Kardaś
7
# License: GPLv3
7
# License: GPLv3
8
# The full version of the licencse can be obtainted by visiting:
8
# The full version of the licencse can be obtainted by visiting:
9
# http://www.gnu.org/licenses/gpl.html
9
# http://www.gnu.org/licenses/gpl.html
10
#######################################################################*/
10
#######################################################################*/
11
$.fx.speeds._default = 1000;
-
 
12
$(document).ready(function() {
11
$(document).ready(function() {
13
        $('a.email_link').each(function() {
12
        $('a.email_link').each(function() {
14
                var $link = $(this);
13
                var $link = $(this);
15
                var $dialog = $('<div id="email_form"></div>')
14
                var $dialog = $('<div id="email_form"></div>')
16
                        .dialog({
15
                        .dialog({
17
                                autoOpen: false,
16
                                autoOpen: false,
18
                                width: 780,
17
                                width: 780,
19
                                height: 'auto',
18
                                height: 'auto',
20
                                title: $link.attr('title'),
19
                                title: $link.attr('title'),
21
                                resizable: false,
20
                                resizable: false,
22
                                modal: true,
-
 
-
 
21
                modal: true,
-
 
22
                position: 'center',
23
                                show: 'blind',
23
                                show: 'blind',
24
                                hide: 'explode'
24
                                hide: 'explode'
25
                        });
25
                        });
26
26
27
                $link.click(function() {
27
                $link.click(function() {
28
                        $('#overlay').show();
28
                        $('#overlay').show();
29
                        $('#ajax-indicator').show();
29
                        $('#ajax-indicator').show();
30
                        var options = {
30
                        var options = {
31
                        target: '#email_form',
31
                        target: '#email_form',
32
                        success: function() {
32
                        success: function() {
33
                              $('#email_form > #form-idicator').hide();
-
 
-
 
33
                  $('#email_form > #form-idicator').hide();
34
                              $('#email_form > form').ajaxForm(options);
34
                              $('#email_form > form').ajaxForm(options);
35
                        },
35
                        },
36
                        beforeSubmit: function() {
36
                        beforeSubmit: function() {
37
                              $('#email_form > #form-indicator').show();
37
                              $('#email_form > #form-indicator').show();
38
                        }
38
                        }
39
                        };
39
                        };
40
                        $dialog.load($link.attr('href'),function(){
40
                        $dialog.load($link.attr('href'),function(){
41
                              $('#email_form > form').ajaxForm(options);
41
                              $('#email_form > form').ajaxForm(options);
42
                              $('#ajax-indicator').hide();
-
 
43
                              $('#overlay').hide();
-
 
-
 
42
                  $('#ajax-indicator').hide();
-
 
43
                  $('#overlay').hide();
44
                              $dialog.dialog('open');
44
                              $dialog.dialog('open');
45
                        });
45
                        });
46
                        return false;
46
                        return false;
47
                });
47
                });
48
        });
48
        });