config.js

来自「联合国农粮署牵头开发的geonetwork源代码最新版」· JavaScript 代码 · 共 67 行

JS
67
字号
//=====================================================================================//===//=== Config controller class//===//=====================================================================================ker.include('config/model.js');ker.include('config/view.js');var config = null;//=====================================================================================function init(){	config = new Config();			//--- waits for all files to be loaded	ker.loadMan.wait(config);}//=====================================================================================function Config() {	this.strLoader = new XMLLoader(Env.locUrl +'/xml/config.xml');			this.view      = new ConfigView (this.strLoader);	this.model     = new ConfigModel(this.strLoader);}//=====================================================================================Config.prototype.init = function(){	this.view.init();	this.refresh();}//=====================================================================================Config.prototype.refresh = function(){	this.model.getConfig(ker.wrap(this.view, this.view.setData));}//=====================================================================================Config.prototype.save = function(){	if (!this.view.isDataValid())		return;				var data = this.view.getData();		this.model.setConfig(data, ker.wrap(this, this.save_OK));}//-------------------------------------------------------------------------------------Config.prototype.save_OK = function(){	alert(this.strLoader.getText('saveOk'));}//=====================================================================================

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?