define(function(require, exports, module) {
	var global = require("../../js/global");
	
	function init() {
//		initTable();
		initEvent();
		initGlobalEvent();
		
		function initEvent() {
			var switchPath = global.nwPath.join(global.jsUtil.getRootPath(), './db/交换升级支持产品列表.xlsx');			
			$("#switchSupport").click(function() {
				global.jsUtil.openDir(switchPath);
			});
			
			var wirelessPath = global.nwPath.join(global.jsUtil.getRootPath(), './db/无线升级使用说明.docx');			
			$("#wirelessUpgradeDetail").click(function() {
				global.jsUtil.openDir(wirelessPath);
			});
		}
		function initTable() {
			$('#supportUpgradeTable').bootstrapTable({
		        data: []
		    });			
			$(".fixed-table-body").addClass('custom-scroll');
			
			var supportUpgrade = [];
			var tmp_supportUpgrade = {};
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "11.x";
			tmp_supportUpgrade.productSeries = "S6220";
			tmp_supportUpgrade.productList = "S6220-48XS4QXS";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "11.x";
			tmp_supportUpgrade.productSeries = "S6220H";
			tmp_supportUpgrade.productList = "S6220-48XS6QXS-H、S6220-48XT6QXS-H、S6220-32QXS-H";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "11.x";
			tmp_supportUpgrade.productSeries = "S5750H";
			tmp_supportUpgrade.productList = "S5750C-28GT4XS-H、S5750C-48GT4XS-H、S5750C-28SFP4XS-H";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "11.x";
			tmp_supportUpgrade.productSeries = "S6000";
			tmp_supportUpgrade.productList = "S6000C-48GT4XS-E";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "11.x";
			tmp_supportUpgrade.productSeries = "S5750-L";
			tmp_supportUpgrade.productList = "S5750-24GT4XS-L、S5750-48GT4XS-L";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "11.x";
			tmp_supportUpgrade.productSeries = "S2910";
			tmp_supportUpgrade.productList = "S2910-24GT4XS-E、S2910-48GT4XS-E";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "11.x";
			tmp_supportUpgrade.productSeries = "S2910-P";
			tmp_supportUpgrade.productList = "S2910C-24GT2XS-HP-E、S2910C-48GT2XS-HP-E、S2910C-24GT2XS-P-E、S2910-24GT4SFP-UP-E";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "11.x";
			tmp_supportUpgrade.productSeries = "NBS";
			tmp_supportUpgrade.productList = "NBS5628XG、NBS5652XG";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "11.x";
			tmp_supportUpgrade.productSeries = "ES";
			tmp_supportUpgrade.productList = "RG-ES324GT、RG-ES224GT";
			supportUpgrade.push(tmp_supportUpgrade);
			
			
			
			
			
			
			
			
			
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "10.x";
			tmp_supportUpgrade.productSeries = "S6220";
			tmp_supportUpgrade.productList = "S6220-24XS、S6220-48XS4QXS、S6220-48XT4QXS";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "10.x";
			tmp_supportUpgrade.productSeries = "AS";
			tmp_supportUpgrade.productList = "RG-AS348GT、RG-AS248GT、RG-AS224GT-P、RG-AS224GT、RG-AS248T、RG-AS224T";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "10.x";
			tmp_supportUpgrade.productSeries = "S26-S";
			tmp_supportUpgrade.productList = "S2628G-S、S2652G-S";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "10.x";
			tmp_supportUpgrade.productSeries = "S26-I";
			tmp_supportUpgrade.productList = "S2628G-I、S2652G-I";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "10.x";
			tmp_supportUpgrade.productSeries = "S26-E";
			tmp_supportUpgrade.productList = "S2628G-E、S2652G-E";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "10.x";
			tmp_supportUpgrade.productSeries = "S26-P";
			tmp_supportUpgrade.productList = "S2652G-P、S2628G-P";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "10.x";
			tmp_supportUpgrade.productSeries = "S29G";
			tmp_supportUpgrade.productList = "S2924G、S2927XG、S2951XG、S2928G-E、S2952G-E";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "10.x";
			tmp_supportUpgrade.productSeries = "S29-P";
			tmp_supportUpgrade.productList = "S2924GT/8SFP-XS-P、S2928G-12P、S2928G-24P";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "10.x";
			tmp_supportUpgrade.productSeries = "S29-S";
			tmp_supportUpgrade.productList = "S2928G-S";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "10.x";
			tmp_supportUpgrade.productSeries = "S5750-S";
			tmp_supportUpgrade.productList = "S5750-28GT-S、S5750-24GT/8SFP-S、S5750-48GT/4SFP-S、S5750-24SFP/8GT-S";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "10.x";
			tmp_supportUpgrade.productSeries = "S5750-E";
			tmp_supportUpgrade.productList = "S5750-24SFP/8GT-E、S5750-24GT/8SFP-E、S5750-48GT/4SFP-E";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "10.x";
			tmp_supportUpgrade.productSeries = "S5750-P";
			tmp_supportUpgrade.productList = "S5750-24GT/8SFP-P、S5750-48GT/4SFP-P";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "10.x";
			tmp_supportUpgrade.productSeries = "S5750-L";
			tmp_supportUpgrade.productList = "S5750-28GT-L、S5750-52GT-L";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "10.x";
			tmp_supportUpgrade.productSeries = "S5750P";
			tmp_supportUpgrade.productList = "S5750P-24GT/12SFP、S5750P-48GT/4SFP";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "10.x";
			tmp_supportUpgrade.productSeries = "S5760";
			tmp_supportUpgrade.productList = "S5760-24GT/4SFP、S5760-48GT/4SFP";
			supportUpgrade.push(tmp_supportUpgrade);
			
			tmp_supportUpgrade = {};
			tmp_supportUpgrade.operateSystem = "10.x";
			tmp_supportUpgrade.productSeries = "S6000";
			tmp_supportUpgrade.productList = "S6000-24GT/8SFP、S6000-48GT/4SFP";
			supportUpgrade.push(tmp_supportUpgrade);
			
			$('#supportUpgradeTable').bootstrapTable('load', supportUpgrade);			
			$('#supportUpgradeTable').bootstrapTable('resetView', {height : "auto"}); //不resetView为什么表头样式会有问题???
		}
		function initGlobalEvent() {
			global.exitPageCallback.exitFun = function () {
				return true;
			}
		}
	}
	exports.init = init;
});