mirror of
https://github.com/abap2UI5/abap2UI5.git
synced 2025-04-30 07:16:10 +08:00
Dev (#379)
* fix demo 66 * fix popup close * launchpad adjustments * logging * tile controls * switch property * file uploader * update * update controls * update abaplint
This commit is contained in:
parent
85794ab1b8
commit
447c4ae4a5
|
@ -26,7 +26,7 @@ ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLASS z2ui5_cl_http_handler IMPLEMENTATION.
|
CLASS Z2UI5_CL_HTTP_HANDLER IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD http_get.
|
METHOD http_get.
|
||||||
|
|
|
@ -365,11 +365,13 @@ CLASS z2ui5_lcl_utility IMPLEMENTATION.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
METHOD get_abap_2_json.
|
METHOD get_abap_2_json.
|
||||||
|
|
||||||
IF check_is_boolean( val ).
|
IF check_is_boolean( val ).
|
||||||
result = COND #( WHEN val = abap_true THEN `true` ELSE `false` ).
|
result = COND #( WHEN val = abap_true THEN `true` ELSE `false` ).
|
||||||
ELSE.
|
ELSE.
|
||||||
result = |"{ escape( val = val format = cl_abap_format=>e_json_string ) }"|.
|
result = |"{ escape( val = val format = cl_abap_format=>e_json_string ) }"|.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
METHOD check_is_boolean.
|
METHOD check_is_boolean.
|
||||||
|
|
|
@ -857,15 +857,18 @@ public section.
|
||||||
!UNIT type CLIKE optional
|
!UNIT type CLIKE optional
|
||||||
returning
|
returning
|
||||||
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
||||||
|
|
||||||
methods SWITCH
|
methods SWITCH
|
||||||
importing
|
importing
|
||||||
!STATE type CLIKE optional
|
!STATE type CLIKE optional
|
||||||
!CUSTOMTEXTON type CLIKE optional
|
!CUSTOMTEXTON type CLIKE optional
|
||||||
!CUSTOMTEXTOFF type CLIKE optional
|
!CUSTOMTEXTOFF type CLIKE optional
|
||||||
!ENABLED type CLIKE optional
|
!ENABLED type CLIKE optional
|
||||||
|
!change type CLIKE optional
|
||||||
!TYPE type CLIKE optional
|
!TYPE type CLIKE optional
|
||||||
returning
|
returning
|
||||||
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
||||||
|
|
||||||
methods STEP_INPUT
|
methods STEP_INPUT
|
||||||
importing
|
importing
|
||||||
!VALUE type CLIKE
|
!VALUE type CLIKE
|
||||||
|
@ -931,9 +934,11 @@ public section.
|
||||||
!UPLOAD type CLIKE optional
|
!UPLOAD type CLIKE optional
|
||||||
returning
|
returning
|
||||||
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
||||||
class-methods CC_FILE_UPLOADER_GET_JS
|
|
||||||
|
methods CC_FILE_UPLOADER_GET_JS
|
||||||
returning
|
returning
|
||||||
value(RESULT) type STRING .
|
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
||||||
|
|
||||||
methods XML_GET
|
methods XML_GET
|
||||||
returning
|
returning
|
||||||
value(RESULT) type STRING .
|
value(RESULT) type STRING .
|
||||||
|
@ -1210,6 +1215,7 @@ public section.
|
||||||
!COUNTER type CLIKE optional
|
!COUNTER type CLIKE optional
|
||||||
returning
|
returning
|
||||||
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
||||||
|
|
||||||
methods ICONTABBAR
|
methods ICONTABBAR
|
||||||
importing
|
importing
|
||||||
!CLASS type CLIKE optional
|
!CLASS type CLIKE optional
|
||||||
|
@ -1220,6 +1226,7 @@ public section.
|
||||||
!SELECTEDKEY type CLIKE optional
|
!SELECTEDKEY type CLIKE optional
|
||||||
returning
|
returning
|
||||||
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
||||||
|
|
||||||
methods ICONTABFILTER
|
methods ICONTABFILTER
|
||||||
importing
|
importing
|
||||||
!SHOWALL type ABAP_BOOL optional
|
!SHOWALL type ABAP_BOOL optional
|
||||||
|
@ -1230,6 +1237,7 @@ public section.
|
||||||
!KEY type CLIKE optional
|
!KEY type CLIKE optional
|
||||||
returning
|
returning
|
||||||
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
||||||
|
|
||||||
methods ICONTABSEPARATOR
|
methods ICONTABSEPARATOR
|
||||||
returning
|
returning
|
||||||
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
||||||
|
@ -1250,8 +1258,7 @@ public section.
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
CLASS z2ui5_cl_xml_view IMPLEMENTATION.
|
||||||
CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
|
||||||
|
|
||||||
|
|
||||||
METHOD actions.
|
METHOD actions.
|
||||||
|
@ -1293,6 +1300,36 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD icontabbar.
|
||||||
|
|
||||||
|
result = _generic( name = `IconTabBar`
|
||||||
|
t_prop = VALUE #( ( n = `class` v = class )
|
||||||
|
( n = `select` v = select )
|
||||||
|
( n = `expand` v = expand )
|
||||||
|
( n = `expandable` v = expandable )
|
||||||
|
( n = `expanded` v = expanded )
|
||||||
|
( n = `selectedKey` v = selectedKey ) ) ).
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD icontabfilter.
|
||||||
|
|
||||||
|
result = _generic( name = `IconTabFilter`
|
||||||
|
t_prop = VALUE #( ( n = `icon` v = icon )
|
||||||
|
( n = `iconColor` v = iconColor )
|
||||||
|
( n = `showAll` v = showAll )
|
||||||
|
( n = `count` v = count )
|
||||||
|
( n = `text` v = text )
|
||||||
|
( n = `key` v = key ) ) ).
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD ICONTABSEPARATOR.
|
||||||
|
|
||||||
|
result = _generic( name = `IconTabSeparator` ).
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
METHOD bars.
|
METHOD bars.
|
||||||
result = _generic( name = `bars`
|
result = _generic( name = `bars`
|
||||||
ns = `mchart` ).
|
ns = `mchart` ).
|
||||||
|
@ -1396,7 +1433,8 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD cc_file_uploader_get_js.
|
METHOD cc_file_uploader_get_js.
|
||||||
result = ` jQuery.sap.declare("z2ui5.FileUploader");` && |\n| &&
|
|
||||||
|
DATA(js) = ` jQuery.sap.declare("z2ui5.FileUploader");` && |\n| &&
|
||||||
|\n| &&
|
|\n| &&
|
||||||
` sap.ui.define([` && |\n| &&
|
` sap.ui.define([` && |\n| &&
|
||||||
` "sap/ui/core/Control",` && |\n| &&
|
` "sap/ui/core/Control",` && |\n| &&
|
||||||
|
@ -1502,6 +1540,9 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
||||||
` }` && |\n| &&
|
` }` && |\n| &&
|
||||||
` });` && |\n| &&
|
` });` && |\n| &&
|
||||||
` });`.
|
` });`.
|
||||||
|
|
||||||
|
result = zz_plain( `<html:script>` && js && `</html:script>` ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
@ -1510,14 +1551,15 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
method checkbox.
|
METHOD checkbox.
|
||||||
|
|
||||||
result = me.
|
result = me.
|
||||||
_generic( name = `CheckBox`
|
_generic( name = `CheckBox`
|
||||||
t_prop = value #( ( n = `text` v = text )
|
t_prop = VALUE #( ( n = `text` v = text )
|
||||||
( n = `selected` v = selected )
|
( n = `selected` v = selected )
|
||||||
( n = `enabled` v = lcl_utility=>get_json_boolean( enabled ) )
|
( n = `enabled` v = lcl_utility=>get_json_boolean( enabled ) )
|
||||||
( n = `select` v = select ) ) ).
|
( n = `select` v = select ) ) ).
|
||||||
endmethod.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD code_editor.
|
METHOD code_editor.
|
||||||
|
@ -1534,9 +1576,9 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD column.
|
METHOD column.
|
||||||
result = _generic( name = `Column`
|
result = _generic( name = `Column`
|
||||||
t_prop = VALUE #( ( n = `width` v = width )
|
t_prop = VALUE #( ( n = `width` v = width )
|
||||||
( n = `minScreenWidth` v = minScreenWidth )
|
( n = `minScreenWidth` v = minScreenWidth )
|
||||||
( n = `hAlign` v = hAlign )
|
( n = `halign` v = HALIGN )
|
||||||
( n = `demandPopin` v = Lcl_utility=>get_json_boolean( demandPopin ) ) ) ).
|
( n = `demandPopin` v = Lcl_utility=>get_json_boolean( demandPopin ) ) ) ).
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
@ -1571,6 +1613,8 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
||||||
( n = `xmlns:core` v = `sap.ui.core` )
|
( n = `xmlns:core` v = `sap.ui.core` )
|
||||||
( n = `xmlns:mvc` v = `sap.ui.core.mvc` )
|
( n = `xmlns:mvc` v = `sap.ui.core.mvc` )
|
||||||
( n = `xmlns:layout` v = `sap.ui.layout` )
|
( n = `xmlns:layout` v = `sap.ui.layout` )
|
||||||
|
* ( n = `core:require` v = `{ MessageToast: 'sap/m/MessageToast' }` )
|
||||||
|
* ( n = `core:require` v = `{ URLHelper: 'sap/m/library/URLHelper' }` )
|
||||||
( n = `xmlns:table ` v = `sap.ui.table` )
|
( n = `xmlns:table ` v = `sap.ui.table` )
|
||||||
( n = `xmlns:f` v = `sap.f` )
|
( n = `xmlns:f` v = `sap.f` )
|
||||||
( n = `xmlns:form` v = `sap.ui.layout.form` )
|
( n = `xmlns:form` v = `sap.ui.layout.form` )
|
||||||
|
@ -1928,9 +1972,8 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
||||||
DATA(ls_draft) = mo_root->mi_client->get( )-s_draft.
|
DATA(ls_draft) = mo_root->mi_client->get( )-s_draft.
|
||||||
DATA(ls_config) = mo_root->mi_client->get( )-s_config.
|
DATA(ls_config) = mo_root->mi_client->get( )-s_config.
|
||||||
|
|
||||||
result = ls_config-origin &&
|
result = ls_config-origin && `/sap/bc/adt/oo/classes/`
|
||||||
`/sap/bc/adt/oo/classes/` && lcl_utility=>get_classname_by_ref( ls_draft-app ) &&
|
&& lcl_utility=>get_classname_by_ref( ls_draft-app ) && `/source/main`.
|
||||||
`/source/main`.
|
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
@ -1940,6 +1983,14 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
||||||
DATA(lt_params) = VALUE z2ui5_if_client=>ty_t_name_value( ).
|
DATA(lt_params) = VALUE z2ui5_if_client=>ty_t_name_value( ).
|
||||||
DATA(lv_search) = mi_client->get( )-s_config-search.
|
DATA(lv_search) = mi_client->get( )-s_config-search.
|
||||||
|
|
||||||
|
REPLACE `%3D` IN lv_search WITH `=`.
|
||||||
|
SPLIT lv_search AT `&sap-startup-params=` INTO DATA(lv_search1) DATA(lv_search2).
|
||||||
|
IF lv_search2 IS NOT INITIAL.
|
||||||
|
lv_search = lv_search2.
|
||||||
|
ELSE.
|
||||||
|
lv_search = lv_search1.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
lv_search = lcl_utility=>get_trim_lower( lv_search ).
|
lv_search = lcl_utility=>get_trim_lower( lv_search ).
|
||||||
SHIFT lv_search LEFT DELETING LEADING `?`.
|
SHIFT lv_search LEFT DELETING LEADING `?`.
|
||||||
|
|
||||||
|
@ -1955,6 +2006,21 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
||||||
DATA(lv_val) = lcl_utility=>get_trim_lower( val ).
|
DATA(lv_val) = lcl_utility=>get_trim_lower( val ).
|
||||||
result = VALUE #( lt_params[ n = lv_val ]-v OPTIONAL ).
|
result = VALUE #( lt_params[ n = lv_val ]-v OPTIONAL ).
|
||||||
|
|
||||||
|
* lv_search = lcl_utility=>get_trim_lower( lv_search ).
|
||||||
|
* SHIFT lv_search LEFT DELETING LEADING `?`.
|
||||||
|
*
|
||||||
|
* SPLIT lv_search AT `&` INTO TABLE DATA(lt_param).
|
||||||
|
*
|
||||||
|
* LOOP AT lt_param REFERENCE INTO DATA(lr_param).
|
||||||
|
*
|
||||||
|
* SPLIT lr_param->* AT `=` INTO DATA(lv_name) DATA(lv_value).
|
||||||
|
*
|
||||||
|
* INSERT VALUE #( n = lv_name v = lv_value ) INTO TABLE lt_params.
|
||||||
|
* ENDLOOP.
|
||||||
|
*
|
||||||
|
* DATA(lv_val) = lcl_utility=>get_trim_lower( val ).
|
||||||
|
* result = VALUE #( lt_params[ n = lv_val ]-v OPTIONAL ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
@ -2704,6 +2770,7 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
||||||
t_prop = VALUE #( ( n = `type` v = type )
|
t_prop = VALUE #( ( n = `type` v = type )
|
||||||
( n = `enabled` v = lcl_utility=>get_json_boolean( enabled ) )
|
( n = `enabled` v = lcl_utility=>get_json_boolean( enabled ) )
|
||||||
( n = `state` v = state )
|
( n = `state` v = state )
|
||||||
|
( n = `change` v = change )
|
||||||
( n = `customTextOff` v = customtextoff )
|
( n = `customTextOff` v = customtextoff )
|
||||||
( n = `customTextOn` v = customtexton ) ) ).
|
( n = `customTextOn` v = customtexton ) ) ).
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
@ -2720,19 +2787,19 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
||||||
METHOD table.
|
METHOD table.
|
||||||
result = _generic( name = `Table`
|
result = _generic( name = `Table`
|
||||||
t_prop = VALUE #(
|
t_prop = VALUE #(
|
||||||
( n = `items` v = items )
|
( n = `items` v = items )
|
||||||
( n = `headerText` v = headertext )
|
( n = `headerText` v = headertext )
|
||||||
( n = `growing` v = growing )
|
( n = `growing` v = growing )
|
||||||
( n = `growingThreshold` v = growingthreshold )
|
( n = `growingThreshold` v = growingthreshold )
|
||||||
( n = `growingScrollToLoad` v = growingscrolltoload )
|
( n = `growingScrollToLoad` v = growingscrolltoload )
|
||||||
( n = `sticky` v = sticky )
|
( n = `sticky` v = sticky )
|
||||||
( n = `mode` v = mode )
|
( n = `showSeparators` v = SHOWSEPARATORS )
|
||||||
( n = `width` v = width )
|
( n = `mode` v = mode )
|
||||||
( n = `selectionChange` v = selectionchange )
|
( n = `inset` v = inset )
|
||||||
( n = `showSeparators` v = showSeparators )
|
( n = `width` v = width )
|
||||||
|
( n = `selectionChange` v = selectionchange )
|
||||||
( n = `alternateRowColors` v = lcl_utility=>get_json_boolean( alternateRowColors ) )
|
( n = `alternateRowColors` v = lcl_utility=>get_json_boolean( alternateRowColors ) )
|
||||||
( n = `inset` v = lcl_utility=>get_json_boolean( inset ) )
|
( n = `autoPopinMode` v = lcl_utility=>get_json_boolean( autoPopinMode ) ) ) ).
|
||||||
( n = `autoPopinMode` v = lcl_utility=>get_json_boolean( autoPopinMode ) ) ) ).
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
@ -2768,7 +2835,6 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD tilecontent.
|
METHOD tilecontent.
|
||||||
|
|
||||||
|
|
||||||
result = _generic( name = `TileContent`
|
result = _generic( name = `TileContent`
|
||||||
ns = ``
|
ns = ``
|
||||||
t_prop = VALUE #(
|
t_prop = VALUE #(
|
||||||
|
@ -3084,7 +3150,7 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
||||||
( n = `counter` v = counter )
|
( n = `counter` v = counter )
|
||||||
( n = `selected` v = selected ) ) ).
|
( n = `selected` v = selected ) ) ).
|
||||||
|
|
||||||
endmethod.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD numericcontent.
|
METHOD numericcontent.
|
||||||
|
@ -3099,40 +3165,9 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD imagecontent.
|
METHOD imagecontent.
|
||||||
|
|
||||||
result = _generic( name = `ImageContent`
|
result = _generic( name = `ImageContent`
|
||||||
t_prop = VALUE #( ( n = `src` v = src ) ) ).
|
t_prop = VALUE #( ( n = `src` v = src ) ) ).
|
||||||
|
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD icontabbar.
|
|
||||||
|
|
||||||
result = _generic( name = `IconTabBar`
|
|
||||||
t_prop = VALUE #( ( n = `class` v = class )
|
|
||||||
( n = `select` v = select )
|
|
||||||
( n = `expand` v = expand )
|
|
||||||
( n = `expandable` v = expandable )
|
|
||||||
( n = `expanded` v = expanded )
|
|
||||||
( n = `selectedKey` v = selectedKey ) ) ).
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
|
|
||||||
METHOD icontabfilter.
|
|
||||||
|
|
||||||
result = _generic( name = `IconTabFilter`
|
|
||||||
t_prop = VALUE #( ( n = `icon` v = icon )
|
|
||||||
( n = `iconColor` v = iconColor )
|
|
||||||
( n = `showAll` v = showAll )
|
|
||||||
( n = `count` v = count )
|
|
||||||
( n = `text` v = text )
|
|
||||||
( n = `key` v = key ) ) ).
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
|
|
||||||
METHOD ICONTABSEPARATOR.
|
|
||||||
|
|
||||||
result = _generic( name = `IconTabSeparator` ).
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
Loading…
Reference in New Issue
Block a user