From 63f5bc8b4c7308a4740e797f28c1f0d08bd251eb Mon Sep 17 00:00:00 2001 From: wyf Date: Thu, 7 Mar 2019 18:42:49 +0800 Subject: [PATCH] add menu target support --- .../src/main/java/io/jpress/core/menu/MenuItem.java | 11 +++++++++++ .../WEB-INF/views/admin/_layout/_left_menu.html | 4 ++-- .../WEB-INF/views/ucenter/_layout/_left_menu.html | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/jpress-core/src/main/java/io/jpress/core/menu/MenuItem.java b/jpress-core/src/main/java/io/jpress/core/menu/MenuItem.java index 7bf938a27..c10c21ad8 100644 --- a/jpress-core/src/main/java/io/jpress/core/menu/MenuItem.java +++ b/jpress-core/src/main/java/io/jpress/core/menu/MenuItem.java @@ -33,6 +33,7 @@ public class MenuItem { private String groupId; private String url; private int order = 100; + private String target; public MenuItem() { } @@ -43,6 +44,7 @@ public class MenuItem { this.setGroupId(uCenterMenu.groupId()); this.setUrl(actionKey); this.setOrder(uCenterMenu.order()); + this.setTarget(uCenterMenu.target()); } public MenuItem(AdminMenu adminMenu, String actionKey) { @@ -51,6 +53,7 @@ public class MenuItem { this.setGroupId(adminMenu.groupId()); this.setUrl(actionKey); this.setOrder(adminMenu.order()); + this.setTarget(adminMenu.target()); } public String getId() { @@ -105,6 +108,14 @@ public class MenuItem { return groupId + ":" + url; } + public String getTarget() { + return target; + } + + public void setTarget(String target) { + this.target = target; + } + @Override public boolean equals(Object obj) { if (obj == null || obj instanceof MenuItem == false) { diff --git a/jpress-web/src/main/webapp/WEB-INF/views/admin/_layout/_left_menu.html b/jpress-web/src/main/webapp/WEB-INF/views/admin/_layout/_left_menu.html index fe2c78ff1..adaa8a1a8 100755 --- a/jpress-web/src/main/webapp/WEB-INF/views/admin/_layout/_left_menu.html +++ b/jpress-web/src/main/webapp/WEB-INF/views/admin/_layout/_left_menu.html @@ -18,7 +18,7 @@ @@ -35,7 +35,7 @@ diff --git a/jpress-web/src/main/webapp/WEB-INF/views/ucenter/_layout/_left_menu.html b/jpress-web/src/main/webapp/WEB-INF/views/ucenter/_layout/_left_menu.html index 5267adb6d..bcf0a3bed 100755 --- a/jpress-web/src/main/webapp/WEB-INF/views/ucenter/_layout/_left_menu.html +++ b/jpress-web/src/main/webapp/WEB-INF/views/ucenter/_layout/_left_menu.html @@ -19,7 +19,7 @@ -- Gitee