@xuda.io/runtime-bundle 1.0.687 → 1.0.689
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/js/xuda-runtime-slim.js
CHANGED
|
@@ -11843,7 +11843,7 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
11843
11843
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
11844
11844
|
const _ds = _session.DS_GLB[fields_changed_datasource];
|
|
11845
11845
|
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, _ds.prog_id);
|
|
11846
|
-
|
|
11846
|
+
|
|
11847
11847
|
validate_change(prog_doc);
|
|
11848
11848
|
if (found) {
|
|
11849
11849
|
const $elm = $('#container_5b1_cmp_3700419d8179_0');
|
|
@@ -11851,7 +11851,22 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
11851
11851
|
const $wrapper = $elm.parent();
|
|
11852
11852
|
const wrapper_data = $wrapper.data();
|
|
11853
11853
|
const refreshed_ds = _ds.dsSession;
|
|
11854
|
-
|
|
11854
|
+
|
|
11855
|
+
let elm_to_delete = [];
|
|
11856
|
+
const ts = Date.now();
|
|
11857
|
+
$.each($elm.find('*'), function (key, val) {
|
|
11858
|
+
let xu_ui_id = $(val).attr('xu-ui-id');
|
|
11859
|
+
if (xu_ui_id) {
|
|
11860
|
+
let new_id = xu_ui_id + ts;
|
|
11861
|
+
elm_to_delete.push(new_id);
|
|
11862
|
+
|
|
11863
|
+
$(val).attr('xu-ui-id', new_id).removeData();
|
|
11864
|
+
} else {
|
|
11865
|
+
$(val).remove();
|
|
11866
|
+
}
|
|
11867
|
+
});
|
|
11868
|
+
|
|
11869
|
+
// $elm.empty();
|
|
11855
11870
|
const new_$div = await func.UI.screen.render_ui_tree(
|
|
11856
11871
|
SESSION_ID,
|
|
11857
11872
|
$elm, // the wrapper
|
|
@@ -11867,6 +11882,11 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
11867
11882
|
elm_data.xuData.$root_container, // the wrapper root container
|
|
11868
11883
|
);
|
|
11869
11884
|
|
|
11885
|
+
// remove old screen content
|
|
11886
|
+
$.each(elm_to_delete, async function (key, val) {
|
|
11887
|
+
$("[xu-ui-id='" + elm_to_delete + "']").remove();
|
|
11888
|
+
});
|
|
11889
|
+
|
|
11870
11890
|
return;
|
|
11871
11891
|
}
|
|
11872
11892
|
}
|
|
@@ -9565,7 +9565,7 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9565
9565
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
9566
9566
|
const _ds = _session.DS_GLB[fields_changed_datasource];
|
|
9567
9567
|
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, _ds.prog_id);
|
|
9568
|
-
|
|
9568
|
+
|
|
9569
9569
|
validate_change(prog_doc);
|
|
9570
9570
|
if (found) {
|
|
9571
9571
|
const $elm = $('#container_5b1_cmp_3700419d8179_0');
|
|
@@ -9573,7 +9573,22 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9573
9573
|
const $wrapper = $elm.parent();
|
|
9574
9574
|
const wrapper_data = $wrapper.data();
|
|
9575
9575
|
const refreshed_ds = _ds.dsSession;
|
|
9576
|
-
|
|
9576
|
+
|
|
9577
|
+
let elm_to_delete = [];
|
|
9578
|
+
const ts = Date.now();
|
|
9579
|
+
$.each($elm.find('*'), function (key, val) {
|
|
9580
|
+
let xu_ui_id = $(val).attr('xu-ui-id');
|
|
9581
|
+
if (xu_ui_id) {
|
|
9582
|
+
let new_id = xu_ui_id + ts;
|
|
9583
|
+
elm_to_delete.push(new_id);
|
|
9584
|
+
|
|
9585
|
+
$(val).attr('xu-ui-id', new_id).removeData();
|
|
9586
|
+
} else {
|
|
9587
|
+
$(val).remove();
|
|
9588
|
+
}
|
|
9589
|
+
});
|
|
9590
|
+
|
|
9591
|
+
// $elm.empty();
|
|
9577
9592
|
const new_$div = await func.UI.screen.render_ui_tree(
|
|
9578
9593
|
SESSION_ID,
|
|
9579
9594
|
$elm, // the wrapper
|
|
@@ -9589,6 +9604,11 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9589
9604
|
elm_data.xuData.$root_container, // the wrapper root container
|
|
9590
9605
|
);
|
|
9591
9606
|
|
|
9607
|
+
// remove old screen content
|
|
9608
|
+
$.each(elm_to_delete, async function (key, val) {
|
|
9609
|
+
$("[xu-ui-id='" + elm_to_delete + "']").remove();
|
|
9610
|
+
});
|
|
9611
|
+
|
|
9592
9612
|
return;
|
|
9593
9613
|
}
|
|
9594
9614
|
}
|