// JavaScript Document
/**
  * index.js
  * by Gabriel Wang
  */
 
/**
  * 每个js文件都有自己的namespace，命名规则为
  * XinWaiHui.[app名称].[页面名称]
  *
  */
Ext.namespace('XinWaiHui.ea.trade_list_widget');
 
// create application
XinWaiHui.ea.trade_list_widget.app = function() {
    return {
        init: function() {
           	refresh();
        },
        
        refresh:function(div_id , account_id , sort , sorttype , page)
        {
        	var param = "";
        	param += 'div_id=' + div_id;
        	param += "&accid=" + account_id;
        	param += "&sort=" + sort;
        	param += "&sorttype=" + sorttype;
        	param += "&page=" + page;
        	$.ajax({
			   type: "GET",
			   url: "/ea/trade_list_ajax/?" + param,
			   success: function(msg){
			   	$('#'+div_id).html(msg);
			   }
			 });
			return false;
        }
        
    };
}(); // end of app
 
// end of file
