Radiate.prototype.newPostReadyCallBack = function()

in Radii8Designer/src/js/Radiate.js [70:90]


Radiate.prototype.newPostReadyCallBack = function (event) {
	var postFrame = Radiate.instance.postFrame;
	var el = postFrame.contentDocument ? postFrame.contentDocument.getElementById('post_ID') : null;
	var postID = el ? el.value : null;
	
	if (postID==null) {
	
		if (postFrame.contentDocument==null) {
			console.log("Could not access frame content. Must be on the same server.");
			Radiate.instance.flashInstance.notOnServer();
		}
		else if (postFrame.contentWindow.location.href.indexOf("wp-login.php")!=-1) {
			console.log("Not logged in");
			Radiate.instance.flashInstance.notLoggedIn();
		}
	}
	else {
		Radiate.instance.flashInstance.addPostCallback(postID);
		console.log("New post added");
	}
}