$package('itsm.problem');
/**  
 * @fileOverview 问题左边菜单主函数.
 * @author mars
 * @version 1.0  
 */  
 /**  
 * @author mars  
 * @constructor 
 * @description 问题左边菜单主函数.
 * @date 2011-06-01
 * @since version 1.0 
 * @returns
 * @param select
 */
$import('itsm.problem.problemStats');

itsm.problem.leftMenu=function(){
	return {
		 /**@description  快速创建问题 */
		fastCreateProblem:function(){
			if($('#fastCreateProblem form').form('validate')){
				var frm = $('#fastCreateProblem form').serialize();
				var url = 'problem!saveProblem.action';
						
				startProcess();
				$.post(url,frm, function(){
					endProcess();
							
					msgShow(i18n['createSuccess'],'show');
					$('#fastCreateEtitle').val('');
					$('#fastCreateEdesc').val('');
					$('#problemGrid').trigger('reloadGrid');
							
				});
			}

		},
		
		
		init:function(){
			itsm.problem.problemStats.countAllProblem();
			$('#save_fastCreateProbme_btn').click(itsm.problem.leftMenu.fastCreateProblem);
		}

	}
}();

$(document).ready(itsm.problem.leftMenu.init);