treecombo.js

来自「anewssystem新闻发布系统集成使用了spring hibernate f」· JavaScript 代码 · 共 29 行

JS
29
字号

var treecombo = function(){
  // return a public interface
  return {
    init : function(){
      var el = Ext.get('category_field').dom;
      var config = {
        title: '新闻分类',
        rootId: 0,
        height:200,
        dataTag: 'newdistrict',
        treeHeight: 150,
        beforeSelect: function(){}
      };
      var object = new Ext.form.TreeField({
        id: el.id,
        name : el.id,
        allowBlank: false,
        width: 200,
        treeConfig: config
      });
      //if(不是EditorGrid && 不是Form) object.applyTo(el.id);
      object.applyTo(el.id);
    }
  }
}();

Ext.onReady(treecombo.init, treecombo, true);

⌨️ 快捷键说明

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