📄 z3950.js
字号:
//=====================================================================================//===//=== Z3950 controller//===//=====================================================================================ker.include('harvesting/z3950/model.js');ker.include('harvesting/z3950/view.js');var z3950 = new Object();//=====================================================================================function Z3950(xmlLoader){ //--- call super constructor Harvester.call(this); var loader= xmlLoader; var model = new z3950.Model(loader); var view = new z3950.View(loader); //--- public methods // this.addSearchRow = view.addEmptySearch;// this.removeSearchRow= view.removeSearch; this.addGroupRow = addGroupRow; this.removeGroupRow = view.removeGroupRow; this.getResultTip = view.getResultTip; this.model = model; this.view = view;//=====================================================================================//===//=== API methods//===//=====================================================================================this.getType = function() { return "z3950"; }this.getLabel = function() { return loader.eval("info[@type='z3950']/long"); }this.getEditPanel = function() { return "z39.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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -