Rev 13 | 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.email_link').each(function() { |
||
13 | var $link = $(this); |
||
14 | var $dialog = $('<div id="email_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 | position: '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: '#email_form', |
||
32 | success: function() { |
||
15 | kardasa | 33 | $('#email_form > #form-idicator').hide(); |
3 | kardasa | 34 | $('#email_form > form').ajaxForm(options); |
35 | }, |
||
36 | beforeSubmit: function() { |
||
37 | $('#email_form > #form-indicator').show(); |
||
38 | } |
||
39 | }; |
||
40 | $dialog.load($link.attr('href'),function(){ |
||
41 | $('#email_form > form').ajaxForm(options); |
||
15 | kardasa | 42 | $('#ajax-indicator').hide(); |
43 | $('#overlay').hide(); |
||
3 | kardasa | 44 | $dialog.dialog('open'); |
45 | }); |
||
46 | return false; |
||
47 | }); |
||
48 | }); |
||
49 | }); |