RS; Refactored publisher, tested it, it seems to work perfectly, but I could be wrong.

This commit is contained in:
Raphael 2010-07-03 13:14:29 -07:00
parent fffd3aebfc
commit a0cdd7cb0e

View file

@ -1,33 +1,19 @@
$(document).ready( function() {
$("#publisher_content_pickers .status_message").click(function(){
if( $("#new_status_message").css("display") == "none" ) {
$("#publisher_content_pickers .status_message").click(selectPublisherTab);
$("#publisher_content_pickers .bookmark").click(selectPublisherTab);
$("#publisher_content_pickers .blog").click(selectPublisherTab);
function selectPublisherTab(){
var form_id = "#new_" + this.className
if( $(form_id).css("display") == "none" ) {
$("#publisher_content_pickers").children("li").removeClass("selected");
$("#publisher_form form").fadeOut(50);
$(this).toggleClass("selected");
$("#new_status_message").delay(50).fadeIn(200);
$(form_id).delay(50).fadeIn(200);
}
});
$("#publisher_content_pickers .bookmark").click(function(){
if( $("#new_bookmark").css("display") == "none" ) {
$("#publisher_content_pickers").children("li").removeClass("selected");
$("#publisher_form form").fadeOut(50);
$(this).toggleClass("selected");
$("#new_bookmark").delay(50).fadeIn(200);
}
});
$("#publisher_content_pickers .blog").click(function(){
if( $("#new_blog").css("display") == "none" ) {
$("#publisher_content_pickers").children("li").removeClass("selected");
$("#publisher_form form").fadeOut(50);
$(this).toggleClass("selected");
$("#new_blog").delay(50).fadeIn(200);
}
});
}
});