@saltcorn/server 0.8.7-beta.5 → 0.8.7-beta.6
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/locales/en.json +3 -1
- package/package.json +8 -8
- package/public/saltcorn.css +3 -0
- package/public/saltcorn.js +13 -5
- package/routes/view.js +2 -0
- package/routes/viewedit.js +8 -0
package/locales/en.json
CHANGED
|
@@ -1191,5 +1191,7 @@
|
|
|
1191
1191
|
"Do not allow the following fields to have a value set from the query string or state": "Do not allow the following fields to have a value set from the query string or state",
|
|
1192
1192
|
"Action configuration saved": "Action configuration saved",
|
|
1193
1193
|
"Prevent any deletion of parent rows": "Prevent any deletion of parent rows",
|
|
1194
|
-
"If the parent row is deleted, set key fields on child rows to null": "If the parent row is deleted, set key fields on child rows to null"
|
|
1194
|
+
"If the parent row is deleted, set key fields on child rows to null": "If the parent row is deleted, set key fields on child rows to null",
|
|
1195
|
+
"Link out?": "Link out?",
|
|
1196
|
+
"Show a link to open popup contents in new tab": "Show a link to open popup contents in new tab"
|
|
1195
1197
|
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saltcorn/server",
|
|
3
|
-
"version": "0.8.7-beta.
|
|
3
|
+
"version": "0.8.7-beta.6",
|
|
4
4
|
"description": "Server app for Saltcorn, open-source no-code platform",
|
|
5
5
|
"homepage": "https://saltcorn.com",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@saltcorn/base-plugin": "0.8.7-beta.
|
|
10
|
-
"@saltcorn/builder": "0.8.7-beta.
|
|
11
|
-
"@saltcorn/data": "0.8.7-beta.
|
|
12
|
-
"@saltcorn/admin-models": "0.8.7-beta.
|
|
13
|
-
"@saltcorn/filemanager": "0.8.7-beta.
|
|
14
|
-
"@saltcorn/markup": "0.8.7-beta.
|
|
15
|
-
"@saltcorn/sbadmin2": "0.8.7-beta.
|
|
9
|
+
"@saltcorn/base-plugin": "0.8.7-beta.6",
|
|
10
|
+
"@saltcorn/builder": "0.8.7-beta.6",
|
|
11
|
+
"@saltcorn/data": "0.8.7-beta.6",
|
|
12
|
+
"@saltcorn/admin-models": "0.8.7-beta.6",
|
|
13
|
+
"@saltcorn/filemanager": "0.8.7-beta.6",
|
|
14
|
+
"@saltcorn/markup": "0.8.7-beta.6",
|
|
15
|
+
"@saltcorn/sbadmin2": "0.8.7-beta.6",
|
|
16
16
|
"@socket.io/cluster-adapter": "^0.2.1",
|
|
17
17
|
"@socket.io/sticky": "^1.0.1",
|
|
18
18
|
"adm-zip": "0.5.10",
|
package/public/saltcorn.css
CHANGED
package/public/saltcorn.js
CHANGED
|
@@ -149,6 +149,8 @@ function pjax_to(href, e) {
|
|
|
149
149
|
success: function (res, textStatus, request) {
|
|
150
150
|
if (!inModal && !localizer.length)
|
|
151
151
|
window.history.pushState({ url: href }, "", href);
|
|
152
|
+
if (inModal && !localizer.length)
|
|
153
|
+
$(".sc-modal-linkout").attr("href", href);
|
|
152
154
|
setTimeout(() => {
|
|
153
155
|
loadPage = true;
|
|
154
156
|
}, 0);
|
|
@@ -258,11 +260,14 @@ function ensure_modal_exists_and_closed() {
|
|
|
258
260
|
<div class="modal-content">
|
|
259
261
|
<div class="modal-header">
|
|
260
262
|
<h5 class="modal-title">Modal title</h5>
|
|
261
|
-
<
|
|
262
|
-
<span class="sc-ajax-indicator
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
263
|
+
<div class="">
|
|
264
|
+
<span class="sc-ajax-indicator-wrapper">
|
|
265
|
+
<span class="sc-ajax-indicator ms-2" style="display: none;"><i class="fas fa-save"></i></span>
|
|
266
|
+
</span>
|
|
267
|
+
<a class="sc-modal-linkout ms-2" href="" target="_blank"><i class="fas fa-expand-alt"></i></a>
|
|
268
|
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
|
|
269
|
+
</button>
|
|
270
|
+
</div>
|
|
266
271
|
</div>
|
|
267
272
|
<div class="modal-body">
|
|
268
273
|
<p>Modal body text goes here.</p>
|
|
@@ -300,6 +305,9 @@ function ajax_modal(url, opts = {}) {
|
|
|
300
305
|
);
|
|
301
306
|
if (saveIndicate) $(".sc-ajax-indicator-wrapper").show();
|
|
302
307
|
else $(".sc-ajax-indicator-wrapper").hide();
|
|
308
|
+
var linkOut = !!request.getResponseHeader("SaltcornModalLinkOut");
|
|
309
|
+
if (linkOut) $(".sc-modal-linkout").show().attr("href", url);
|
|
310
|
+
else $(".sc-modal-linkout").hide();
|
|
303
311
|
if (width) $(".modal-dialog").css("max-width", width);
|
|
304
312
|
else $(".modal-dialog").css("max-width", "");
|
|
305
313
|
if (title) $("#scmodal .modal-title").html(decodeURIComponent(title));
|
package/routes/view.js
CHANGED
|
@@ -83,6 +83,8 @@ router.get(
|
|
|
83
83
|
);
|
|
84
84
|
if (isModal && view.attributes?.popup_save_indicator)
|
|
85
85
|
res.set("SaltcornModalSaveIndicator", `true`);
|
|
86
|
+
if (isModal && view.attributes?.popup_link_out)
|
|
87
|
+
res.set("SaltcornModalLinkOut", `true`);
|
|
86
88
|
if (tic) {
|
|
87
89
|
const tock = new Date();
|
|
88
90
|
const ms = tock.getTime() - tic.getTime();
|
package/routes/viewedit.js
CHANGED
|
@@ -250,6 +250,14 @@ const viewForm = async (req, tableOptions, roles, pages, values) => {
|
|
|
250
250
|
parent_field: "attributes",
|
|
251
251
|
tab: "Popup settings",
|
|
252
252
|
},
|
|
253
|
+
{
|
|
254
|
+
name: "popup_link_out",
|
|
255
|
+
label: req.__("Link out?"),
|
|
256
|
+
sublabel: req.__("Show a link to open popup contents in new tab"),
|
|
257
|
+
type: "Bool",
|
|
258
|
+
parent_field: "attributes",
|
|
259
|
+
tab: "Popup settings",
|
|
260
|
+
},
|
|
253
261
|
...(isEdit
|
|
254
262
|
? [
|
|
255
263
|
new Field({
|