Subversion Repositories My Stuff

Rev

Rev 13 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
13 kardasa 1
/*#######################################################################
3 kardasa 2
# This script is distributed in the hope that it will be useful,
3
# but WITHOUT ANY WARRANTY; without even the implied warranty of
4
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5
# GNU General Public License for more details.
6
# Author: Andrzej Kardaś
7
# License: GPLv3
8
# The full version of the licencse can be obtainted by visiting:
9
# http://www.gnu.org/licenses/gpl.html
13 kardasa 10
#######################################################################*/
3 kardasa 11
$(document).ready(function() {
12
        $('a.sms_link').each(function() {
13
                var $link = $(this);
14
                var $dialog = $('<div id="sms_form"></div>')
15
                        .dialog({
16
                                autoOpen: false,
17
                                width: 780,
18
                                height: 'auto',
19
                                title: $link.attr('title'),
20
                                resizable: false,
15 kardasa 21
                                modal: true,
22
                                postion: 'center',
3 kardasa 23
                                show: 'blind',
24
                                hide: 'explode'
25
                        });
26
 
27
                $link.click(function() {
28
                        $('#overlay').show();
29
                        $('#ajax-indicator').show();
30
                        var options = {
31
                        target: '#sms_form',
32
                        success: function() {
15 kardasa 33
                                $('#sms_form > #form-indicator').hide();
34
                            $('#sms_form > form').ajaxForm(options);
3 kardasa 35
                        },
36
                        beforeSubmit: function() {
15 kardasa 37
                            $('#sms_form > #form-indicator').show();
3 kardasa 38
                        }
39
                        };
40
                        $dialog.load($link.attr('href'),function(){
15 kardasa 41
                            $('#sms_form > form').ajaxForm(options);
42
                $('#ajax-indicator').hide();
43
                $('#overlay').hide();
44
                            $dialog.dialog('open');
3 kardasa 45
                        });
46
                        return false;
47
                });
48
        });
49
});