@steedos/standard-ui 2.6.1-beta.6 → 2.6.2-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/main/default/applications/admin.app.yml +16 -10
  2. package/main/default/client/favicon.client.js +11 -0
  3. package/main/default/client/history_paths.client.js +153 -106
  4. package/main/default/objectTranslations/apps.en/apps.en.objectTranslation.yml +1 -0
  5. package/main/default/objectTranslations/apps.zh-CN/apps.zh-CN.objectTranslation.yml +1 -0
  6. package/main/default/objectTranslations/tabs.en/tabs.en.objectTranslation.yml +2 -0
  7. package/main/default/objectTranslations/tabs.zh-CN/tabs.zh-CN.objectTranslation.yml +4 -0
  8. package/main/default/objects/apps/buttons/amis_edit.button.yml +2 -2
  9. package/main/default/objects/apps/buttons/amis_nav_schema_design.button.js +23 -23
  10. package/main/default/objects/apps/buttons/amis_new.button.yml +2 -2
  11. package/main/default/objects/apps.action.js +2 -3
  12. package/main/default/objects/apps.object.yml +29 -24
  13. package/main/default/objects/tabs/buttons/generate_object_tabs.button.yml +2 -2
  14. package/main/default/objects/tabs.object.yml +19 -1
  15. package/main/default/pages/metadata.page.amis.json +256 -0
  16. package/main/default/pages/metadata.page.yml +8 -0
  17. package/main/default/routers/amis_app_nav_schema_design.router.js +18 -3
  18. package/main/default/routers/main_head.ejs +155 -0
  19. package/main/default/routers/main_head.router.js +100 -0
  20. package/main/default/tabs/admin_flow_positions.tab.yml +21 -0
  21. package/main/default/tabs/admin_flow_roles.tab.yml +1 -1
  22. package/main/default/tabs/admin_metadata.tab.yml +22 -0
  23. package/main/default/tabs/admin_personal_information.tab.yml +21 -0
  24. package/main/default/tabs/admin_workflow_notifications.tab.yml +1 -1
  25. package/main/default/triggers/apps.trigger.js +10 -3
  26. package/package.json +2 -2
  27. package/package.service.js +26 -3
@@ -20,6 +20,9 @@ tab_items:
20
20
  # admin_space_user_info:
21
21
  # group: 个人设置
22
22
  # index: 1
23
+ admin_personal_information:
24
+ group: personal_settings
25
+ index: 1
23
26
  admin_process_delegation_rules:
24
27
  group: personal_settings
25
28
  index: 2
@@ -53,9 +56,6 @@ tab_items:
53
56
  admin_datasources:
54
57
  group: object_settings
55
58
  index: 13
56
- admin_queue_import:
57
- group: advanced_settings
58
- index: 38
59
59
  admin_pages:
60
60
  group: user_interface
61
61
  index: 15
@@ -74,6 +74,9 @@ tab_items:
74
74
  admin_developer:
75
75
  group: development
76
76
  index: 19.50
77
+ admin_metadata:
78
+ group: development
79
+ index: 19.505
77
80
  admin_developer_triggers:
78
81
  group: development
79
82
  index: 19.51
@@ -98,15 +101,18 @@ tab_items:
98
101
  admin_workflow_outbound_messages:
99
102
  group: process_automation
100
103
  index: 25
104
+ admin_flows:
105
+ group: approval_workflow
106
+ index: 20
101
107
  admin_roles:
102
108
  group: approval_workflow
103
109
  index: 25
104
110
  admin_flow_roles:
105
111
  group: approval_workflow
106
112
  index: 26
107
- admin_flows:
113
+ admin_flow_positions:
108
114
  group: approval_workflow
109
- index: 27
115
+ index: 26.5
110
116
  admin_categories:
111
117
  group: approval_workflow
112
118
  index: 28
@@ -131,12 +137,12 @@ tab_items:
131
137
  # admin_dashboard:
132
138
  # group: 高级设置
133
139
  # index: 35
134
- admin_audit_records:
135
- group: advanced_settings
136
- index: 36
137
140
  admin_autonumber:
138
141
  group: advanced_settings
139
142
  index: 37
143
+ admin_queue_import:
144
+ group: advanced_settings
145
+ index: 38
140
146
  # admin_web_forms:
141
147
  # group: 高级设置
142
148
  # index: 38
@@ -153,6 +159,6 @@ tab_items:
153
159
  group: development
154
160
  index: 42
155
161
  objects: []
156
- sort: 9100
162
+ sort: 999999
157
163
  #url: /app/admin
158
- visible: false
164
+ visible: true
@@ -0,0 +1,11 @@
1
+
2
+ Meteor.startup(function(){
3
+ Tracker.autorun(function(){
4
+ const space = db.spaces.findOne(Steedos.getSpaceId());
5
+ if(space && space.favicon){
6
+ const faviconLink = document.querySelector('link[rel="shortcut icon"]');
7
+ faviconLink.href = Steedos.absoluteUrl("/api/files/avatars/"+space.favicon);
8
+ console.log('update faviconLink.href', faviconLink.href)
9
+ }
10
+ })
11
+ })
@@ -1,115 +1,40 @@
1
1
  /*
2
2
  * @Author: 殷亮辉 yinlianghui@hotoa.com
3
3
  * @Date: 2023-05-16 17:00:38
4
- * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
5
- * @LastEditTime: 2023-05-28 10:13:45
4
+ * @LastEditors: 涂佳俊 tujiajun@steedos.com
5
+ * @LastEditTime: 2023-11-23 17:22:22
6
6
  */
7
7
  var buttonTriggerHistoryPathsChange;
8
- ; (function () {
9
- try {
10
- var rootId = "steedosHistoryPathsRoot";
11
- var modalRoot = document.getElementById(rootId);
12
- if (!modalRoot) {
13
- modalRoot = document.createElement('div');
14
- modalRoot.setAttribute('id', rootId);
15
- $("body")[0].appendChild(modalRoot);
16
- }
17
- const page = {
18
- name: "pageSteedosHistoryPaths",
19
- render_engine: "amis",
20
- schema: {
21
- name: "serviceSteedosHistoryPaths",
22
- id: "serviceSteedosHistoryPaths",
23
- type: "service",
24
- className: "service-steedos-history-paths",
25
- body: [{
26
- "type": "button",
27
- "label": "触发@history_paths.changed",
28
- "name": "buttonTriggerHistoryPathsChange",
29
- "className": "button-trigger-history-paths-change hidden",
30
- "onEvent": {
31
- "click": {
32
- "actions": [
33
- {
34
- "actionType": "broadcast",
35
- "args": {
36
- "eventName": "@history_paths.changed"
37
- }
38
- }
39
- ]
40
- }
41
- }
42
- }]
43
- }
44
- };
45
- Meteor.startup(function () {
46
- const root = $("#" + rootId)[0];
47
- Tracker.autorun(function (c) {
48
- if (Creator.steedosInit.get() && Creator.validated.get()) {
49
- Steedos.Page.render(root, page, {});
50
- const findVars = (obj, vars) => {
51
- try {
52
- return vars.length === vars.filter(function (item) {
53
- return item.split(".").reduce(function (sum, n) {
54
- return sum[n];
55
- }, obj) !== undefined;
56
- }).length;
57
- }
58
- catch (ex) {
59
- return false;
60
- }
61
- }
62
- const waittingVars = ["SteedosUI.refs.serviceSteedosHistoryPaths.getComponentByName"];
63
- Promise.all([
64
- waitForThing(window, waittingVars, findVars)
65
- ]).then(() => {
66
- var scope = SteedosUI.refs["serviceSteedosHistoryPaths"];
67
- buttonTriggerHistoryPathsChange = scope.getComponentByName("serviceSteedosHistoryPaths.buttonTriggerHistoryPathsChange");
68
- Object.assign(Steedos, {
69
- goBack
70
- });
71
- });
72
- }
73
- });
74
- });
75
-
76
- } catch (error) {
77
- console.error(error)
78
- };
79
- })();
80
8
 
81
9
  let historyPathsStoreKey = "history_paths";
82
10
 
83
- // 使用debounce防抖动函数,连续多次自动触发enter事件时,只需要捕获最后一次
84
- FlowRouter.triggers.enter(debounce(function (context, redirect, stop) {
85
- if(!!window.opener){
86
- // 记录详细页面点击右上角查看审批单等打开新窗口情况下,新窗口的history path继承了opener页面的history path,所以需要区别出来,否则会报错
87
- historyPathsStoreKey = "history_paths_opener_level" + getOpenerLevel(window,0);
88
- }
11
+ // 切换应用、对象、列表视图时清除本地存储中的过滤条件
12
+ function clearHistoryFilters(context, lastPath, paths) {
89
13
  const path = context.path;
90
14
  const params = context.params || {};
91
- // const pathDef = context.route.pathDef;
92
- const recordId = params.record_id;
93
- if (recordId) {
94
- // 触发广播事件,把当前path和params累加存入amis变量historyPaths中
95
- var paths = getHistoryPaths() || [];
96
- let lastPath = paths && paths[paths.length - 1];
97
- //判断当前路由与记录的路由是否相同,为解决从设计器微页面返回重复记录的问题#4978
98
- if(path.split('?')[0] != lastPath?.path?.split('?')[0]){
99
- pushHistoryPath(path, params);
100
- }
101
- }
102
- else {
103
- // 触发广播事件重围amis变量historyPaths值为空数组,并把当前path和params存入amis变量historyPaths中
104
- resetHistoryPath(path, params);
105
- }
106
- triggerBroadcastHistoryPathsChanged(buttonTriggerHistoryPathsChange);
107
- }, 200));
108
-
109
- function goBack(){
110
- let prevPath = popHistoryPath();
111
- if(prevPath && prevPath.path){
112
- FlowRouter.go(prevPath.path);
15
+ if (!lastPath || lastPath.params.app_id != params.app_id || lastPath.params.object_name != params.object_name || lastPath.params.list_view_id != params.list_view_id) {
16
+ let listViewPropsStoreKey;
17
+ if (lastPath) {
18
+ if(lastPath.params.record_id){
19
+ // 是从记录详细界面直接切换到其他对象列表或其他应用时,进一步往上找,找到对象列表的path作为lastPath来清除对应的本地存储
20
+ for(let i = paths.length - 1;i >= 0;i--){
21
+ let tempPath = paths[i];
22
+ // if(!tempPath.params.record_id && tempPath.params.list_view_id){
23
+ // 不可以判断list_view_id表示对象列表,因为有可以从应用程序微页面进入记录详细页面,需要清除应用程序微页面中的对象表格或对象列表组件中本地存储中保存的过滤条件
24
+ if(!tempPath.params.record_id){
25
+ // record_id不存在,list_view_id存在表示对象列表页面
26
+ lastPath = tempPath;
27
+ break;
28
+ }
29
+ }
30
+ }
31
+ listViewPropsStoreKey = lastPath.path.split('?')[0] + "/crud";
32
+ }
33
+ else {
34
+ listViewPropsStoreKey = path.split('?')[0] + "/crud";
35
+ }
36
+ sessionStorage.removeItem(listViewPropsStoreKey);
37
+ sessionStorage.removeItem(listViewPropsStoreKey + "/query");
113
38
  }
114
39
  }
115
40
 
@@ -195,10 +120,132 @@ function debounce(fn, delay) {
195
120
  }
196
121
  }
197
122
 
198
- function getOpenerLevel(opener,level){
123
+ function getOpenerLevel(opener, level) {
124
+ if (level > 3) {
125
+ return level + 1;
126
+ }
199
127
  if (!!opener['opener']) {
200
128
  return getOpenerLevel(opener['opener'], level + 1);
201
- }else{
202
- return level;
129
+ } else {
130
+ return level;
203
131
  }
204
- }
132
+ }
133
+
134
+
135
+ function goBack(){
136
+ let prevPath = popHistoryPath();
137
+ if(prevPath && prevPath.path){
138
+ FlowRouter.go(prevPath.path);
139
+ }
140
+ }
141
+
142
+ window.goBack = goBack;
143
+
144
+ ; (function () {
145
+ try {
146
+ Meteor.startup(function () {
147
+ Object.assign(Steedos, {
148
+ goBack
149
+ });
150
+ var rootId = "steedosHistoryPathsRoot";
151
+ var modalRoot = document.getElementById(rootId);
152
+ if (!modalRoot) {
153
+ modalRoot = document.createElement('div');
154
+ modalRoot.setAttribute('id', rootId);
155
+ $("body")[0].appendChild(modalRoot);
156
+ }
157
+ const page = {
158
+ name: "pageSteedosHistoryPaths",
159
+ render_engine: "amis",
160
+ schema: {
161
+ name: "serviceSteedosHistoryPaths",
162
+ id: "serviceSteedosHistoryPaths",
163
+ type: "service",
164
+ className: "service-steedos-history-paths",
165
+ body: [{
166
+ "type": "button",
167
+ "label": "触发@history_paths.changed",
168
+ "name": "buttonTriggerHistoryPathsChange",
169
+ "className": "button-trigger-history-paths-change hidden",
170
+ "onEvent": {
171
+ "click": {
172
+ "actions": [
173
+ {
174
+ "actionType": "broadcast",
175
+ "args": {
176
+ "eventName": "@history_paths.changed"
177
+ }
178
+ }
179
+ ]
180
+ }
181
+ }
182
+ }]
183
+ }
184
+ };
185
+ const root = $("#" + rootId)[0];
186
+ Tracker.autorun(function (c) {
187
+ if (Creator.steedosInit.get() && Creator.validated.get()) {
188
+ Steedos.Page.render(root, page, {});
189
+ const findVars = (obj, vars) => {
190
+ try {
191
+ return vars.length === vars.filter(function (item) {
192
+ return item.split(".").reduce(function (sum, n) {
193
+ return sum[n];
194
+ }, obj) !== undefined;
195
+ }).length;
196
+ }
197
+ catch (ex) {
198
+ return false;
199
+ }
200
+ }
201
+ Promise.all([
202
+ waitForThing(window, 'SteedosUI'),
203
+ ]).then(() => {
204
+ const waittingVars = ["SteedosUI.refs.serviceSteedosHistoryPaths.getComponentByName"];
205
+ Promise.all([
206
+ waitForThing(window, waittingVars, findVars)
207
+ ]).then(() => {
208
+ var scope = SteedosUI.refs["serviceSteedosHistoryPaths"];
209
+ buttonTriggerHistoryPathsChange = scope.getComponentByName("serviceSteedosHistoryPaths.buttonTriggerHistoryPathsChange");
210
+ });
211
+ });
212
+ }
213
+ });
214
+ });
215
+
216
+ } catch (error) {
217
+ console.error(error)
218
+ };
219
+ })();
220
+
221
+
222
+ // 使用debounce防抖动函数,连续多次自动触发enter事件时,只需要捕获最后一次
223
+ FlowRouter.triggers.enter(debounce(function (context, redirect, stop) {
224
+ if(!!window.opener){
225
+ // 记录详细页面点击右上角查看审批单等打开新窗口情况下,新窗口的history path继承了opener页面的history path,所以需要区别出来,否则会报错
226
+ historyPathsStoreKey = "history_paths_opener_level" + getOpenerLevel(window,0);
227
+ }
228
+ const path = context.path;
229
+ const params = context.params || {};
230
+ // const pathDef = context.route.pathDef;
231
+ const recordId = params.record_id;
232
+ var paths = getHistoryPaths() || [];
233
+ let lastPath = paths && paths[paths.length - 1];
234
+ if (recordId) {
235
+ //判断当前路由与记录的路由是否相同,为解决从设计器微页面返回重复记录的问题#4978
236
+ var top0 = null;
237
+ if(lastPath && lastPath.path && lastPath.path.split){
238
+ top0 = lastPath.path.split('?')[0]
239
+ }
240
+ if(path.split('?')[0] != top0){
241
+ // 触发广播事件前,把当前path和params累加存入amis变量historyPaths中
242
+ pushHistoryPath(path, params);
243
+ }
244
+ }
245
+ else {
246
+ clearHistoryFilters(context, lastPath, paths);
247
+ // 触发广播事件前重置amis变量historyPaths值为空数组,并把当前path和params存入amis变量historyPaths中
248
+ resetHistoryPath(path, params);
249
+ }
250
+ triggerBroadcastHistoryPathsChanged(buttonTriggerHistoryPathsChange);
251
+ }, 200));
@@ -183,6 +183,7 @@ groups:
183
183
  external_application: External Application
184
184
  oauth2: OAuth2
185
185
  saml: SAML
186
+ other: Other
186
187
  listviews:
187
188
  all:
188
189
  label: All Apps
@@ -190,6 +190,7 @@ groups:
190
190
  external_application: 外接应用
191
191
  oauth2: OAuth2
192
192
  saml: SAML
193
+ other: 其它
193
194
  listviews:
194
195
  all:
195
196
  label: 所有
@@ -61,3 +61,5 @@ fields:
61
61
  listviews:
62
62
  all:
63
63
  label: All Tabs
64
+ customize:
65
+ label: Customize
@@ -58,6 +58,10 @@ fields:
58
58
  label: 在新窗口打开
59
59
  help:
60
60
  description:
61
+ is_use_iframe:
62
+ label: 使用iframe打开
61
63
  listviews:
62
64
  all:
63
65
  label: 所有
66
+ customize:
67
+ label: 自定义
@@ -5,14 +5,14 @@ amis_schema: |-
5
5
  "body": [
6
6
  {
7
7
  "type": "button",
8
- "label": "编辑",
8
+ "label": "${'apps.amis_edit.edit' | t}",
9
9
  "id": "u:standard_edit",
10
10
  "onEvent": {
11
11
  "click": {
12
12
  "actions": [
13
13
  {
14
14
  "actionType": "custom",
15
- "script": "const appId = null;\nconst page = Steedos.Page.getPage('app', appId, null, null, \"apps_form\");\nif (page && page.schema) {\n const pageSchema = JSON.parse(page.schema);\n let formSchema = pageSchema.body[0];\n // 设置form的canAccessSuperData属性防止弹出窗口从父级取字段默认值\n formSchema.canAccessSuperData = false;\n // 设置form的wrapWithPanel属性隐藏其底部保存取消按钮\n formSchema.wrapWithPanel = false;\n formSchema.className = \"steedos-amis-form\";\n const title = \"编辑 应用程序\";\n doAction({\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": title,\n \"body\": [formSchema],\n \"size\": \"lg\"\n }\n });\n}"
15
+ "script": "const appId = null;\nconst page = Steedos.Page.getPage('app', appId, null, null, \"apps_form\");\nif (page && page.schema) {\n const pageSchema = JSON.parse(page.schema);\n let formSchema = pageSchema.body[0];\n // 设置form的canAccessSuperData属性防止弹出窗口从父级取字段默认值\n formSchema.canAccessSuperData = false;\n // 设置form的wrapWithPanel属性隐藏其底部保存取消按钮\n formSchema.wrapWithPanel = false;\n formSchema.className = \"steedos-amis-form\";\n const title = t('apps.amis_edit.edit_apps');\n doAction({\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": title,\n \"body\": [formSchema],\n \"size\": \"lg\"\n }\n });\n}"
16
16
  }
17
17
  ],
18
18
  "weight": 0
@@ -2,30 +2,30 @@
2
2
  * @Author: baozhoutao@steedos.com
3
3
  * @Date: 2023-04-11 14:05:42
4
4
  * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2023-04-11 14:08:41
5
+ * @LastEditTime: 2023-10-09 15:44:47
6
6
  * @Description:
7
7
  */
8
8
  module.exports = {
9
- amis_nav_schema_design: function (object_name, record_id) {
10
- document.location = Steedos.absoluteUrl(`/api/amisAppNavSchemaDesign?id=${record_id}&object=${this.record.object_name}&assetUrls=${Builder.settings.assetUrls}`);
11
- },
12
- amis_nav_schema_designVisible: function (object_name, record_id, record_permissions) {
13
- var perms= {};
14
- var record = Creator.getObjectRecord(object_name, record_id);
15
- if(!record){
16
- return false;
17
- }
18
- if(!record.enable_nav_schema){
19
- return false;
20
- }
21
- if (record_permissions) {
22
- perms = record_permissions;
23
- } else {
24
- record_permissions = Creator.getRecordPermissions(object_name, record, Meteor.userId());
25
- if (record_permissions) {
26
- perms = record_permissions;
27
- }
28
- }
29
- return perms["allowEdit"];
9
+ amis_nav_schema_design: function (object_name, record_id) {
10
+ document.location = Steedos.absoluteUrl(`/api/amisAppNavSchemaDesign?id=${record_id}&object=${this.record.object_name}&assetUrls=${Builder.settings.assetUrls}&locale=${Builder.settings.locale}`);
11
+ },
12
+ amis_nav_schema_designVisible: function (object_name, record_id, record_permissions, data) {
13
+ var perms = {};
14
+ var record = data.record;
15
+ if (!record) {
16
+ return false;
30
17
  }
31
- }
18
+ if (!record.enable_nav_schema) {
19
+ return false;
20
+ }
21
+ if (record_permissions) {
22
+ perms = record_permissions;
23
+ } else {
24
+ record_permissions = Creator.getRecordPermissions(object_name, record, Meteor.userId());
25
+ if (record_permissions) {
26
+ perms = record_permissions;
27
+ }
28
+ }
29
+ return perms["allowEdit"];
30
+ }
31
+ }
@@ -5,7 +5,7 @@ amis_schema: |-
5
5
  "body": [
6
6
  {
7
7
  "type": "button",
8
- "label": "新建",
8
+ "label": "${'apps.amis_new.new' | t}",
9
9
  "id": "u:standard_new",
10
10
  "onEvent": {
11
11
  "click": {
@@ -14,7 +14,7 @@ amis_schema: |-
14
14
  "actionType": "custom",
15
15
  "componentId": "",
16
16
  "args": {},
17
- "script": "const appId = null;\nconst page = Steedos.Page.getPage('app', appId, null, null, \"apps_form\");\nif (page && page.schema) {\n const pageSchema = JSON.parse(page.schema);\n let formSchema = pageSchema.body[0];\n // 设置form的canAccessSuperData属性防止弹出窗口从父级取字段默认值\n formSchema.canAccessSuperData = false;\n // 设置form的wrapWithPanel属性隐藏其底部保存取消按钮\n formSchema.wrapWithPanel = false;\n formSchema.className = \"steedos-amis-form\";\n const title = \"新建 应用程序\";\n doAction({\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": title,\n \"body\": [{\n \"type\": \"service\",\n \"body\": [formSchema],\n \"data\": {\n \"objectName\": \"${object_name}\",\n \"recordId\": \"${record_id}\"\n }\n }],\n \"size\": \"lg\"\n }\n });\n}"
17
+ "script": "const appId = null;\nconst page = Steedos.Page.getPage('app', appId, null, null, \"apps_form\");\nif (page && page.schema) {\n const pageSchema = JSON.parse(page.schema);\n let formSchema = pageSchema.body[0];\n // 设置form的canAccessSuperData属性防止弹出窗口从父级取字段默认值\n formSchema.canAccessSuperData = false;\n // 设置form的wrapWithPanel属性隐藏其底部保存取消按钮\n formSchema.wrapWithPanel = false;\n formSchema.className = \"steedos-amis-form\";\n const title = t('apps.amis_new.new_apps');\n doAction({\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": title,\n \"body\": [{\n \"type\": \"service\",\n \"body\": [formSchema],\n \"data\": {\n \"objectName\": \"${object_name}\",\n \"recordId\": \"${record_id}\"\n }\n }],\n \"size\": \"lg\"\n }\n });\n}"
18
18
  }
19
19
  ],
20
20
  "weight": 0
@@ -1,8 +1,8 @@
1
1
  /*
2
2
  * @Author: baozhoutao@hotoa.com
3
3
  * @Date: 2021-12-27 10:49:33
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2023-06-16 12:04:04
4
+ * @LastEditors: 廖大雪 2291335922@qq.com
5
+ * @LastEditTime: 2023-03-05 18:11:32
6
6
  * @Description:
7
7
  */
8
8
  module.exports = {
@@ -13,7 +13,6 @@ module.exports = {
13
13
  delete newRecord._id;
14
14
  delete newRecord.record_permissions;
15
15
  newRecord.from_code_id = record_id;
16
- newRecord.tabs = doc.tabs;
17
16
  Creator.odata.insert(object_name, newRecord, function(result, error){
18
17
  if(result){
19
18
  FlowRouter.go(`/app/-/${object_name}/view/${result._id}`)
@@ -3,6 +3,7 @@ label: App
3
3
  icon: apps
4
4
  hidden: true
5
5
  version: 2
6
+ enable_dataloader: false
6
7
  fields:
7
8
  name:
8
9
  label: Name
@@ -61,7 +62,8 @@ fields:
61
62
  type: grid
62
63
  blackbox: true
63
64
  is_wide: true
64
- hidden: true
65
+ # hidden: true
66
+ visible_on: "{{false}}"
65
67
  tab_groups.$.group_name:
66
68
  type: text
67
69
  tab_groups.$.default_open:
@@ -89,25 +91,7 @@ fields:
89
91
  # tab_items.$.group:
90
92
  # label: Group
91
93
  # type: text
92
- objects:
93
- label: Desktop Menu(Invalid)
94
- type: lookup
95
- multiple: true
96
- group: Tabs
97
- optionsFunction: !!js/function |
98
- function () {
99
- return Steedos.getObjectsOptions()
100
- }
101
- # filterable: true
102
- mobile_objects:
103
- label: Mobile Menus(Invalid)
104
- type: lookup
105
- multiple: true
106
- group: Tabs
107
- optionsFunction: !!js/function |
108
- function () {
109
- return Steedos.getObjectsOptions()
110
- }
94
+
111
95
  # filterable: true
112
96
  is_creator:
113
97
  type: boolean
@@ -130,10 +114,7 @@ fields:
130
114
  label: 显示左侧导航
131
115
  type: boolean
132
116
  defaultValue: false
133
- enable_nav_schema:
134
- label: 启用自定义导航
135
- type: boolean
136
- required: false
117
+
137
118
  nav_schema:
138
119
  label: 自定义导航
139
120
  type: code
@@ -193,6 +174,30 @@ fields:
193
174
  max: 16
194
175
  min: 16
195
176
  group: External Application
177
+ objects:
178
+ label: Desktop Menu(Invalid)
179
+ type: lookup
180
+ multiple: true
181
+ group: other
182
+ optionsFunction: !!js/function |
183
+ function () {
184
+ return Steedos.getObjectsOptions()
185
+ }
186
+ # filterable: true
187
+ mobile_objects:
188
+ label: Mobile Menus(Invalid)
189
+ type: lookup
190
+ multiple: true
191
+ group: other
192
+ optionsFunction: !!js/function |
193
+ function () {
194
+ return Steedos.getObjectsOptions()
195
+ }
196
+ enable_nav_schema:
197
+ label: 启用自定义导航
198
+ type: boolean
199
+ required: false
200
+ group: other
196
201
 
197
202
  oauth2_enabled:
198
203
  group: OAuth2
@@ -5,14 +5,14 @@ amis_schema: |-
5
5
  "body": [
6
6
  {
7
7
  "type": "button",
8
- "label": "对象选项卡",
8
+ "label": "${ 'tabs.generate_object_tabs.objects_tab' | t}",
9
9
  "id": "u:test",
10
10
  "onEvent": {
11
11
  "click": {
12
12
  "actions": [
13
13
  {
14
14
  "actionType": "custom",
15
- "script": "const appId = null;\nconst page = Steedos.Page.getPage('app', appId, null, null, \"generate_object_tabs\");\nif (page && page.schema) {\n const pageSchema = JSON.parse(page.schema);\n let formSchema = pageSchema.body[0];\n // 设置form的canAccessSuperData属性防止弹出窗口从父级取字段默认值\n formSchema.canAccessSuperData = false;\n // 设置form的wrapWithPanel属性隐藏其底部保存取消按钮\n formSchema.wrapWithPanel = false;\n formSchema.className = \"steedos-amis-form\";\n const title = \"选择需要生成选项卡的对象\";\n doAction({\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": title,\n \"body\": formSchema,\n \"size\": \"lg\"\n }\n });\n}"
15
+ "script": "const appId = null;\nconst page = Steedos.Page.getPage('app', appId, null, null, \"generate_object_tabs\");\nif (page && page.schema) {\n const pageSchema = JSON.parse(page.schema);\n let formSchema = pageSchema.body[0];\n // 设置form的canAccessSuperData属性防止弹出窗口从父级取字段默认值\n formSchema.canAccessSuperData = false;\n // 设置form的wrapWithPanel属性隐藏其底部保存取消按钮\n formSchema.wrapWithPanel = false;\n formSchema.className = \"steedos-amis-form\";\n const title = t('tabs.generate_object_tabs.objects_tab_title');\n doAction({\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": title,\n \"body\": formSchema,\n \"size\": \"lg\"\n }\n });\n}"
16
16
  }
17
17
  ],
18
18
  "weight": 0
@@ -3,6 +3,7 @@ label: Tabs
3
3
  icon: apps
4
4
  hidden: true
5
5
  version: 2.0
6
+ enable_dataloader: false
6
7
  fields:
7
8
  label:
8
9
  inlineHelpText: This is the label of the tab, for web tabs only.
@@ -79,6 +80,10 @@ fields:
79
80
  is_new_window:
80
81
  type: boolean
81
82
  visible_on: "{{'url' === formData.type ? true: false}}"
83
+ is_use_iframe:
84
+ type: boolean
85
+ label: Open with iframe
86
+ defaultValue: false
82
87
  page:
83
88
  type: lookup
84
89
  label: 页面
@@ -104,7 +109,20 @@ fields:
104
109
  disabled: true
105
110
  list_views:
106
111
  all:
107
- label: All Apps
112
+ label: All Tabs
113
+ filter_scope: space
114
+ columns:
115
+ - label
116
+ - name
117
+ # - parent
118
+ - desktop
119
+ - mobile
120
+ - type
121
+ - is_system
122
+ customize:
123
+ label: 自定义
124
+ filters:
125
+ - ["is_system","<>",true]
108
126
  filter_scope: space
109
127
  columns:
110
128
  - label