@xuda.io/runtime-bundle 1.0.1131 → 1.0.1133
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/modules/xuda-event-ui-elements-module.esm.js +25 -642
- package/js/xuda-runtime-bundle.js +132 -128
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +132 -128
- package/js/xuda-runtime-slim.min.es.js +132 -128
- package/js/xuda-runtime-slim.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -7832,66 +7832,67 @@ func.UI.utils.get_nodeId = function (SESSION_ID, dsSessionP, ui_idP, $container,
|
|
|
7832
7832
|
return $elm.attr('nodeId');
|
|
7833
7833
|
}
|
|
7834
7834
|
};
|
|
7835
|
-
func.UI.utils.get_element_info = function (SESSION_ID, dsSessionP, ui_idP, $container, is_app_panel, ui_type, functionP) {
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7835
|
+
// func.UI.utils.get_element_info = function (SESSION_ID, dsSessionP, ui_idP, $container, is_app_panel, ui_type, functionP) {
|
|
7836
|
+
// var $elm = func.UI.utils.get_node_elm(SESSION_ID, dsSessionP, ui_idP, $container, is_app_panel, ui_type, functionP);
|
|
7837
|
+
// var ret = {};
|
|
7838
|
+
// if ($elm?.length) {
|
|
7839
|
+
// //length added 20210209
|
|
7840
|
+
// // if (is_app_panel) {
|
|
7841
|
+
// // if ($elm?.data()?.xuData.panel_info) {
|
|
7842
|
+
// // ret.nodeId = $elm.data().xuData.panel_info.prop.id;
|
|
7843
|
+
// // } else {
|
|
7844
|
+
// // ret.nodeId = $elm.data().xuData.properties.id;
|
|
7845
|
+
// // }
|
|
7846
|
+
// // } else {
|
|
7847
|
+
// // ret.nodeId = $elm.data().xuData.nodeId;
|
|
7848
|
+
// ret.nodeId = $elm.data().xuData.xu_id;
|
|
7849
|
+
|
|
7850
|
+
// // ret.nodeId = $elm.attr('xu-ui-id');
|
|
7851
|
+
// // }
|
|
7852
|
+
// }
|
|
7853
|
+
// ret.$elm = $elm;
|
|
7854
|
+
// return ret;
|
|
7855
|
+
// };
|
|
7855
7856
|
func.UI.utils.get_ui_id_count = function (SESSION_ID, dsSessionP, ui_idP, $container) {
|
|
7856
7857
|
return func.UI.utils.get_node_elm(SESSION_ID, dsSessionP, ui_idP, $container, null, null).length;
|
|
7857
7858
|
};
|
|
7858
|
-
func.UI.utils.get_ui_info_tree_scope = function (SESSION_ID, dsP, ui_id, is_app_panel, ui_type, $container, functionP) {
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7859
|
+
// func.UI.utils.get_ui_info_tree_scope = function (SESSION_ID, dsP, ui_id, is_app_panel, ui_type, $container, functionP) {
|
|
7860
|
+
// var drill_parent = function () {
|
|
7861
|
+
// if (SESSION_OBJ[SESSION_ID].DS_GLB[dsP].parentDataSourceNo) {
|
|
7862
|
+
// return func.UI.utils.get_ui_info_tree_scope(SESSION_ID, SESSION_OBJ[SESSION_ID].DS_GLB[dsP].parentDataSourceNo, ui_id, is_app_panel, ui_type);
|
|
7863
|
+
// } else if (ui_type === 'xu-app-page') {
|
|
7864
|
+
// if (elm_info.$elm.length) {
|
|
7865
|
+
// return {
|
|
7866
|
+
// ds: dsP,
|
|
7867
|
+
// id: id,
|
|
7868
|
+
// $elm: elm_info.$elm,
|
|
7869
|
+
// };
|
|
7870
|
+
// }
|
|
7871
|
+
// }
|
|
7872
|
+
// };
|
|
7873
|
+
// if (!SESSION_OBJ[SESSION_ID].DS_GLB[dsP]) return;
|
|
7873
7874
|
|
|
7874
|
-
|
|
7875
|
-
|
|
7875
|
+
// var elm_info = func.UI.utils.get_element_info(SESSION_ID, dsP, ui_id, $container, is_app_panel, ui_type, functionP);
|
|
7876
|
+
// var id = elm_info.nodeId;
|
|
7876
7877
|
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
|
|
7893
|
-
|
|
7894
|
-
};
|
|
7878
|
+
// if (!id) {
|
|
7879
|
+
// return drill_parent();
|
|
7880
|
+
// } else {
|
|
7881
|
+
// if (is_app_panel) {
|
|
7882
|
+
// return {
|
|
7883
|
+
// ds: func.UI.utils.get_node_elm(SESSION_ID, dsP, ui_id, $container, is_app_panel).data().xuData.paramsP.dsSessionP,
|
|
7884
|
+
// id: id,
|
|
7885
|
+
// $elm: elm_info.$elm,
|
|
7886
|
+
// };
|
|
7887
|
+
// } else {
|
|
7888
|
+
// return {
|
|
7889
|
+
// ds: dsP,
|
|
7890
|
+
// id: id,
|
|
7891
|
+
// $elm: elm_info.$elm,
|
|
7892
|
+
// };
|
|
7893
|
+
// }
|
|
7894
|
+
// }
|
|
7895
|
+
// };
|
|
7895
7896
|
|
|
7896
7897
|
func.UI.utils.clean_node_busy = function (node) {
|
|
7897
7898
|
var run_node = function (node) {
|
|
@@ -7904,34 +7905,34 @@ func.UI.utils.clean_node_busy = function (node) {
|
|
|
7904
7905
|
return node;
|
|
7905
7906
|
};
|
|
7906
7907
|
|
|
7907
|
-
func.UI.utils.get_ui_info_tree_scope_sync = function (SESSION_ID, dsP, ui_id, ui_type, callback, $container, functionP) {
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7908
|
+
// func.UI.utils.get_ui_info_tree_scope_sync = function (SESSION_ID, dsP, ui_id, ui_type, callback, $container, functionP) {
|
|
7909
|
+
// var ret;
|
|
7910
|
+
// var is_app_panel = false;
|
|
7911
|
+
// if (ui_type === 'xu-panel') {
|
|
7912
|
+
// is_app_panel = true;
|
|
7913
|
+
// }
|
|
7913
7914
|
|
|
7914
|
-
|
|
7915
|
+
// ret = func.UI.utils.get_ui_info_tree_scope(SESSION_ID, dsP, ui_id, is_app_panel, ui_type, $container, functionP);
|
|
7915
7916
|
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
};
|
|
7917
|
+
// if (!ret) {
|
|
7918
|
+
// var attempts = 0;
|
|
7919
|
+
// const run = function () {
|
|
7920
|
+
// ret = func.UI.utils.get_ui_info_tree_scope(SESSION_ID, dsP, ui_id, is_app_panel, ui_type, $container, functionP);
|
|
7921
|
+
// if (ret || attempts > 10) {
|
|
7922
|
+
// callback(ret);
|
|
7923
|
+
// } else {
|
|
7924
|
+
// attempts++;
|
|
7925
|
+
// console.log(attempts, dsP, ui_id, is_app_panel);
|
|
7926
|
+
// setTimeout(function () {
|
|
7927
|
+
// run();
|
|
7928
|
+
// }, 100);
|
|
7929
|
+
// }
|
|
7930
|
+
// };
|
|
7931
|
+
// run();
|
|
7932
|
+
// } else {
|
|
7933
|
+
// callback(ret);
|
|
7934
|
+
// }
|
|
7935
|
+
// };
|
|
7935
7936
|
|
|
7936
7937
|
func.UI.utils.live_preview_element_inspect_on = function (SESSION_ID, service) {
|
|
7937
7938
|
$.each($('[xu-ui-id]'), function (key, val) {
|
|
@@ -8710,12 +8711,12 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
|
8710
8711
|
return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
|
|
8711
8712
|
};
|
|
8712
8713
|
|
|
8713
|
-
var $elm = func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', queue_obj.paramsP.elem_key);
|
|
8714
|
-
|
|
8714
|
+
// var $elm = func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', queue_obj.paramsP.elem_key);
|
|
8715
|
+
var $elm = $(`[xu-ui-id="${queue_obj.paramsP.elem_key}"]`);
|
|
8715
8716
|
|
|
8716
|
-
if (glb.new_xu_render) {
|
|
8717
|
-
|
|
8718
|
-
}
|
|
8717
|
+
// if (glb.new_xu_render) {
|
|
8718
|
+
// $elm = $(`[xu-ui-id="${queue_obj.paramsP.elem_key}"]`);
|
|
8719
|
+
// }
|
|
8719
8720
|
|
|
8720
8721
|
if (!$elm.length) {
|
|
8721
8722
|
return done();
|
|
@@ -11609,7 +11610,9 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11609
11610
|
}
|
|
11610
11611
|
});
|
|
11611
11612
|
|
|
11612
|
-
const selector_id = glb.new_xu_render ? $(this).data()?.xuData?.ui_id : $(this).data()?.xuData?.xu_id;
|
|
11613
|
+
// const selector_id = glb.new_xu_render ? $(this).data()?.xuData?.ui_id : $(this).data()?.xuData?.xu_id;
|
|
11614
|
+
|
|
11615
|
+
const selector_id = $(this).attr('xu-ui-id');
|
|
11613
11616
|
|
|
11614
11617
|
if (attr.length) {
|
|
11615
11618
|
selectors[selector_id] = selectors[selector_id];
|
|
@@ -11767,7 +11770,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11767
11770
|
for (let item of node) {
|
|
11768
11771
|
if (!_.isEmpty(item.attributes)) {
|
|
11769
11772
|
const parent_element_ui_id = node_id;
|
|
11770
|
-
const _$elem = $(`[xu-node-id="${parent_element_ui_id}"]`);
|
|
11773
|
+
// const _$elem = $(`[xu-node-id="${parent_element_ui_id}"]`);
|
|
11771
11774
|
for await (const [attr, val] of Object.entries(item.attributes)) {
|
|
11772
11775
|
if (attr === 'xu-exp:xu-for' || attr === 'xu-for') {
|
|
11773
11776
|
if (val?.includes(field_id)) {
|
|
@@ -11775,8 +11778,9 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11775
11778
|
// debugger;
|
|
11776
11779
|
// let _$elem = $(`[xu-ui-id^=${parent_element_ui_id}]`);
|
|
11777
11780
|
// let _$elem = $(`[xu-node-id=${parent_element_ui_id}]`);
|
|
11778
|
-
|
|
11779
|
-
const _elem_key = parent_element_ui_id;
|
|
11781
|
+
const _$elem = func.UI.utils.find_in_element_data('xuData', 'body', 'nodeid', parent_element_ui_id);
|
|
11782
|
+
// const _elem_key = parent_element_ui_id;
|
|
11783
|
+
const _elem_key = _$elem.attr('xu-ui-id');
|
|
11780
11784
|
const _elem_val = { attributes: [], $elm: _$elem };
|
|
11781
11785
|
if (!_$elem?.length) continue;
|
|
11782
11786
|
|
|
@@ -11804,44 +11808,44 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11804
11808
|
}
|
|
11805
11809
|
}
|
|
11806
11810
|
|
|
11807
|
-
if (glb.new_xu_render) {
|
|
11808
|
-
|
|
11809
|
-
|
|
11810
|
-
|
|
11811
|
-
|
|
11812
|
-
|
|
11813
|
-
|
|
11814
|
-
|
|
11815
|
-
|
|
11816
|
-
|
|
11817
|
-
|
|
11818
|
-
|
|
11819
|
-
|
|
11820
|
-
|
|
11821
|
-
|
|
11822
|
-
|
|
11823
|
-
|
|
11824
|
-
|
|
11825
|
-
|
|
11826
|
-
|
|
11827
|
-
|
|
11828
|
-
|
|
11829
|
-
|
|
11830
|
-
|
|
11831
|
-
|
|
11832
|
-
|
|
11833
|
-
|
|
11834
|
-
|
|
11835
|
-
|
|
11836
|
-
|
|
11837
|
-
|
|
11838
|
-
|
|
11839
|
-
|
|
11840
|
-
|
|
11841
|
-
|
|
11842
|
-
|
|
11843
|
-
|
|
11844
|
-
}
|
|
11811
|
+
// if (glb.new_xu_render) {
|
|
11812
|
+
// if (attr === 'xu-exp:xu-render') {
|
|
11813
|
+
// //|| attr === 'xu-render'
|
|
11814
|
+
// for await (const [key, val] of Object.entries(_$elem)) {
|
|
11815
|
+
// if (key === 'length') break;
|
|
11816
|
+
// if ($(val).data().xuData.node) {
|
|
11817
|
+
// for await (const node of $(val).data().xuData.node.children) {
|
|
11818
|
+
// if (item.id !== node.id) continue;
|
|
11819
|
+
|
|
11820
|
+
// if (typeof node.xu_render_made !== 'undefined' && !node.xu_render_made) {
|
|
11821
|
+
// const node_data = UI_WORKER_OBJ.xu_render_cache[node.xu_render_xu_ui_id + node.xu_render_cache_id];
|
|
11822
|
+
// parent_element_ui_id;
|
|
11823
|
+
// const elem_key = node.xu_render_xu_ui_id;
|
|
11824
|
+
// const elem_val = { attributes: [attr], $elm: node_data.$div, data: node_data.data };
|
|
11825
|
+
// if (!elem_val.data?.xuData) continue;
|
|
11826
|
+
// elem_val.data.xuData.parent_element_ui_id = $(val).attr('xu-ui-id');
|
|
11827
|
+
// var res = await func.expression.get(SESSION_ID, elem_val.data.xuAttributes['xu-exp:xu-render'], elem_val.data.xuData.paramsP.dsSessionP, 'UI Property EXP', elem_val.data.xuData.recordid);
|
|
11828
|
+
|
|
11829
|
+
// var attr_value = await func.common.get_cast_val(SESSION_ID, 'refresh xu-attributes', 'xu-render', 'bool', res.result);
|
|
11830
|
+
// try {
|
|
11831
|
+
// const obj = {
|
|
11832
|
+
// ui_type: elem_val.data.xuData.ui_type,
|
|
11833
|
+
// SESSION_ID,
|
|
11834
|
+
// elem_key,
|
|
11835
|
+
// elem_val,
|
|
11836
|
+
// fields_arr,
|
|
11837
|
+
// attr_value,
|
|
11838
|
+
// };
|
|
11839
|
+
// func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'execute_xu_render_attributes', obj, new_job, elem_val.$elm, elem_val.data.xuData.paramsP.dsSessionP);
|
|
11840
|
+
// } catch (error) {
|
|
11841
|
+
// debugger;
|
|
11842
|
+
// }
|
|
11843
|
+
// }
|
|
11844
|
+
// }
|
|
11845
|
+
// }
|
|
11846
|
+
// }
|
|
11847
|
+
// }
|
|
11848
|
+
// }
|
|
11845
11849
|
}
|
|
11846
11850
|
}
|
|
11847
11851
|
if (found) break;
|
|
@@ -7833,66 +7833,67 @@ func.UI.utils.get_nodeId = function (SESSION_ID, dsSessionP, ui_idP, $container,
|
|
|
7833
7833
|
return $elm.attr('nodeId');
|
|
7834
7834
|
}
|
|
7835
7835
|
};
|
|
7836
|
-
func.UI.utils.get_element_info = function (SESSION_ID, dsSessionP, ui_idP, $container, is_app_panel, ui_type, functionP) {
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7836
|
+
// func.UI.utils.get_element_info = function (SESSION_ID, dsSessionP, ui_idP, $container, is_app_panel, ui_type, functionP) {
|
|
7837
|
+
// var $elm = func.UI.utils.get_node_elm(SESSION_ID, dsSessionP, ui_idP, $container, is_app_panel, ui_type, functionP);
|
|
7838
|
+
// var ret = {};
|
|
7839
|
+
// if ($elm?.length) {
|
|
7840
|
+
// //length added 20210209
|
|
7841
|
+
// // if (is_app_panel) {
|
|
7842
|
+
// // if ($elm?.data()?.xuData.panel_info) {
|
|
7843
|
+
// // ret.nodeId = $elm.data().xuData.panel_info.prop.id;
|
|
7844
|
+
// // } else {
|
|
7845
|
+
// // ret.nodeId = $elm.data().xuData.properties.id;
|
|
7846
|
+
// // }
|
|
7847
|
+
// // } else {
|
|
7848
|
+
// // ret.nodeId = $elm.data().xuData.nodeId;
|
|
7849
|
+
// ret.nodeId = $elm.data().xuData.xu_id;
|
|
7850
|
+
|
|
7851
|
+
// // ret.nodeId = $elm.attr('xu-ui-id');
|
|
7852
|
+
// // }
|
|
7853
|
+
// }
|
|
7854
|
+
// ret.$elm = $elm;
|
|
7855
|
+
// return ret;
|
|
7856
|
+
// };
|
|
7856
7857
|
func.UI.utils.get_ui_id_count = function (SESSION_ID, dsSessionP, ui_idP, $container) {
|
|
7857
7858
|
return func.UI.utils.get_node_elm(SESSION_ID, dsSessionP, ui_idP, $container, null, null).length;
|
|
7858
7859
|
};
|
|
7859
|
-
func.UI.utils.get_ui_info_tree_scope = function (SESSION_ID, dsP, ui_id, is_app_panel, ui_type, $container, functionP) {
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
|
|
7860
|
+
// func.UI.utils.get_ui_info_tree_scope = function (SESSION_ID, dsP, ui_id, is_app_panel, ui_type, $container, functionP) {
|
|
7861
|
+
// var drill_parent = function () {
|
|
7862
|
+
// if (SESSION_OBJ[SESSION_ID].DS_GLB[dsP].parentDataSourceNo) {
|
|
7863
|
+
// return func.UI.utils.get_ui_info_tree_scope(SESSION_ID, SESSION_OBJ[SESSION_ID].DS_GLB[dsP].parentDataSourceNo, ui_id, is_app_panel, ui_type);
|
|
7864
|
+
// } else if (ui_type === 'xu-app-page') {
|
|
7865
|
+
// if (elm_info.$elm.length) {
|
|
7866
|
+
// return {
|
|
7867
|
+
// ds: dsP,
|
|
7868
|
+
// id: id,
|
|
7869
|
+
// $elm: elm_info.$elm,
|
|
7870
|
+
// };
|
|
7871
|
+
// }
|
|
7872
|
+
// }
|
|
7873
|
+
// };
|
|
7874
|
+
// if (!SESSION_OBJ[SESSION_ID].DS_GLB[dsP]) return;
|
|
7874
7875
|
|
|
7875
|
-
|
|
7876
|
-
|
|
7876
|
+
// var elm_info = func.UI.utils.get_element_info(SESSION_ID, dsP, ui_id, $container, is_app_panel, ui_type, functionP);
|
|
7877
|
+
// var id = elm_info.nodeId;
|
|
7877
7878
|
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
|
|
7893
|
-
|
|
7894
|
-
|
|
7895
|
-
};
|
|
7879
|
+
// if (!id) {
|
|
7880
|
+
// return drill_parent();
|
|
7881
|
+
// } else {
|
|
7882
|
+
// if (is_app_panel) {
|
|
7883
|
+
// return {
|
|
7884
|
+
// ds: func.UI.utils.get_node_elm(SESSION_ID, dsP, ui_id, $container, is_app_panel).data().xuData.paramsP.dsSessionP,
|
|
7885
|
+
// id: id,
|
|
7886
|
+
// $elm: elm_info.$elm,
|
|
7887
|
+
// };
|
|
7888
|
+
// } else {
|
|
7889
|
+
// return {
|
|
7890
|
+
// ds: dsP,
|
|
7891
|
+
// id: id,
|
|
7892
|
+
// $elm: elm_info.$elm,
|
|
7893
|
+
// };
|
|
7894
|
+
// }
|
|
7895
|
+
// }
|
|
7896
|
+
// };
|
|
7896
7897
|
|
|
7897
7898
|
func.UI.utils.clean_node_busy = function (node) {
|
|
7898
7899
|
var run_node = function (node) {
|
|
@@ -7905,34 +7906,34 @@ func.UI.utils.clean_node_busy = function (node) {
|
|
|
7905
7906
|
return node;
|
|
7906
7907
|
};
|
|
7907
7908
|
|
|
7908
|
-
func.UI.utils.get_ui_info_tree_scope_sync = function (SESSION_ID, dsP, ui_id, ui_type, callback, $container, functionP) {
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7909
|
+
// func.UI.utils.get_ui_info_tree_scope_sync = function (SESSION_ID, dsP, ui_id, ui_type, callback, $container, functionP) {
|
|
7910
|
+
// var ret;
|
|
7911
|
+
// var is_app_panel = false;
|
|
7912
|
+
// if (ui_type === 'xu-panel') {
|
|
7913
|
+
// is_app_panel = true;
|
|
7914
|
+
// }
|
|
7914
7915
|
|
|
7915
|
-
|
|
7916
|
+
// ret = func.UI.utils.get_ui_info_tree_scope(SESSION_ID, dsP, ui_id, is_app_panel, ui_type, $container, functionP);
|
|
7916
7917
|
|
|
7917
|
-
|
|
7918
|
-
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
};
|
|
7918
|
+
// if (!ret) {
|
|
7919
|
+
// var attempts = 0;
|
|
7920
|
+
// const run = function () {
|
|
7921
|
+
// ret = func.UI.utils.get_ui_info_tree_scope(SESSION_ID, dsP, ui_id, is_app_panel, ui_type, $container, functionP);
|
|
7922
|
+
// if (ret || attempts > 10) {
|
|
7923
|
+
// callback(ret);
|
|
7924
|
+
// } else {
|
|
7925
|
+
// attempts++;
|
|
7926
|
+
// console.log(attempts, dsP, ui_id, is_app_panel);
|
|
7927
|
+
// setTimeout(function () {
|
|
7928
|
+
// run();
|
|
7929
|
+
// }, 100);
|
|
7930
|
+
// }
|
|
7931
|
+
// };
|
|
7932
|
+
// run();
|
|
7933
|
+
// } else {
|
|
7934
|
+
// callback(ret);
|
|
7935
|
+
// }
|
|
7936
|
+
// };
|
|
7936
7937
|
|
|
7937
7938
|
func.UI.utils.live_preview_element_inspect_on = function (SESSION_ID, service) {
|
|
7938
7939
|
$.each($('[xu-ui-id]'), function (key, val) {
|
|
@@ -8711,12 +8712,12 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
|
8711
8712
|
return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
|
|
8712
8713
|
};
|
|
8713
8714
|
|
|
8714
|
-
var $elm = func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', queue_obj.paramsP.elem_key);
|
|
8715
|
-
|
|
8715
|
+
// var $elm = func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', queue_obj.paramsP.elem_key);
|
|
8716
|
+
var $elm = $(`[xu-ui-id="${queue_obj.paramsP.elem_key}"]`);
|
|
8716
8717
|
|
|
8717
|
-
if (glb.new_xu_render) {
|
|
8718
|
-
|
|
8719
|
-
}
|
|
8718
|
+
// if (glb.new_xu_render) {
|
|
8719
|
+
// $elm = $(`[xu-ui-id="${queue_obj.paramsP.elem_key}"]`);
|
|
8720
|
+
// }
|
|
8720
8721
|
|
|
8721
8722
|
if (!$elm.length) {
|
|
8722
8723
|
return done();
|
|
@@ -9334,7 +9335,9 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9334
9335
|
}
|
|
9335
9336
|
});
|
|
9336
9337
|
|
|
9337
|
-
const selector_id = glb.new_xu_render ? $(this).data()?.xuData?.ui_id : $(this).data()?.xuData?.xu_id;
|
|
9338
|
+
// const selector_id = glb.new_xu_render ? $(this).data()?.xuData?.ui_id : $(this).data()?.xuData?.xu_id;
|
|
9339
|
+
|
|
9340
|
+
const selector_id = $(this).attr('xu-ui-id');
|
|
9338
9341
|
|
|
9339
9342
|
if (attr.length) {
|
|
9340
9343
|
selectors[selector_id] = selectors[selector_id];
|
|
@@ -9492,7 +9495,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9492
9495
|
for (let item of node) {
|
|
9493
9496
|
if (!_.isEmpty(item.attributes)) {
|
|
9494
9497
|
const parent_element_ui_id = node_id;
|
|
9495
|
-
const _$elem = $(`[xu-node-id="${parent_element_ui_id}"]`);
|
|
9498
|
+
// const _$elem = $(`[xu-node-id="${parent_element_ui_id}"]`);
|
|
9496
9499
|
for await (const [attr, val] of Object.entries(item.attributes)) {
|
|
9497
9500
|
if (attr === 'xu-exp:xu-for' || attr === 'xu-for') {
|
|
9498
9501
|
if (val?.includes(field_id)) {
|
|
@@ -9500,8 +9503,9 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9500
9503
|
// debugger;
|
|
9501
9504
|
// let _$elem = $(`[xu-ui-id^=${parent_element_ui_id}]`);
|
|
9502
9505
|
// let _$elem = $(`[xu-node-id=${parent_element_ui_id}]`);
|
|
9503
|
-
|
|
9504
|
-
const _elem_key = parent_element_ui_id;
|
|
9506
|
+
const _$elem = func.UI.utils.find_in_element_data('xuData', 'body', 'nodeid', parent_element_ui_id);
|
|
9507
|
+
// const _elem_key = parent_element_ui_id;
|
|
9508
|
+
const _elem_key = _$elem.attr('xu-ui-id');
|
|
9505
9509
|
const _elem_val = { attributes: [], $elm: _$elem };
|
|
9506
9510
|
if (!_$elem?.length) continue;
|
|
9507
9511
|
|
|
@@ -9529,44 +9533,44 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9529
9533
|
}
|
|
9530
9534
|
}
|
|
9531
9535
|
|
|
9532
|
-
if (glb.new_xu_render) {
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9549
|
-
|
|
9550
|
-
|
|
9551
|
-
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
|
|
9562
|
-
|
|
9563
|
-
|
|
9564
|
-
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
}
|
|
9536
|
+
// if (glb.new_xu_render) {
|
|
9537
|
+
// if (attr === 'xu-exp:xu-render') {
|
|
9538
|
+
// //|| attr === 'xu-render'
|
|
9539
|
+
// for await (const [key, val] of Object.entries(_$elem)) {
|
|
9540
|
+
// if (key === 'length') break;
|
|
9541
|
+
// if ($(val).data().xuData.node) {
|
|
9542
|
+
// for await (const node of $(val).data().xuData.node.children) {
|
|
9543
|
+
// if (item.id !== node.id) continue;
|
|
9544
|
+
|
|
9545
|
+
// if (typeof node.xu_render_made !== 'undefined' && !node.xu_render_made) {
|
|
9546
|
+
// const node_data = UI_WORKER_OBJ.xu_render_cache[node.xu_render_xu_ui_id + node.xu_render_cache_id];
|
|
9547
|
+
// parent_element_ui_id;
|
|
9548
|
+
// const elem_key = node.xu_render_xu_ui_id;
|
|
9549
|
+
// const elem_val = { attributes: [attr], $elm: node_data.$div, data: node_data.data };
|
|
9550
|
+
// if (!elem_val.data?.xuData) continue;
|
|
9551
|
+
// elem_val.data.xuData.parent_element_ui_id = $(val).attr('xu-ui-id');
|
|
9552
|
+
// var res = await func.expression.get(SESSION_ID, elem_val.data.xuAttributes['xu-exp:xu-render'], elem_val.data.xuData.paramsP.dsSessionP, 'UI Property EXP', elem_val.data.xuData.recordid);
|
|
9553
|
+
|
|
9554
|
+
// var attr_value = await func.common.get_cast_val(SESSION_ID, 'refresh xu-attributes', 'xu-render', 'bool', res.result);
|
|
9555
|
+
// try {
|
|
9556
|
+
// const obj = {
|
|
9557
|
+
// ui_type: elem_val.data.xuData.ui_type,
|
|
9558
|
+
// SESSION_ID,
|
|
9559
|
+
// elem_key,
|
|
9560
|
+
// elem_val,
|
|
9561
|
+
// fields_arr,
|
|
9562
|
+
// attr_value,
|
|
9563
|
+
// };
|
|
9564
|
+
// func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'execute_xu_render_attributes', obj, new_job, elem_val.$elm, elem_val.data.xuData.paramsP.dsSessionP);
|
|
9565
|
+
// } catch (error) {
|
|
9566
|
+
// debugger;
|
|
9567
|
+
// }
|
|
9568
|
+
// }
|
|
9569
|
+
// }
|
|
9570
|
+
// }
|
|
9571
|
+
// }
|
|
9572
|
+
// }
|
|
9573
|
+
// }
|
|
9570
9574
|
}
|
|
9571
9575
|
}
|
|
9572
9576
|
if (found) break;
|