webdav.js
来自「联合国农粮署牵头开发的geonetwork源代码最新版」· JavaScript 代码 · 共 95 行
JS
95 行
//=====================================================================================//===//=== WebDav controller//===//=====================================================================================ker.include('harvesting/webdav/model.js');ker.include('harvesting/webdav/view.js');var wd = new Object();//=====================================================================================function WebDav(xmlLoader){ //--- call super constructor Harvester.call(this); var loader= xmlLoader; var model = new wd.Model(loader); var view = new wd.View(loader); //--- public methods this.addGroupRow = addGroupRow; this.removeGroupRow = view.removeGroupRow; this.getResultTip = view.getResultTip; this.model = model; this.view = view;//=====================================================================================//===//=== API methods//===//=====================================================================================this.getType = function() { return "webdav"; }this.getLabel = function() { return loader.eval("info[@type='webdav']/long"); }this.getEditPanel = function() { return "wd.editPanel"; }//=====================================================================================this.init = function(){ this.view.init(); model.retrieveGroups (ker.wrap(this, init_groups_OK)); model.retrieveCategories(ker.wrap(this, init_categ_OK)); model.retrieveIcons (ker.wrap(this, init_icons_OK));}//-------------------------------------------------------------------------------------function init_groups_OK(data){ view.clearGroups(); for (var i=0; i<data.length; i++) view.addGroup(data[i].id, data[i].label[Env.lang]); }//-------------------------------------------------------------------------------------function init_categ_OK(data){ view.clearCategories(); for (var i=0; i<data.length; i++) view.addCategory(data[i].id, data[i].label[Env.lang]); }//-------------------------------------------------------------------------------------function init_icons_OK(data){ view.clearIcons(); for (var i=0; i<data.length; i++) view.addIcon(data[i]); }//=====================================================================================function addGroupRow(){ var groups = view.getSelectedGroups(); if (groups.length == 0) alert(loader.getText('pleaseSelectGroup')); else view.addEmptyGroupRows(groups);}//=====================================================================================}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?