
var wall={report:function(cid){return false;},reply:function(cid,replyToUserNickname,replyToUserID){var reply_prefix='Reply to '+replyToUserNickname+' :';$('#post_wall_form textarea').val(reply_prefix);tinyMCE.setContent(reply_prefix);$('#post_wall_form input[@name="replyToUserID"]').val(replyToUserID);$('#post_wall_form input[@name="replyToUserNickname"]').val(replyToUserNickname);},del:function(cid){if(!confirm(wall_message_del_confirm))return false;$.post('/user/wall_del',{cid:cid},function(r){if(r.status=='error'){alert(r.msg);}else{$('#cid_'+cid).remove();alert(r.msg);}},'json');},load:function(){$('#wall_message_board').html('<li><div class="p_r_box_loading"></div></li>');$('#wall_message_board').load('/user/load_wall',{member_id:wall_member_id,nickname:wall_nickname,gender_code:wall_gender_code},function(){});},post:function(){tinyMCE.triggerSave();$('.post-wall-btn').hide();$('.post-wall-ajax-img').show();$().ajaxError(function(){alert('系统繁忙');});$.post('/user/Postwall',$('#post_wall_form').serialize(),function(r){if(r.status=='success'){var html='<li id="cid_'+r.result.cid+'"><div class="cls_reply_list_liem">';html+='<div class="avatar">';html+='<a href="http://www.hellochina.com/user/'+r.result.authorid+'"><img src="'+r.result.avatar+'" /></a>';html+='</div><div class="info">';html+='<div class="super-actions"></div>';html+='<a href="javascript://" onClick="wall.del('+r.result.cid+')" class="fright">'+wall_message_del+'</a>';html+='<span class="author"><a href="http://www.hellochina.com/user/'+r.result.authorid+'"><strong>'+r.result.author+'</strong></a><span>&nbsp;</span>'+r.result.dateline+'</span></div>';html+='<div class="text">';html+=r.result.message;html+='</div><div class="clear-float"></div></div></li>';$('#wall_message_list > ul').append(html);$('#post_wall_form textarea').val('');$('#post_wall_form input[@name="replyToUserID"]').val('');$('#post_wall_form input[@name="replyToUserNickname"]').val('');}else if(r.status=='error'){alert(r.msg);}
$('.post-wall-btn').show();$('.post-wall-ajax-img').hide();},'json');}}
$(function(){wall.load();});
