From 188996e41711c1b754fcb645a5ff151070cd60fc Mon Sep 17 00:00:00 2001 From: Marc Bernard <59966492+mbtools@users.noreply.github.com> Date: Wed, 8 Jun 2022 07:54:29 +0200 Subject: [PATCH] UI: Message box improvements (#5616) - Align width of message box to width of abapGit div (instead of full window width) - Don't render "Message (00/001)" for generic messages Closes #5614 --- src/ui/zabapgit_css_common.w3mi.data.css | 8 ++++---- src/ui/zcl_abapgit_gui_chunk_lib.clas.abap | 24 ++++++++++++++-------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/ui/zabapgit_css_common.w3mi.data.css b/src/ui/zabapgit_css_common.w3mi.data.css index 39f9c36d7..0f9341a11 100644 --- a/src/ui/zabapgit_css_common.w3mi.data.css +++ b/src/ui/zabapgit_css_common.w3mi.data.css @@ -900,12 +900,12 @@ div.info-panel div.info-list td { padding-right: 1em } div.message-panel { z-index: 99; box-shadow: 2px 2px 4px 0px hsla(0, 0%, 0%, .1); - padding: 12px; - margin-left: -48%; + padding: 0.5em 1em; position: fixed; bottom: 12px; - width: 94%; - left: 50%; + width: 95%; + margin: 0 auto; + max-width: 1248px; border: 1px solid; border-radius: 5px; diff --git a/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap b/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap index deb0ddb0e..3751bf59e 100644 --- a/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap +++ b/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap @@ -198,7 +198,7 @@ ENDCLASS. -CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION. +CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION. METHOD advanced_submenu. @@ -267,6 +267,11 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION. AND msgnr = iv_msgno AND sprsl = sy-langu. + " Don't return any generic messages like `&1 &2 &3 &4` + IF rv_text CO ' 0123456789&'. + CLEAR rv_text. + ENDIF. + ENDMETHOD. @@ -472,15 +477,16 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION. iv_msgid = ix_error->if_t100_message~t100key-msgid iv_msgno = ix_error->if_t100_message~t100key-msgno ). - lv_text = |Message ({ ix_error->if_t100_message~t100key-msgid }/{ ix_error->if_t100_message~t100key-msgno })|. - - ri_html->add_a( - iv_txt = lv_text - iv_typ = zif_abapgit_html=>c_action_type-sapevent - iv_act = zif_abapgit_definitions=>c_action-goto_message - iv_title = lv_title - iv_id = `a_goto_message` ). + IF lv_title IS NOT INITIAL. + lv_text = |Message ({ ix_error->if_t100_message~t100key-msgid }/{ ix_error->if_t100_message~t100key-msgno })|. + ri_html->add_a( + iv_txt = lv_text + iv_typ = zif_abapgit_html=>c_action_type-sapevent + iv_act = zif_abapgit_definitions=>c_action-goto_message + iv_title = lv_title + iv_id = `a_goto_message` ). + ENDIF. ENDIF. ix_error->get_source_position( IMPORTING program_name = lv_program_name ).