Skip to content

Commit

Permalink
fix namespaces (abap2UI5#1415)
Browse files Browse the repository at this point in the history
  • Loading branch information
oblomov-dev authored Sep 11, 2024
1 parent 5c4e135 commit 83fcc96
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 25 deletions.
12 changes: 5 additions & 7 deletions src/01/02/z2ui5_cl_core_http_get2.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ CLASS z2ui5_cl_core_http_get2 IMPLEMENTATION.
METHOD get_default_t_param.

result = VALUE #(
( n = `TITLE` v = `abap2UI5` )
( n = `BODY_CLASS` v = `sapUiBody sapUiSizeCompact` )
( n = `CONTENT_SECURITY_POLICY` v = get_default_security_policy( ) )
( n = `JSON_MODEL_LIMIT` v = `100` )
( n = `TITLE` v = `abap2UI5` )
( n = `BODY_CLASS` v = `sapUiBody sapUiSizeCompact` )
( n = `CONTENT_SECURITY_POLICY` v = get_default_security_policy( ) )
).

LOOP AT ms_request-t_param REFERENCE INTO DATA(lr_input).
Expand Down Expand Up @@ -148,13 +147,12 @@ CLASS z2ui5_cl_core_http_get2 IMPLEMENTATION.
| <div data-sap-ui-component data-height="100%" data-id="container" ></div> \n| &&
|<abc/> \n|.

DATA(lv_add_js) = get_js_cc_startup( ) && ms_request-custom_js.
DATA(lv_add_js) = get_js_cc_startup( ) && ms_request-add_js.

mv_response = mv_response &&
| <script> sap.z2ui5 = sap.z2ui5 \|\| \{\} ; if ( typeof z2ui5 == "undefined" ) \{ var z2ui5 = \{\}; \}; \n| &&
| { get_js( ) } \n| &&
| { lv_add_js } \n| &&
| sap.z2ui5.JSON_MODEL_LIMIT = { lt_param[ n = 'JSON_MODEL_LIMIT' ]-v };|.
| { lv_add_js } \n|.

mv_response = mv_response && z2ui5_cl_cc_debug_tool=>get_js( ) && `</script><abc/></body></html>`.

Expand Down
14 changes: 2 additions & 12 deletions src/01/04/z2ui5_cl_cc_focus.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ CLASS z2ui5_cl_cc_focus IMPLEMENTATION.
` "sap/ui/core/Control",` && |\n| &&
`], (Control) => {` && |\n| &&
` "use strict";` && |\n| &&
|\n| &&
` return Control.extend("z2ui5.Focus", {` && |\n| &&
` metadata: {` && |\n| &&
` properties: {` && |\n| &&
Expand All @@ -34,34 +33,25 @@ CLASS z2ui5_cl_cc_focus IMPLEMENTATION.
` selectionEnd: { type: "string", defaultValue: "0" },` && |\n| &&
` }` && |\n| &&
` },` && |\n| &&
|\n| &&
` init() {` && |\n| &&
` },` && |\n| &&
` setFocusId(val) {` && |\n| &&
` // if ( sap.z2ui5.oView ){ ` && |\n| &&
` try{ this.setProperty("focusId", val); ` && |\n| &&
` try{ ` && |\n| &&
` this.setProperty("focusId", val); ` && |\n| &&
` var oElement = sap.z2ui5.oView.byId(val);` && |\n| &&
` var oFocus = oElement.getFocusInfo();` && |\n| &&
` // oFocus.selectionStart = parseInt(oControl.getProperty("selectionStart"));` && |\n| &&
` // oFocus.selectionEnd = parseInt(oControl.getProperty("selectionEnd"));` && |\n| &&
` oElement.applyFocusInfo(oFocus); } catch (e) {}` && |\n| &&
` },` && |\n| &&
|\n| &&
` renderer(oRm, oControl) {` && |\n| &&
|\n| &&
` if (!oControl.getProperty("setUpdate")){ return; }` && |\n| &&
` oControl.setProperty("setUpdate", false);` && |\n| &&
|\n| &&
` setTimeout((oControl) => {` && |\n| &&
|\n| &&
` var oElement = sap.z2ui5.oView.byId(oControl.getProperty("focusId"));` && |\n| &&
` var oFocus = oElement.getFocusInfo();` && |\n| &&
` oFocus.selectionStart = parseInt(oControl.getProperty("selectionStart"));` && |\n| &&
` oFocus.selectionEnd = parseInt(oControl.getProperty("selectionEnd"));` && |\n| &&
` oElement.applyFocusInfo(oFocus);` && |\n| &&
|\n| &&
` }, 100, oControl);` && |\n| &&
|\n| &&
` }` && |\n| &&
` });` && |\n| &&
`}); }`.
Expand Down
6 changes: 3 additions & 3 deletions src/02/z2ui5_cl_xml_view.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -9697,9 +9697,9 @@ CLASS z2ui5_cl_xml_view IMPLEMENTATION.
( n = `table` v = `sap.ui.table` )
( n = `template` v = `http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1` )
( n = `customData` v = `http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1` )
( n = `xmlns:f` v = `sap.f` )
( n = `xmlns:columnmenu` v = `sap.m.table.columnmenu` )
( n = `xmlns:card` v = `sap.f.cards` )
( n = `f` v = `sap.f` )
( n = `columnmenu` v = `sap.m.table.columnmenu` )
( n = `card` v = `sap.f.cards` )
( n = `form` v = `sap.ui.layout.form` )
( n = `editor` v = `sap.ui.codeeditor` )
( n = `mchart` v = `sap.suite.ui.microchart` )
Expand Down
6 changes: 3 additions & 3 deletions src/02/z2ui5_if_types.intf.abap
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ INTERFACE z2ui5_if_types

TYPES:
BEGIN OF ty_s_http_request_get2,
t_option TYPE ty_t_name_value,
t_param TYPE ty_t_name_value,
custom_js TYPE string,
t_option TYPE ty_t_name_value,
t_param TYPE ty_t_name_value,
add_js TYPE string,
END OF ty_s_http_request_get2.

TYPES:
Expand Down

0 comments on commit 83fcc96

Please sign in to comment.