From fd028b5e2f7eeb9ada3788adacb04a6faaf1488e Mon Sep 17 00:00:00 2001 From: FangfangZhao Date: Tue, 23 Oct 2018 01:00:52 +0800 Subject: [PATCH] admin --- src/main/webapp/_include/NavTop.jsp | 11 ++++++----- src/main/webapp/assets/js/rb-list.jsx | 2 +- src/main/webapp/assets/js/rb-page.js | 12 ++++++++---- src/main/webapp/general-entity/record-view.jsp | 6 +++--- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/main/webapp/_include/NavTop.jsp b/src/main/webapp/_include/NavTop.jsp index 8cbe89586..b6c42048b 100644 --- a/src/main/webapp/_include/NavTop.jsp +++ b/src/main/webapp/_include/NavTop.jsp @@ -1,4 +1,5 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ page import="com.rebuild.web.admin.AdminEntryControll"%> <%@ page import="com.rebuild.utils.AppUtils"%> <%@ page import="com.rebuild.server.Application"%> <%@ page import="com.rebuild.server.bizz.privileges.User"%> @@ -26,20 +27,20 @@ final String showName = UserHelper.getShowName(currentUser);
<%=showName%>
<%=StringUtils.defaultIfBlank(currentUser.getEmail(), "邮箱未设置")%>
- 个人设置 - 退出 + 个人设置 + 退出
<%=request.getParameter("pageTitle")%>
diff --git a/src/main/webapp/assets/js/rb-list.jsx b/src/main/webapp/assets/js/rb-list.jsx index 760567fff..2051a0f2d 100644 --- a/src/main/webapp/assets/js/rb-list.jsx +++ b/src/main/webapp/assets/js/rb-list.jsx @@ -282,7 +282,7 @@ class RbListPagination extends React.Component { let props = this.props this.pageTotal = Math.ceil(props.rowTotal / props.pageSize) if (this.pageTotal <= 0) this.pageTotal = 1 - const pages = calcPages(this.pageTotal, props.pageNo) + const pages = $calcPages(this.pageTotal, props.pageNo) return (
diff --git a/src/main/webapp/assets/js/rb-page.js b/src/main/webapp/assets/js/rb-page.js index 4514389ac..afc2c21f3 100644 --- a/src/main/webapp/assets/js/rb-page.js +++ b/src/main/webapp/assets/js/rb-page.js @@ -19,8 +19,13 @@ $(function(){ if (rb.isAdminUser == true) { $('.J_for-admin').removeClass('hide') + if (location.href.indexOf('/admin/') == -1) { + if ($('.J_admin-settings').data('verified') == true){ + $('.J_admin-settings a').attr('title', '系统配置 (已验证管理员权限)') + $('.J_admin-settings a i').addClass('text-danger') + } + } } - }); const __initNavs = function(){ @@ -36,7 +41,7 @@ const __initNavs = function(){ $('.left-sidebar-spacer').toggleClass('open') }).text($('.rb-right-navbar .page-title').text()) - // ASide + // aside let aside = $('.page-aside'); if (aside.length > 0) { $('.page-aside .aside-header').click(function(){ @@ -55,7 +60,7 @@ const __initNavs = function(){ // 计算分页 // @tp 总计页面 // @cp 当前页面 -const calcPages = function(tp, cp){ +const $calcPages = function(tp, cp){ tp = ~~tp; cp = ~~cp; let pages = []; if (tp <= 8){ @@ -73,5 +78,4 @@ const calcPages = function(tp, cp){ if (end <= tp - 1) pages.push('.'); if (end <= tp) pages.push(tp); return pages; - } \ No newline at end of file diff --git a/src/main/webapp/general-entity/record-view.jsp b/src/main/webapp/general-entity/record-view.jsp index 9d410b982..71701c3d6 100644 --- a/src/main/webapp/general-entity/record-view.jsp +++ b/src/main/webapp/general-entity/record-view.jsp @@ -28,7 +28,7 @@
@@ -52,8 +52,8 @@