{"title":"安装软件","inframe":false,"hidden":false,"roles":{"default":1},"pageLink":"{url:'setup', method: 'get', newWin: true}","children":[{"configs":{"loginRequired":"false","itemId":"module"},"children":[{"configs":{"title":"安装 {#Var.sys.app.title#} (版本：{#Var.sys.app.version#})","autoShow":"true","height":"368","closable":"false","layout":"absolute","width":"544","resizable":"false","itemId":"window1","iconCls":"system_icon"},"children":[{"configs":{"height":"312","width":"162","stretch":"false","src":"wb/images/app/setup.jpg","itemId":"image1","y":"0","x":"0"},"children":[],"type":"image","expanded":false},{"configs":{"height":"304","width":"360","layout":"card","flat":"true","itemId":"mainPanel","y":"2","x":"166"},"children":[{"configs":{"height":"304","width":"360","flat":"true","html":"<div class=\"wb_doc\">\n  <h2 style=\"text-align:center;\">欢迎使用 WebBuilder 安装向导<\/h2>\n  <hr class=\"wb_hr\">\n  <p>使用安装向导的目的在于复制 WebBuilder 的数据库表到默认目标数据库中。<\/p>\n  <p>如果目标数据库已经存在 WebBuilder 的数据库表，那么无需使用此安装向导进行安装。<\/p>\n  <p>点击 [下一步] 按钮，系统将自动把 WebBuilder 的数据库表复制到目标数据库中。<\/p>\n<\/div>","itemId":"panel1"},"children":[],"type":"panel","expanded":true},{"configs":{"height":"304","width":"360","layout":"absolute","flat":"true","html":"<div class=\"wb_doc\">\n  <h4>设置默认数据库<\/h4>\n  <hr class=\"wb_hr\">\n  <p>请指定目标数据库 JNDI 和类型，该数据库将作为 WebBuilder 默认数据库。系统将把 WebBuilder 用到的数据库表复制到该数据库中。如果对数据库连接 JNDI 的配置不熟悉，可参考软件包中的 readme.html 文档的描述。<br>例如：Tomcat JNDI 名称为java:comp/env/jdbc/myname，其他应用服务器的 JNDI 名称请参考各自的手册。<\/p>\n<\/div>","itemId":"panel2"},"children":[{"configs":{"labelWidth":"50","height":"22","allowBlank":"false","width":"344","labelAlign":"right","itemId":"jndiText","fieldLabel":"JNDI：","y":"216","x":"0"},"children":[],"type":"text","expanded":false},{"configs":{"labelWidth":"50","height":"22","allowBlank":"false","width":"344","labelAlign":"right","pickList":"['db2', 'derby', 'firebird', 'h2', 'hsqldb', 'informix', 'mysql', 'oracle', 'pointbase', 'postgresql', 'sqlserver', 'sybase', 'teradata']","itemId":"typeText","fieldLabel":"类型：","forceSelection":"true","y":"248","x":"0"},"children":[],"type":"combo","expanded":false}],"type":"panel","expanded":true},{"configs":{"height":"304","width":"360","layout":"absolute","flat":"true","html":"<div class=\"wb_doc\">\n  <h4>复制数据库表准备就绪<\/h4>\n  <hr class=\"wb_hr\">\n  <p>系统准备复制数据库表到目标系统中。WebBuilder 使用的数据库表以表名\u201cWB_\u201d开头，因此如果数据库中已经存在\u201cWB_\u201d开头的表，这些表将会被覆盖。<\/p>\n  <p><img src=\"wb/images/warning.gif\" style=\"vertical-align:middle;margin-right:8px;\">警告：表名以\u201cWB_\u201d开头的表可能会被覆盖。<\/p>\n<\/div>","itemId":"panel3"},"children":[],"type":"panel","expanded":true},{"configs":{"height":"304","width":"360","layout":"absolute","flat":"true","html":"<div class=\"wb_doc\">\n  <h4>感谢选择 WebBuilder<\/h4>\n  <hr class=\"wb_hr\">\n  <p>系统已经成功将 WebBuilder 数据库表复制到默认数据库。<\/p>\n  <p>所有安装工作已经完成，点击下一步将转到 WebBuilder 首页。请在首页登录界面中输入默认管理员用户名称和密码，用户名称和密码都为 admin，登录后请及时修改默认密码。<\/p>\n<\/div>","itemId":"panel4"},"children":[],"type":"panel","expanded":true}],"type":"panel","expanded":true},{"configs":{"itemId":"buttons"},"children":[{"configs":{"text":"上一步","itemId":"prevBtn","iconCls":"left_icon","disabled":"true"},"events":{"click":"var layout = app.mainPanel.getLayout();\nlayout.prev();\napp.prevBtn.setDisabled(!layout.getPrev());"},"children":[],"type":"button","expanded":false},{"configs":{"text":"下一步","iconAlign":"right","itemId":"nextBtn","iconCls":"right_icon"},"events":{"click":"var activeItem, layout = app.mainPanel.getLayout();\n\nactiveItem = layout.getActiveItem();\nswitch (activeItem) {\n  case app.panel1:\n    layout.next();\n    app.prevBtn.setDisabled(false);\n    app.jndiText.focus(false, true);\n    break;\n  case app.panel2:\n    if (!Wb.verify(activeItem))\n      return;\n    Wb.request({\n      url: 'm?xwl=sys/service/install/test-jndi',\n      showError: false,\n      timeout: -1,\n      params: {\n        jndi: app.jndiText.getValue()\n      },\n      failure: function(resp) {\n        Wb.error('指定 JNDI 的数据库连接无效，请检查后再试一次。<br>' +\n          Wb.encodeHtml(resp.responseText),\n          function() {\n            app.jndiText.focus(false, true);\n          });\n      },\n      success: function() {\n        layout.next();\n      }\n    });\n    break;\n  case app.panel3:\n    Wb.request({\n      url: 'm?xwl=sys/service/install/do-install',\n      timeout: -1,\n      out: app.panel2,\n      success: function() {\n        layout.next();\n        app.prevBtn.setDisabled(true);\n      }\n    });\n    break;\n  case app.panel4:\n    window.location.replace('./');\n    break;\n}"},"children":[],"type":"button","expanded":false}],"type":"array","expanded":true}],"type":"window","expanded":true},{"configs":{"style":"background-color:#787878;","itemId":"viewport1"},"children":[],"type":"viewport","expanded":false}],"type":"module","expanded":true}],"iconCls":""}