Last change
on this file since 19961 was
16458,
checked in by grum, 12 years ago
|
feature:2634- compatibility with Piwigo 2.4
Update URI + small changes
|
File size:
1.4 KB
|
Rev | Line | |
---|
[12215] | 1 | /** |
---|
| 2 | * ----------------------------------------------------------------------------- |
---|
| 3 | * file: markup.formMail.js |
---|
| 4 | * file version: 1.0.0 |
---|
| 5 | * date: 2011-09-20 |
---|
| 6 | * |
---|
| 7 | * JS file provided by the piwigo's plugin "GrumPluginClasses" |
---|
| 8 | * |
---|
| 9 | * ----------------------------------------------------------------------------- |
---|
| 10 | * Author : Grum |
---|
| 11 | * email : grum@piwigo.com |
---|
[16458] | 12 | * website : http://www.grum.fr |
---|
[12215] | 13 | * |
---|
| 14 | * << May the Little SpaceFrog be with you ! >> |
---|
| 15 | * ----------------------------------------------------------------------------- |
---|
| 16 | */ |
---|
| 17 | $(window).bind('load', |
---|
| 18 | function () |
---|
| 19 | { |
---|
| 20 | |
---|
| 21 | $('#iSubmit').bind('click', |
---|
| 22 | function () |
---|
| 23 | { |
---|
| 24 | var data = { |
---|
| 25 | email:$('#iEmail').val(), |
---|
| 26 | subject:$('#iSubject').val(), |
---|
| 27 | msg:$('#iMessageContent').val(), |
---|
| 28 | token:$('#iToken').val(), |
---|
| 29 | ajaxfct:"public.contact.sendMsg" |
---|
| 30 | }; |
---|
| 31 | |
---|
| 32 | $.ajax( |
---|
| 33 | { |
---|
| 34 | type: "POST", |
---|
| 35 | url: "plugins/GrumPluginClasses/gpc_ajax.php", |
---|
| 36 | async: true, |
---|
| 37 | data: data, |
---|
| 38 | success: |
---|
| 39 | function(msg) |
---|
| 40 | { |
---|
| 41 | result=$.parseJSON(msg); |
---|
| 42 | if(result.result) |
---|
| 43 | { |
---|
| 44 | $('#iGpcFormMail').html(result.msg); |
---|
| 45 | } |
---|
| 46 | else |
---|
| 47 | { |
---|
| 48 | alert(result.msg); |
---|
| 49 | } |
---|
| 50 | } |
---|
| 51 | } |
---|
| 52 | ); |
---|
| 53 | } |
---|
| 54 | ); |
---|
| 55 | |
---|
| 56 | } |
---|
| 57 | ); |
---|
Note: See
TracBrowser
for help on using the repository browser.