sysIndex2.jsp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
  3. <html>
  4. <head>
  5. <title>${fns:getConfig('productName')}</title>
  6. <meta name="decorator" content="blank"/>
  7. <c:if test="${cookie.tabmode.value eq '1'}"><link rel="Stylesheet" href="${ctxStatic}/jerichotab/css/jquery.jerichotab.css" />
  8. <script type="text/javascript" src="${ctxStatic}/jerichotab/js/jquery.jerichotab.js"></script></c:if>
  9. <style type="text/css">
  10. #main {padding:0;margin:0;} #main .container-fluid{padding:0 4px 0 6px;}
  11. #header {margin:0 0 8px;position:static;} #header li {font-size:14px;_font-size:12px;}
  12. #header .brand {font-family:Helvetica, Georgia, Arial, sans-serif, 黑体;font-size:26px;padding-left:33px;}
  13. #footer {margin:8px 0 0 0;padding:3px 0 0 0;font-size:11px;text-align:center;border-top:2px solid #0663A2;}
  14. #footer, #footer a {color:#999;} #left{overflow-x:hidden;overflow-y:auto;} #left .collapse{position:static;}
  15. #userControl>li>a{color:#555;text-shadow:none;} #userControl>li>a:hover, #user #userControl>li.open>a{background:transparent;}
  16. </style>
  17. <script type="text/javascript">
  18. $(document).ready(function() {
  19. // <c:if test="${cookie.tabmode.value eq '1'}"> 初始化页签
  20. $.fn.initJerichoTab({
  21. renderTo: '#right', uniqueId: 'jerichotab',
  22. contentCss: { 'height': $('#right').height() - tabTitleHeight },
  23. tabs: [], loadOnce: true, tabWidth: 110, titleHeight: tabTitleHeight
  24. });//</c:if>
  25. // 绑定菜单单击事件
  26. $("#menu a.menu").click(function(){
  27. // 一级菜单焦点
  28. $("#menu li.menu").removeClass("active");
  29. $(this).parent().addClass("active");
  30. // 左侧区域隐藏
  31. if ($(this).attr("target") == "mainFrame"){
  32. $("#left,#openClose").hide();
  33. wSizeWidth();
  34. // <c:if test="${cookie.tabmode.value eq '1'}"> 隐藏页签
  35. $(".jericho_tab").hide();
  36. $("#mainFrame").show();//</c:if>
  37. return true;
  38. }
  39. // 左侧区域显示
  40. $("#left,#openClose").show();
  41. if(!$("#openClose").hasClass("close")){
  42. $("#openClose").click();
  43. }
  44. // 显示二级菜单
  45. var menuId = "#menu-" + $(this).attr("data-id");
  46. if ($(menuId).length > 0){
  47. $("#left .accordion").hide();
  48. $(menuId).show();
  49. // 初始化点击第一个二级菜单
  50. if (!$(menuId + " .accordion-body:first").hasClass('in')){
  51. $(menuId + " .accordion-heading:first a").click();
  52. }
  53. if (!$(menuId + " .accordion-body li:first ul:first").is(":visible")){
  54. $(menuId + " .accordion-body a:first i").click();
  55. }
  56. // 初始化点击第一个三级菜单
  57. $(menuId + " .accordion-body li:first li:first a:first i").click();
  58. }else{
  59. // 获取二级菜单数据
  60. $.get($(this).attr("data-href"), function(data){
  61. if (data.indexOf("id=\"loginForm\"") != -1){
  62. alert('未登录或登录超时。请重新登录,谢谢!');
  63. top.location = "${ctx}";
  64. return false;
  65. }
  66. $("#left .accordion").hide();
  67. $("#left").append(data);
  68. // 链接去掉虚框
  69. $(menuId + " a").bind("focus",function() {
  70. if(this.blur) {this.blur()};
  71. });
  72. // 二级标题
  73. $(menuId + " .accordion-heading a").click(function(){
  74. $(menuId + " .accordion-toggle i").removeClass('icon-chevron-down').addClass('icon-chevron-right');
  75. if(!$($(this).attr('data-href')).hasClass('in')){
  76. $(this).children("i").removeClass('icon-chevron-right').addClass('icon-chevron-down');
  77. }
  78. });
  79. // 二级内容
  80. $(menuId + " .accordion-body a").click(function(){
  81. $(menuId + " li").removeClass("active");
  82. $(menuId + " li i").removeClass("icon-white");
  83. $(this).parent().addClass("active");
  84. $(this).children("i").addClass("icon-white");
  85. });
  86. // 展现三级
  87. $(menuId + " .accordion-inner a").click(function(){
  88. var href = $(this).attr("data-href");
  89. if($(href).length > 0){
  90. $(href).toggle().parent().toggle();
  91. return false;
  92. }
  93. // <c:if test="${cookie.tabmode.value eq '1'}"> 打开显示页签
  94. return addTab($(this)); // </c:if>
  95. });
  96. // 默认选中第一个菜单
  97. $(menuId + " .accordion-body a:first i").click();
  98. $(menuId + " .accordion-body li:first li:first a:first i").click();
  99. });
  100. }
  101. // 大小宽度调整
  102. wSizeWidth();
  103. return false;
  104. });
  105. // 初始化点击第一个一级菜单
  106. $("#menu a.menu:first span").click();
  107. // <c:if test="${cookie.tabmode.value eq '1'}"> 下拉菜单以选项卡方式打开
  108. $("#userInfo .dropdown-menu a").mouseup(function(){
  109. return addTab($(this), true);
  110. });// </c:if>
  111. // 获取通知数目 <c:set var="oaNotifyRemindInterval" value="${fns:getConfig('oa.notify.remind.interval')}"/>
  112. function getNotifyNum(){
  113. /* $.get("${ctx}/oa/oaNotify/self/count?t="+new Date().getTime(),function(data){
  114. var num = parseFloat(data);
  115. if (num > 0){
  116. $("#notifyNum,#notifyNum2").show().html("("+num+")");
  117. }else{
  118. $("#notifyNum,#notifyNum2").hide()
  119. }
  120. }); */
  121. }
  122. getNotifyNum(); //<c:if test="${oaNotifyRemindInterval ne '' && oaNotifyRemindInterval ne '0'}">
  123. setInterval(getNotifyNum, ${oaNotifyRemindInterval}); //</c:if>
  124. });
  125. // <c:if test="${cookie.tabmode.value eq '1'}"> 添加一个页签
  126. function addTab($this, refresh){
  127. $(".jericho_tab").show();
  128. $("#mainFrame").hide();
  129. $.fn.jerichoTab.addTab({
  130. tabFirer: $this,
  131. title: $this.text(),
  132. closeable: true,
  133. data: {
  134. dataType: 'iframe',
  135. dataLink: $this.attr('href')
  136. }
  137. }).loadData(refresh);
  138. return false;
  139. }// </c:if>
  140. </script>
  141. </head>
  142. <body>
  143. <div id="main">
  144. <div id="header" class="navbar navbar-fixed-top">
  145. <div class="navbar-inner">
  146. <div class="brand"><span id="productName">${fns:getConfig('productName')}</span></div>
  147. <ul id="userControl" class="nav pull-right"><%--
  148. <li><a href="${pageContext.request.contextPath}${fns:getFrontPath()}/index-${fnc:getCurrentSiteId()}.html" target="_blank" title="访问网站主页"><i class="icon-home"></i></a></li>--%>
  149. <li id="themeSwitch" class="dropdown">
  150. <a class="dropdown-toggle" data-toggle="dropdown" href="#" title="主题切换"><i class="icon-th-large"></i></a>
  151. <ul class="dropdown-menu">
  152. <c:forEach items="${fns:getDictList('theme')}" var="dict"><li><a href="#" onclick="location='${pageContext.request.contextPath}/theme/${dict.value}?url='+location.href">${dict.label}</a></li></c:forEach>
  153. <li><a href="javascript:cookie('tabmode','${cookie.tabmode.value eq '1' ? '0' : '1'}');location=location.href">${cookie.tabmode.value eq '1' ? '关闭' : '开启'}页签模式</a></li>
  154. </ul>
  155. <!--[if lte IE 6]><script type="text/javascript">$('#themeSwitch').hide();</script><![endif]-->
  156. </li>
  157. <li id="userInfo" class="dropdown">
  158. <a class="dropdown-toggle" data-toggle="dropdown" href="#" title="个人信息">您好, ${fns:getUser().name}&nbsp;<span id="notifyNum" class="label label-info hide"></span></a>
  159. <ul class="dropdown-menu">
  160. <li><a href="${ctx}/sys/user/info" target="mainFrame"><i class="icon-user"></i>&nbsp; 个人信息</a></li>
  161. <li><a href="${ctx}/sys/user/modifyPwd" target="mainFrame"><i class="icon-lock"></i>&nbsp; 修改密码</a></li>
  162. <li><a href="${ctx}/oa/oaNotify/self" target="mainFrame"><i class="icon-bell"></i>&nbsp; 我的通知 <span id="notifyNum2" class="label label-info hide"></span></a></li>
  163. </ul>
  164. </li>
  165. <li><a href="${ctx}/logout" title="退出登录">退出</a></li>
  166. <li>&nbsp;</li>
  167. </ul>
  168. <%--<c:if test="${cookie.theme.value eq 'cerulean'}"> --%>
  169. <div id="user" style="position:absolute;top:0;right:0;"></div>
  170. <div id="logo" style="background:url(${ctxStatic}/images/logo.png) right repeat-x;width:100%;">
  171. <div style="background:url(${ctxStatic}/images/logo.png) left no-repeat;width:100%;height:70px;"></div>
  172. </div>
  173. <script type="text/javascript">
  174. $("#productName").hide();$("#user").html($("#userControl"));$("#header").prepend($("#user, #logo"));
  175. </script>
  176. <%--</c:if> --%>
  177. <div class="nav-collapse">
  178. <ul id="menu" class="nav" style="*white-space:nowrap;float:none;">
  179. <c:set var="firstMenu" value="true"/>
  180. <c:forEach items="${fns:getMenuList()}" var="menu" varStatus="idxStatus">
  181. <c:if test="${menu.parent.id eq '1'&&menu.isShow eq '1'}">
  182. <li class="menu ${not empty firstMenu && firstMenu ? ' active' : ''}">
  183. <c:if test="${empty menu.href}">
  184. <a class="menu" href="javascript:" data-href="${ctx}/sys/menu/tree?parentId=${menu.id}" data-id="${menu.id}"><span>${menu.name}</span></a>
  185. </c:if>
  186. <c:if test="${not empty menu.href}">
  187. <a class="menu" href="${fn:indexOf(menu.href, '://') eq -1 ? ctx : ''}${menu.href}" data-id="${menu.id}" target="mainFrame"><span>${menu.name}</span></a>
  188. </c:if>
  189. </li>
  190. <c:if test="${firstMenu}">
  191. <c:set var="firstMenuId" value="${menu.id}"/>
  192. </c:if>
  193. <c:set var="firstMenu" value="false"/>
  194. </c:if>
  195. </c:forEach><%--
  196. <shiro:hasPermission name="cms:site:select">
  197. <li class="dropdown">
  198. <a class="dropdown-toggle" data-toggle="dropdown" href="#">${fnc:getSite(fnc:getCurrentSiteId()).name}<b class="caret"></b></a>
  199. <ul class="dropdown-menu">
  200. <c:forEach items="${fnc:getSiteList()}" var="site"><li><a href="${ctx}/cms/site/select?id=${site.id}&flag=1">${site.name}</a></li></c:forEach>
  201. </ul>
  202. </li>
  203. </shiro:hasPermission> --%>
  204. </ul>
  205. </div><!--/.nav-collapse -->
  206. </div>
  207. </div>
  208. <div class="container-fluid">
  209. <div id="content" class="row-fluid">
  210. <div id="left"><%--
  211. <iframe id="menuFrame" name="menuFrame" src="" style="overflow:visible;" scrolling="yes" frameborder="no" width="100%" height="650"></iframe> --%>
  212. </div>
  213. <div id="openClose" class="close">&nbsp;</div>
  214. <div id="right">
  215. <iframe id="mainFrame" name="mainFrame" src="" style="overflow:visible;" scrolling="yes" frameborder="no" width="100%" height="650"></iframe>
  216. </div>
  217. </div>
  218. <div id="footer" class="row-fluid">
  219. Copyright &copy; 2014 - <span id="copyrightYear"></span> ${fns:getConfig('productName')} ${fns:getConfig('version')}
  220. </div>
  221. </div>
  222. </div>
  223. <script type="text/javascript">
  224. var leftWidth = 160; // 左侧窗口大小
  225. var tabTitleHeight = 33; // 页签的高度
  226. var htmlObj = $("html"), mainObj = $("#main");
  227. var headerObj = $("#header"), footerObj = $("#footer");
  228. var frameObj = $("#left, #openClose, #right, #right iframe");
  229. function wSize(){
  230. var minHeight = 500, minWidth = 980;
  231. var strs = getWindowSize().toString().split(",");
  232. htmlObj.css({"overflow-x":strs[1] < minWidth ? "auto" : "hidden", "overflow-y":strs[0] < minHeight ? "auto" : "hidden"});
  233. mainObj.css("width",strs[1] < minWidth ? minWidth - 10 : "auto");
  234. frameObj.height((strs[0] < minHeight ? minHeight : strs[0]) - headerObj.height() - footerObj.height() - (strs[1] < minWidth ? 42 : 28));
  235. $("#openClose").height($("#openClose").height() - 5);// <c:if test="${cookie.tabmode.value eq '1'}">
  236. $(".jericho_tab iframe").height($("#right").height() - tabTitleHeight); // </c:if>
  237. wSizeWidth();
  238. }
  239. function wSizeWidth(){
  240. if (!$("#openClose").is(":hidden")){
  241. var leftWidth = ($("#left").width() < 0 ? 0 : $("#left").width());
  242. $("#right").width($("#content").width()- leftWidth - $("#openClose").width() -5);
  243. }else{
  244. $("#right").width("100%");
  245. }
  246. }// <c:if test="${cookie.tabmode.value eq '1'}">
  247. function openCloseClickCallBack(b){
  248. $.fn.jerichoTab.resize();
  249. } // </c:if>
  250. $(function () {
  251. let date = new Date()
  252. $('#copyrightYear').text( date.getFullYear())
  253. })
  254. </script>
  255. <script src="${ctxStatic}/common/wsize.min.js" type="text/javascript"></script>
  256. </body>
  257. </html>