web/wp-content/plugins/network-publisher/networkpub.js
changeset 204 09a1c134465b
parent 194 32102edaa81b
equal deleted inserted replaced
203:f507feede89a 204:09a1c134465b
       
     1 var networkpub_lastpos=0;
     1 jQuery(document).ready(function($){
     2 jQuery(document).ready(function($){
     2 	$(".networkpublisherremove").bind("click", function(e) {
     3 	$(".networkpublisherremove").bind("click", function(e) {
     3 		$("#networkpub_remove").html('<div class="updated fade" style="padding:5px;text-align:center">'+$("#networkpub_text_removing").val()+'.</div>')
     4 		$("#networkpub_remove").html('<div class="updated fade" style="padding:5px;text-align:center">'+$("#networkpub_text_removing").val()+'.</div>')
     4 		var key = $(this).attr("id");
     5 		var key = $(this).attr("id");
     5 		$(this).parent().parent().css('opacity','.30');
     6 		$(this).parent().parent().css('opacity','.30');
    28 			$(this).val(),
    29 			$(this).val(),
    29 			'http://www.linksalpha.com/post',
    30 			'http://www.linksalpha.com/post',
    30 			parent
    31 			parent
    31 		);
    32 		);
    32 	});
    33 	});
       
    34 	setTimeout(function(){
       
    35 		if($("#linksalpha_browser").length>0){
       
    36 			if($("#linksalpha_post_extension_chrome").length == 0) {
       
    37 				if($("#linksalpha_browser").val() == 'chrome') {
       
    38 					$("#linksalpha_post_download_chrome").show();
       
    39 				} else if($("#linksalpha_browser").val() == 'firefox') {
       
    40 					$("#linksalpha_post_download_firefox").show();
       
    41 				} else if($("#linksalpha_browser").val() == 'safari') {
       
    42 					$("#linksalpha_post_download_safari").show();
       
    43 				}
       
    44 			} else {
       
    45 				$("#linksalpha_post_download_chrome").remove();
       
    46 				$("#linksalpha_post_download_firefox").remove();
       
    47 				$("#linksalpha_post_download_safari").remove();
       
    48 				$(".networkpublisher_post_meta_box_first").css('border-top-color', 'transparent');
       
    49 			}
       
    50 		}
       
    51 	},3000);
       
    52 	if($("#networkpub_post_update").length) {
       
    53 		$("#networkpub_post_update").live("click", function() {
       
    54 			$("body").append('<div id="networkpub_overlay"><iframe id="linksalpha_post_plugin" src="http://www.linksalpha.com/post2/postpopup?'+$("#networkpub_post_data").val()+'" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" scrolling="no"></iframe></div>');
       
    55 			return false;
       
    56 		});
       
    57 	}
       
    58 	$.receiveMessage(
       
    59 		function(e){
       
    60 			if(e.data=='["close"]') {
       
    61 				$("#networkpub_overlay").remove();
       
    62 			}
       
    63 		},
       
    64 		'http://www.linksalpha.com'
       
    65 	);
    33 });
    66 });