diff --git a/@rbv b/@rbv
index 5cd0278ad..eea4cf588 160000
--- a/@rbv
+++ b/@rbv
@@ -1 +1 @@
-Subproject commit 5cd0278ad08b49508bf278654c8ab4825b868870
+Subproject commit eea4cf588a86801837737d4907ca96b8edc67874
diff --git a/src/main/java/com/rebuild/core/metadata/EntityHelper.java b/src/main/java/com/rebuild/core/metadata/EntityHelper.java
index 21fbf3512..7e967feb0 100644
--- a/src/main/java/com/rebuild/core/metadata/EntityHelper.java
+++ b/src/main/java/com/rebuild/core/metadata/EntityHelper.java
@@ -207,6 +207,7 @@ public class EntityHelper {
public static final int SmsendLog = 35;
public static final int Language = 36;
public static final int TransformConfig = 37;
+ public static final int FrontjsCode = 38;
// 动态
diff --git a/src/main/java/com/rebuild/web/RebuildWebInterceptor.java b/src/main/java/com/rebuild/web/RebuildWebInterceptor.java
index 147e42d44..6ecb7973f 100644
--- a/src/main/java/com/rebuild/web/RebuildWebInterceptor.java
+++ b/src/main/java/com/rebuild/web/RebuildWebInterceptor.java
@@ -75,8 +75,9 @@ public class RebuildWebInterceptor implements AsyncHandlerInterceptor, InstallSt
request.setAttribute(WebConstants.LOCALE, requestEntry.getLocale());
request.setAttribute(WebConstants.$BUNDLE, Application.getLanguage().getBundle(requestEntry.getLocale()));
- request.setAttribute(WebConstants.USE_THEME,
- !requestEntry.getRequestUri().contains("/admin/") && License.isCommercial());
+ boolean adminPage = requestEntry.getRequestUri().contains("/admin/")
+ || requestEntry.getRequestUri().contains("/admin-");
+ request.setAttribute(WebConstants.USE_THEME, !adminPage && License.isCommercial());
}
final String requestUri = requestEntry.getRequestUri();
@@ -98,8 +99,7 @@ public class RebuildWebInterceptor implements AsyncHandlerInterceptor, InstallSt
else if (!requestUri.contains("/setup/")) {
sendRedirect(response, "/setup/install", null);
return false;
- }
- else {
+ } else {
return true;
}
}
diff --git a/src/main/java/com/rebuild/web/admin/metadata/MetaEntityController.java b/src/main/java/com/rebuild/web/admin/metadata/MetaEntityController.java
index bc74202b3..83aa3c899 100644
--- a/src/main/java/com/rebuild/web/admin/metadata/MetaEntityController.java
+++ b/src/main/java/com/rebuild/web/admin/metadata/MetaEntityController.java
@@ -97,6 +97,14 @@ public class MetaEntityController extends BaseController {
return mv;
}
+ @GetMapping("entity/{entity}/frontjs")
+ public ModelAndView pageFrontJs(@PathVariable String entity, HttpServletRequest request) {
+ ModelAndView mv = createModelAndView("/admin/metadata/frontjs");
+ mv.getModel().put("isSuperAdmin", UserHelper.isSuperAdmin(getRequestUser(request)));
+ setEntityBase(mv, entity);
+ return mv;
+ }
+
@ResponseBody
@RequestMapping("entity/entity-list")
public Object listEntity(HttpServletRequest request) {
diff --git a/src/main/resources/metadata-conf.xml b/src/main/resources/metadata-conf.xml
index 92c97507e..fa0074581 100644
--- a/src/main/resources/metadata-conf.xml
+++ b/src/main/resources/metadata-conf.xml
@@ -369,6 +369,14 @@
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/scripts/db-init.sql b/src/main/resources/scripts/db-init.sql
index ab4e575f3..3ceb628bd 100644
--- a/src/main/resources/scripts/db-init.sql
+++ b/src/main/resources/scripts/db-init.sql
@@ -724,6 +724,19 @@ create table if not exists `extform_config` (
primary key (`CONFIG_ID`)
)Engine=InnoDB;
+-- ************ Entity [FrontjsCode] DDL ************
+create table if not exists `frontjs_code` (
+ `CODE_ID` char(20) not null,
+ `BELONG_ENTITY` varchar(100) not null comment '所属实体',
+ `APPLY_PATH` varchar(200) comment '应用路径',
+ `CODE` text(21845) comment '代码',
+ `ES5_CODE` text(21845) comment 'ES5 代码',
+ `MODIFIED_ON` timestamp not null default current_timestamp comment '修改时间',
+ `MODIFIED_BY` char(20) not null comment '修改人',
+ `CREATED_BY` char(20) not null comment '创建人',
+ `CREATED_ON` timestamp not null default current_timestamp comment '创建时间',
+ primary key (`CODE_ID`)
+)Engine=InnoDB;
-- #3 datas
@@ -777,4 +790,4 @@ insert into `project_plan_config` (`CONFIG_ID`, `PROJECT_ID`, `PLAN_NAME`, `SEQ`
-- DB Version (see `db-upgrade.sql`)
insert into `system_config` (`CONFIG_ID`, `ITEM`, `VALUE`)
- values ('021-9000000000000001', 'DBVer', 35);
+ values ('021-9000000000000001', 'DBVer', 36);
diff --git a/src/main/resources/scripts/db-upgrade.sql b/src/main/resources/scripts/db-upgrade.sql
index 161d1c8e0..da97b11b5 100644
--- a/src/main/resources/scripts/db-upgrade.sql
+++ b/src/main/resources/scripts/db-upgrade.sql
@@ -1,6 +1,21 @@
-- Database upgrade scripts for rebuild 1.x and 2.x
-- Each upgraded starts with `-- #VERSION`
+-- #36 (v2.4)
+-- ************ Entity [FrontjsCode] DDL ************
+create table if not exists `frontjs_code` (
+ `CODE_ID` char(20) not null,
+ `BELONG_ENTITY` varchar(100) not null comment '所属实体',
+ `APPLY_PATH` varchar(200) comment '应用路径',
+ `CODE` text(21845) comment '代码',
+ `ES5_CODE` text(21845) comment 'ES5 代码',
+ `MODIFIED_ON` timestamp not null default current_timestamp comment '修改时间',
+ `MODIFIED_BY` char(20) not null comment '修改人',
+ `CREATED_BY` char(20) not null comment '创建人',
+ `CREATED_ON` timestamp not null default current_timestamp comment '创建时间',
+ primary key (`CODE_ID`)
+)Engine=InnoDB;
+
-- #35 (v2.3)
alter table `project_task`
add column `RELATED_RECORD` char(20) comment '相关业务记录',
diff --git a/src/main/resources/web/admin/metadata/auto-fillin.html b/src/main/resources/web/admin/metadata/auto-fillin.html
index a08f1d90f..31349c22f 100644
--- a/src/main/resources/web/admin/metadata/auto-fillin.html
+++ b/src/main/resources/web/admin/metadata/auto-fillin.html
@@ -7,7 +7,7 @@
[[${bundle.L('表单回填')}]]
diff --git a/src/main/resources/web/admin/metadata/entity-edit.html b/src/main/resources/web/admin/metadata/entity-edit.html
index a64708bc2..23508409e 100644
--- a/src/main/resources/web/admin/metadata/entity-edit.html
+++ b/src/main/resources/web/admin/metadata/entity-edit.html
@@ -26,6 +26,7 @@
[[${bundle.L('表单设计')}]]
[[${bundle.L('字段管理')}]]
[[${bundle.L('高级配置')}]]
+ FrontJS
diff --git a/src/main/resources/web/admin/metadata/field-edit.html b/src/main/resources/web/admin/metadata/field-edit.html
index 5e0fe1d58..b57bd0874 100644
--- a/src/main/resources/web/admin/metadata/field-edit.html
+++ b/src/main/resources/web/admin/metadata/field-edit.html
@@ -27,6 +27,7 @@
[[${bundle.L('表单设计')}]]
[[${bundle.L('字段管理')}]]
[[${bundle.L('高级配置')}]]
+ FrontJS
diff --git a/src/main/resources/web/admin/metadata/fields.html b/src/main/resources/web/admin/metadata/fields.html
index e5e47cf3d..7dc009a73 100644
--- a/src/main/resources/web/admin/metadata/fields.html
+++ b/src/main/resources/web/admin/metadata/fields.html
@@ -26,6 +26,7 @@
[[${bundle.L('表单设计')}]]
[[${bundle.L('字段管理')}]]
[[${bundle.L('高级配置')}]]
+ FrontJS
diff --git a/src/main/resources/web/admin/metadata/form-design.html b/src/main/resources/web/admin/metadata/form-design.html
index df2c0c3f7..9f50500c2 100644
--- a/src/main/resources/web/admin/metadata/form-design.html
+++ b/src/main/resources/web/admin/metadata/form-design.html
@@ -27,6 +27,7 @@
[[${bundle.L('表单设计')}]]
[[${bundle.L('字段管理')}]]
[[${bundle.L('高级配置')}]]
+ FrontJS
diff --git a/src/main/resources/web/admin/metadata/frontjs.html b/src/main/resources/web/admin/metadata/frontjs.html
new file mode 100644
index 000000000..6bcbc293c
--- /dev/null
+++ b/src/main/resources/web/admin/metadata/frontjs.html
@@ -0,0 +1,82 @@
+
+
+
+
+
+ FrontJS
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/web/general/record-list.html b/src/main/resources/web/general/record-list.html
index cca4c51e4..d3865de88 100644
--- a/src/main/resources/web/general/record-list.html
+++ b/src/main/resources/web/general/record-list.html
@@ -128,5 +128,6 @@
+