projectmaintask.jsp.svn-base 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <%@ page language="java" contentType="text/html; charset=utf-8"
  2. pageEncoding="utf-8"%>
  3. <%
  4. String path = request.getContextPath();
  5. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  6. %>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  11. <link rel="stylesheet" href="<%=basePath %>resource/ext/resources/css/ext-all-gray.css" type="text/css"></link>
  12. <link rel="stylesheet" href="<%=basePath %>resource/css/main.css" type="text/css"></link>
  13. <style type="text/css">
  14. #sidebar a:link {
  15. color:#1C86EE;
  16. text-decoration:none;
  17. }
  18. #sidebar a:visited {
  19. color:#1C86EE;
  20. text-decoration:none;
  21. }
  22. #sidebar a:hover {
  23. color:#CD2626;
  24. text-decoration:none;
  25. }
  26. #sidebar a:active {
  27. color:#1C86EE;
  28. text-decoration:none;
  29. }
  30. </style>
  31. <script type="text/javascript" src="<%=basePath %>resource/ext/ext-all.js"></script>
  32. <script type="text/javascript" src="<%=basePath %>resource/i18n/i18n.js"></script>
  33. <script type="text/javascript">
  34. Ext.Loader.setConfig({
  35. enabled: true
  36. });//开启动态加载
  37. Ext.application({
  38. name: 'erp',//为应用程序起一个名字,相当于命名空间
  39. appFolder: basePath+'app',//app文件夹所在路径
  40. controllers: [//声明所用到的控制层
  41. 'plm.task.ProjectMainTask'
  42. ],
  43. launch: function() {
  44. Ext.create('erp.view.plm.task.ProjectMainTask');//创建视图
  45. }
  46. });
  47. var caller = 'ProjectMainTask';
  48. var formCondition = '';
  49. var gridCondition = '';
  50. var menu=null;
  51. function openFormUrl(value, keyField, url, title){
  52. if(url.indexOf("?")>0){
  53. url =url+'&formCondition='+keyField+"='"+value+"'";
  54. }else
  55. url =url+'?formCondition='+keyField+"='"+value+"'";
  56. var panel = Ext.getCmp(keyField + "=" + value);
  57. var main = parent.Ext.getCmp("content-panel");
  58. var showtitle='';
  59. url = url.replace(/IS/g, "=\'").replace(/&/g, "\'&");
  60. if(!panel){
  61. if (title && title.toString().length>4) {
  62. showtitle = title.toString().substring(0,4);
  63. }else {
  64. showtitle=title;
  65. }
  66. panel = {
  67. title : showtitle,
  68. tag : 'iframe',
  69. tabConfig:{tooltip:title.toString() + '(' + keyField + "=" + value + ')'},
  70. frame : true,
  71. border : false,
  72. layout : 'fit',
  73. iconCls : 'x-tree-icon-tab-tab',
  74. html : '<iframe src="' + basePath + url + '" height="100%" width="100%" frameborder="0" scrolling="auto"></iframe>',
  75. closable : true,
  76. listeners : {
  77. close : function(){
  78. main.setActiveTab(main.getActiveTab().id);
  79. }
  80. }
  81. };
  82. openTab(panel, keyField + "=" + value);
  83. }else{
  84. main.setActiveTab(panel);
  85. }
  86. }
  87. </script>
  88. </head>
  89. <body >
  90. </body>
  91. </html>