{"hidden":false,"children":[{"configs":{"itemId":"module"},"expanded":true,"children":[{"configs":{"layout":"fit","itemId":"win","resizable":"true","editWin":"true","width":"600","title":"模块选择器","iconCls":"form_icon","height":"450","maximizable":"true"},"expanded":true,"children":[{"configs":{"border":"false","itemId":"tree","root":"{\n  fileName: 'Root'\n}","rootVisible":"false"},"expanded":true,"children":[{"configs":{"itemId":"store","fields":"['text', 'path', 'fileName']","url":"m?xwl=sys/dialog/dev/module-selector/module-list"},"expanded":false,"children":[],"type":"treestore","events":{"beforeload":"operation.params.path = operation.node.data.path;"}}],"type":"tree","events":{"itemclick":"if (!record.isLeaf()) {\n  if (record.isExpanded())\n    record.collapse();\n  else record.expand();\n}","itemdblclick":"if (record.data.leaf) {\n  app.okHandler();\n}"}},{"configs":{"itemId":"tools"},"expanded":true,"children":[{"configs":{"itemId":"refreshItem","tooltip":"刷新模块列表","tooltype":"refresh"},"expanded":false,"children":[],"type":"item","events":{"click":"Wb.reload(app.tree);"}}],"type":"array"}],"type":"window","events":{"ok":"app.okHandler();"}}],"type":"module","events":{"initialize":"Wb.apply(app, {\n  okHandler: function() {\n    var node = app.tree.getSelection()[0];\n    if (node && node.data.leaf) {\n      if (app.callbackParam)\n        Ext.callback(app.callbackParam, app, [Wb.toUrl(node.data.path), app.win]);\n    } else\n      Wb.warn('请选择一个有效的模块。');\n  },\n  /**\n   * 显示模块选择器对话框。\n   * @param {String} title 对话框标题。\n   * @param {Function} callback 点击对话框确定按钮时的回调事件，可使用参数value和win，分别表示选择的模块路径和窗口对象。\n   */\n  show: function(title, callback) {\n    if (title)\n      app.win.setTitle(title);\n    app.callbackParam = callback;\n    app.win.show();\n  }\n});"}}],"roles":{},"title":"模块选择器","iconCls":"","inframe":false,"pageLink":""}