1 jQuery(document).ready(function($){ |
1 jQuery(document).ready(function($){ |
2 $(".networkpubre").bind("click", function(e) { |
2 $(".networkpublisherremove").bind("click", function(e) { |
|
3 $("#networkpub_remove").html('<div class="updated fade" style="padding:5px;text-align:center">'+$("#networkpub_text_removing").val()+'.</div>') |
3 var key = $(this).attr("id"); |
4 var key = $(this).attr("id"); |
|
5 $(this).parent().parent().css('opacity','.30'); |
4 if(key) { |
6 if(key) { |
5 var blog_url = $("#networkpub_plugin_url").val(); |
7 var blog_url = $("#networkpub_plugin_url").val(); |
6 $.post(blog_url+"/network-publisher/networkpub_ajax.php", {key:key}, function(data) { |
8 $.post(blog_url+"networkpub_ajax.php", {action:"networkpub_remove", networkpub_key:key}, function(data) { |
7 var dr = data.split("_"); |
9 if(data != key) { |
8 $("#r_key_"+dr[1]).remove(); |
10 $("#networkpub_remove").html('<div class="updated fade" style="padding:5px;text-align:center">'+$("#networkpub_text_an_error_occured").val()+': <a href="http://www.linksalpha.com/publisher/pubs">'+$("#networkpub_text_linksalpha_publisher").val()+'</a></div>'); |
|
11 } else { |
|
12 var dr = data.split("_"); |
|
13 $("#r_key_"+dr[1]).remove(); |
|
14 $("#networkpub_remove").html('<div class="updated fade" style="padding:5px;text-align:center">'+$("#networkpub_text_publication_has_been_removed").val()+'</div>') |
|
15 } |
9 }); |
16 }); |
10 } |
17 } |
11 return false; |
18 return false; |
12 }); |
19 }); |
13 }) |
20 $.receiveMessage( |
|
21 function(e){ |
|
22 $("#networkpub_postbox").height(e.data.split("=")[1]+'px'); |
|
23 }, |
|
24 'http://www.linksalpha.com' |
|
25 ); |
|
26 $("#site_links").live("change", function(event) { |
|
27 $.postMessage( |
|
28 $(this).val(), |
|
29 'http://www.linksalpha.com/post', |
|
30 parent |
|
31 ); |
|
32 }); |
|
33 }); |