@steedos/service-pages 3.0.0-beta.28 → 3.0.0-beta.30
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.
- package/main/default/objects/pages/buttons/customPage.button.js +1 -4
- package/main/default/objects/pages/buttons/deploy.button.js +1 -4
- package/main/default/objects/pages/buttons/showDesign.button.js +0 -6
- package/main/default/objects/pages/buttons/viewPage.button.js +3 -2
- package/main/default/routes/page_design.ejs +2 -2
- package/package.json +2 -2
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
module.exports = {
|
|
9
9
|
customPage: function (object_name, record_id) {
|
|
10
|
-
$(document.body).addClass('loading');
|
|
11
10
|
let url = `/service/api/page/customPage`;
|
|
12
11
|
let options = {
|
|
13
12
|
type: 'post',
|
|
@@ -17,15 +16,13 @@ module.exports = {
|
|
|
17
16
|
SteedosUI.notification.success({
|
|
18
17
|
message: '页面已自定义。'
|
|
19
18
|
});
|
|
20
|
-
|
|
21
|
-
$(document.body).removeClass('loading');
|
|
19
|
+
navigate("/app/admin/pages/view/" + data._id)
|
|
22
20
|
},
|
|
23
21
|
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
24
22
|
SteedosUI.notification.error({
|
|
25
23
|
message: '操作失败',
|
|
26
24
|
description: t(XMLHttpRequest.responseJSON.error),
|
|
27
25
|
});
|
|
28
|
-
$(document.body).removeClass('loading');
|
|
29
26
|
}
|
|
30
27
|
};
|
|
31
28
|
Steedos.authRequest(url, options);
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
module.exports = {
|
|
9
9
|
deploy: function (object_name, record_id) {
|
|
10
|
-
$(document.body).addClass('loading');
|
|
11
10
|
let url = `/service/api/page/deploy`;
|
|
12
11
|
let options = {
|
|
13
12
|
type: 'post',
|
|
@@ -18,15 +17,13 @@ module.exports = {
|
|
|
18
17
|
message: '页面已发布。'
|
|
19
18
|
});
|
|
20
19
|
SteedosUI.reloadRecord(object_name, record_id);
|
|
21
|
-
|
|
22
|
-
$(document.body).removeClass('loading');
|
|
20
|
+
window.location.reload();
|
|
23
21
|
},
|
|
24
22
|
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
25
23
|
SteedosUI.notification.error({
|
|
26
24
|
message: '操作失败',
|
|
27
25
|
description: t(XMLHttpRequest.responseJSON.error),
|
|
28
26
|
});
|
|
29
|
-
$(document.body).removeClass('loading');
|
|
30
27
|
}
|
|
31
28
|
};
|
|
32
29
|
Steedos.authRequest(url, options);
|
|
@@ -8,12 +8,6 @@ module.exports = {
|
|
|
8
8
|
perms = {};
|
|
9
9
|
if (record_permissions) {
|
|
10
10
|
perms = record_permissions;
|
|
11
|
-
} else {
|
|
12
|
-
record = Creator.getObjectRecord(object_name, record_id);
|
|
13
|
-
record_permissions = Creator.getRecordPermissions(object_name, record, Meteor.userId());
|
|
14
|
-
if (record_permissions) {
|
|
15
|
-
perms = record_permissions;
|
|
16
|
-
}
|
|
17
11
|
}
|
|
18
12
|
return perms["allowEdit"];
|
|
19
13
|
}
|
|
@@ -16,7 +16,8 @@ module.exports = {
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
viewPageVisible: function (object_name, record_id, permission, data) {
|
|
19
|
-
var record = data && data.record;
|
|
20
|
-
return record && record.type === 'app';
|
|
19
|
+
// var record = data && data.record;
|
|
20
|
+
// return record && record.type === 'app';
|
|
21
|
+
return false;
|
|
21
22
|
}
|
|
22
23
|
}
|
|
@@ -142,13 +142,13 @@
|
|
|
142
142
|
|
|
143
143
|
if (objectName && pageType === "record") {
|
|
144
144
|
const record = await axios.get(
|
|
145
|
-
`${rootUrl}/api/
|
|
145
|
+
`${rootUrl}/api/v1/${objectName}?$sort=modified&$top=1`,
|
|
146
146
|
{
|
|
147
147
|
withCredentials: true,
|
|
148
148
|
headers: { Authorization: `Bearer ${tenantId},${authToken}` },
|
|
149
149
|
}
|
|
150
150
|
);
|
|
151
|
-
const value = record?.data?.
|
|
151
|
+
const value = record?.data?.items;
|
|
152
152
|
if (value?.length > 0) {
|
|
153
153
|
schema.data.recordId = value[0]._id;
|
|
154
154
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-pages",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.30",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"scripts": {},
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
10
10
|
},
|
|
11
|
-
"gitHead": "
|
|
11
|
+
"gitHead": "179adc36b9bc560bad5673f0a068600f5af4848f",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"clone": "^2.1.2",
|
|
14
14
|
"ejs": "^3.1.8"
|