author | Anthony Ly <anthonyly.com@gmail.com> |
Mon, 19 Nov 2012 18:26:13 +0100 | |
changeset 194 | 32102edaa81b |
parent 170 | 8e3a5a6fc63e |
child 204 | 09a1c134465b |
permissions | -rw-r--r-- |
170
8e3a5a6fc63e
English version just for user loged view
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
1 |
jQuery(document).ready(function($){ |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
2 |
$(".networkpublisherremove").bind("click", function(e) { |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
3 |
$("#networkpub_remove").html('<div class="updated fade" style="padding:5px;text-align:center">'+$("#networkpub_text_removing").val()+'.</div>') |
170
8e3a5a6fc63e
English version just for user loged view
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
4 |
var key = $(this).attr("id"); |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
5 |
$(this).parent().parent().css('opacity','.30'); |
170
8e3a5a6fc63e
English version just for user loged view
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
6 |
if(key) { |
8e3a5a6fc63e
English version just for user loged view
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
7 |
var blog_url = $("#networkpub_plugin_url").val(); |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
8 |
$.post(blog_url+"networkpub_ajax.php", {action:"networkpub_remove", networkpub_key:key}, function(data) { |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
9 |
if(data != key) { |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
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>'); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
11 |
} else { |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
12 |
var dr = data.split("_"); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
13 |
$("#r_key_"+dr[1]).remove(); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
14 |
$("#networkpub_remove").html('<div class="updated fade" style="padding:5px;text-align:center">'+$("#networkpub_text_publication_has_been_removed").val()+'</div>') |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
15 |
} |
170
8e3a5a6fc63e
English version just for user loged view
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
16 |
}); |
8e3a5a6fc63e
English version just for user loged view
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
17 |
} |
8e3a5a6fc63e
English version just for user loged view
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
18 |
return false; |
8e3a5a6fc63e
English version just for user loged view
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
19 |
}); |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
20 |
$.receiveMessage( |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
21 |
function(e){ |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
22 |
$("#networkpub_postbox").height(e.data.split("=")[1]+'px'); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
23 |
}, |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
24 |
'http://www.linksalpha.com' |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
25 |
); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
26 |
$("#site_links").live("change", function(event) { |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
27 |
$.postMessage( |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
28 |
$(this).val(), |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
29 |
'http://www.linksalpha.com/post', |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
30 |
parent |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
31 |
); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
32 |
}); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
170
diff
changeset
|
33 |
}); |