@saltcorn/mobile-app 1.2.0-rc.2 → 1.3.0-beta.0
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
CHANGED
|
File without changes
|
|
@@ -27,6 +27,7 @@ export const postView = async (context) => {
|
|
|
27
27
|
xhr: context.xhr,
|
|
28
28
|
files: context.files,
|
|
29
29
|
refererRoute,
|
|
30
|
+
body: body,
|
|
30
31
|
});
|
|
31
32
|
const view = await saltcorn.data.models.View.findOne({
|
|
32
33
|
name: context.params.viewname,
|
|
@@ -81,6 +82,7 @@ export const postViewRoute = async (context) => {
|
|
|
81
82
|
xhr: context.xhr,
|
|
82
83
|
query,
|
|
83
84
|
refererRoute,
|
|
85
|
+
body: context.data || {},
|
|
84
86
|
});
|
|
85
87
|
const view = await saltcorn.data.models.View.findOne({
|
|
86
88
|
name: context.params.viewname,
|
|
@@ -288,15 +288,22 @@ async function loginFormSubmit(e, entryView) {
|
|
|
288
288
|
async function local_post_btn(e) {
|
|
289
289
|
try {
|
|
290
290
|
showLoadSpinner();
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
291
|
+
let path, query;
|
|
292
|
+
if (typeof e === "string") {
|
|
293
|
+
const pq = parent.saltcorn.mobileApp.navigation.splitPathQuery(e);
|
|
294
|
+
path = pq.path;
|
|
295
|
+
query = pq.query;
|
|
296
|
+
} else {
|
|
297
|
+
const form = $(e).closest("form");
|
|
298
|
+
const method = form.attr("method");
|
|
299
|
+
const pq = parent.saltcorn.mobileApp.navigation.splitPathQuery(
|
|
300
|
+
form.attr("action")
|
|
301
|
+
);
|
|
302
|
+
path = `${method}${pq.path}`;
|
|
303
|
+
query = pq.query;
|
|
304
|
+
combineFormAndQuery(form, query);
|
|
305
|
+
}
|
|
306
|
+
await parent.saltcorn.mobileApp.navigation.handleRoute(path, query);
|
|
300
307
|
} finally {
|
|
301
308
|
removeLoadSpinner();
|
|
302
309
|
}
|