PluginProbe
Gianism / 1.1
Gianism v1.1
4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.4.0 5.0.0 5.0.1 5.0.2 5.1.0 5.2.1 5.2.2 5.3.0 6.0.0 6.0.1 trunk 1.0 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 All 65 releases
gianism / assets / message-manager.js

message-manager.js in Gianism 1.1, at assets/message-manager.js

31 lines 762 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5
6
7 jQuery(document).ready(function($){
8 //Do Ajax Message Delete
9 $('.wpg-message a.delete').click(function(e){
10 e.preventDefault();
11 var tr = $(this).parents('tr');
12 if(confirm(WPG.deleteConfirm)){
13 $.post(WPG.endpoint, {
14 action: WPG.action,
15 _wpnonce: WPG.nonce,
16 post_id: $(this).attr('href').replace(/[^0-9]/g, '')
17 }, function(response){
18 if(response.status == true){
19 tr.fadeOut('normal', function(){
20 $(this).remove();
21 if($('.wpg-message tr').length < 1){
22 $('.wpg-message table').replaceWith('<p>' + WPG.deleteComplete + '</p>');
23 }
24 });
25 }else{
26 alert(WPG.deleteFailed);
27 }
28 });
29 }
30 });
31 });