shortcut.jsp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
  2. <%@ include file="/jsp/framework/head.jsp" %>
  3. <%@ taglib uri="/WEB-INF/hnisi.tld" prefix="hnisi" %>
  4. <%@ page import="cn.sinobest.framework.util.DTOUtil" %>
  5. <%
  6. String contextPath = request.getContextPath();
  7. %>
  8. <style>
  9. #fwshortcut{
  10. font-family:微软雅黑,宋体;
  11. }
  12. #fwshortcut table{
  13. border-collapse:collapse;
  14. }
  15. #fwshortcut .shortcut-tr{
  16. background-color:white;
  17. }
  18. #fwshortcut .shortcut-tr-alt{
  19. background-color:#eeeeff;
  20. }
  21. #fwshortcut td{
  22. font-size:20px;
  23. width:300px;
  24. vertical-align:middle;
  25. padding:10px 20px;
  26. margin:0;
  27. border:#ccc 1px solid;
  28. }
  29. </style>
  30. <img src="<%=contextPath%>/images/refresh.gif"
  31. onmouseover="this.src='<%=contextPath%>/images/refresh_over.gif'"
  32. onmouseout ="this.src='<%=contextPath%>/images/refresh.gif'"
  33. onmousedown="this.src='<%=contextPath%>/images/refresh_down.gif'"
  34. onmouseup ="this.src='<%=contextPath%>/images/refresh_over.gif';refresh();"
  35. />
  36. <br/>
  37. <div id="fwshortcut" position="relative">
  38. </div>
  39. </br>
  40. <p align="center">
  41. <hnisi:btn value="设置常用菜单" onclick="setShortcut()">
  42. </hnisi:btn>
  43. </p>
  44. <script>
  45. $(function(){
  46. $("#refreshBtn").blur();
  47. });
  48. fwshortcut.innerHTML = window.dialogArguments.shortcut.shortcutHtml;
  49. var operId = window.dialogArguments.shortcut.operId;
  50. function tohref(url){
  51. window.dialogArguments.parent.top.workspace.location.href=url;
  52. window.close();
  53. }
  54. function refresh(){
  55. new Service({
  56. serviceId:'blankService',
  57. method:'getShortcutHtml',
  58. parameters:{OPERID:operId,CONTEXTPATH:"<%=contextPath%>"}
  59. }).sentAjax('刷新常用菜单',function(data){
  60. if(data==null || data[0]==null){
  61. alert("刷新失败");
  62. return;
  63. }
  64. fwshortcut.innerHTML = data[0].shortcutHtml;
  65. window.dialogArguments.shortcut.shortcutHtml = data[0].shortcutHtml;
  66. });
  67. }
  68. function setShortcut(){
  69. var url = "<%=contextPath%>/sysmngr/web/sys/personality!query.do?RightID=990307#tab2";
  70. tohref(url);
  71. }
  72. </script>
  73. </body>
  74. </html>