Mys.RReplyList = function(config)
{
	Mys.RReplyList.superclass.constructor.call(this, config);
	
	this.on("move", function(start, maxRow){
		this.startLoading();
		Global.modelReply.getRecent(start, maxRow, this.boardType, function(data){
			if(data && data.response.code == 100)
				this.update(data.response.reply, data.response.reply_total);
			else
				this.empty();
		}, this)
	}, this);
};

Ext.extend(Mys.RReplyList, Mys.TemplateList, {
	boardType : [1, 2, 3],
	
	className : "mys-RReply",
	maxRow : 10,
	elTemplate : (new Ext.Template([
		'<div class="{className}" width="160" style="" border="0" cellspacing="0" cellpadding="0">',
			'<div class="{headerClassName}"></div>',
			'<div class="{bodyClassName}" style="padding-bottom : 4px;"></div>',
			'<div style="text-align : center;" class="{emptyClassName}">내용이 없습니다.</div>',
			'<div class="{loadingClassName}"><img class="mys-loading-img" src="/images/common/loadinbar.gif"/></div>',
			'<div class="{pagerClassName}"></div></td>',
		'</div>'
	])).compile(),
	
	headerTemplate : (new Ext.Template('<a  class="mys-RReply-refresh" href="javascript:void(0);" onfocus="blur()"><img style="margin : 0px 0px 8px 0px;"class="mys-RReply-refresh-img"src="/images/common/rtit_comment.gif" width="158" height="22" /></a>')).compile(),
	
	itemClass : Mys.RReplyItem,
	
	setEvents : function()
	{
		if(this.headerTemplate)
			this.headerEl.child("a").on("click", this.refresh, this);
	}
});