@saltcorn/server 0.9.0-beta.5 → 0.9.0-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/package.json +8 -8
- package/public/saltcorn-common.js +18 -1
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saltcorn/server",
|
|
3
|
-
"version": "0.9.0-beta.
|
|
3
|
+
"version": "0.9.0-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.9.0-beta.
|
|
10
|
-
"@saltcorn/builder": "0.9.0-beta.
|
|
11
|
-
"@saltcorn/data": "0.9.0-beta.
|
|
12
|
-
"@saltcorn/admin-models": "0.9.0-beta.
|
|
13
|
-
"@saltcorn/filemanager": "0.9.0-beta.
|
|
14
|
-
"@saltcorn/markup": "0.9.0-beta.
|
|
15
|
-
"@saltcorn/sbadmin2": "0.9.0-beta.
|
|
9
|
+
"@saltcorn/base-plugin": "0.9.0-beta.6",
|
|
10
|
+
"@saltcorn/builder": "0.9.0-beta.6",
|
|
11
|
+
"@saltcorn/data": "0.9.0-beta.6",
|
|
12
|
+
"@saltcorn/admin-models": "0.9.0-beta.6",
|
|
13
|
+
"@saltcorn/filemanager": "0.9.0-beta.6",
|
|
14
|
+
"@saltcorn/markup": "0.9.0-beta.6",
|
|
15
|
+
"@saltcorn/sbadmin2": "0.9.0-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",
|
|
@@ -539,6 +539,7 @@ function initialize_page() {
|
|
|
539
539
|
var ajax = !!$(this).attr("data-inline-edit-ajax");
|
|
540
540
|
var type = $(this).attr("data-inline-edit-type");
|
|
541
541
|
var schema = $(this).attr("data-inline-edit-schema");
|
|
542
|
+
var decimalPlaces = $(this).attr("data-inline-edit-decimal-places");
|
|
542
543
|
if (schema) {
|
|
543
544
|
schema = JSON.parse(decodeURIComponent(schema));
|
|
544
545
|
}
|
|
@@ -561,6 +562,7 @@ function initialize_page() {
|
|
|
561
562
|
type,
|
|
562
563
|
is_key,
|
|
563
564
|
schema,
|
|
565
|
+
...(decimalPlaces ? { decimalPlaces } : {}),
|
|
564
566
|
})
|
|
565
567
|
);
|
|
566
568
|
const doAjaxOptionsFetch = (tblName, target) => {
|
|
@@ -613,7 +615,17 @@ function initialize_page() {
|
|
|
613
615
|
}
|
|
614
616
|
<input type="${
|
|
615
617
|
type === "Integer" || type === "Float" ? "number" : "text"
|
|
616
|
-
}"
|
|
618
|
+
}" ${
|
|
619
|
+
type === "Float"
|
|
620
|
+
? `step="${
|
|
621
|
+
decimalPlaces
|
|
622
|
+
? Math.round(
|
|
623
|
+
Math.pow(10, -decimalPlaces) * Math.pow(10, decimalPlaces)
|
|
624
|
+
) / Math.pow(10, decimalPlaces)
|
|
625
|
+
: "any"
|
|
626
|
+
}"`
|
|
627
|
+
: ""
|
|
628
|
+
} name="${key}" value="${escapeHtml(current)}">
|
|
617
629
|
<button type="submit" class="btn btn-sm btn-primary">OK</button>
|
|
618
630
|
<button onclick="cancel_inline_edit(event, '${opts}')" type="button" class="btn btn-sm btn-danger"><i class="fas fa-times"></i></button>
|
|
619
631
|
</form>`
|
|
@@ -780,6 +792,11 @@ function inline_submit_success(e, form, opts) {
|
|
|
780
792
|
: ""
|
|
781
793
|
}
|
|
782
794
|
${opts.current_label ? `data-inline-edit-current-label="${val}"` : ""}
|
|
795
|
+
${
|
|
796
|
+
opts.decimalPlaces
|
|
797
|
+
? `data-inline-edit-decimal-places="${opts.decimalPlaces}"`
|
|
798
|
+
: ""
|
|
799
|
+
}
|
|
783
800
|
data-inline-edit-dest-url="${opts.url}">
|
|
784
801
|
<span class="current">${val}</span>
|
|
785
802
|
<i class="editicon ${!isNode ? "visible" : ""} fas fa-edit ms-1"></i>
|