From 48bb8be7372c9b402fc6aec880fe7044e999dbad Mon Sep 17 00:00:00 2001 From: sbcgua Date: Tue, 27 Nov 2018 11:11:51 +0200 Subject: [PATCH] hotkeys in fixed position --- src/ui/zcl_abapgit_gui_chunk_lib.clas.abap | 20 ++++++++++++++------ src/zabapgit_css_common.w3mi.data.css | 5 +++++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap b/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap index b8aa3e6cc..198a5a855 100644 --- a/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap +++ b/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap @@ -53,6 +53,7 @@ CLASS zcl_abapgit_gui_chunk_lib DEFINITION PUBLIC FINAL CREATE PUBLIC. iv_title TYPE string iv_hide TYPE abap_bool DEFAULT abap_true iv_hint TYPE string OPTIONAL + iv_scrollable TYPE abap_bool DEFAULT abap_true io_content TYPE REF TO zcl_abapgit_html RETURNING VALUE(ro_html) TYPE REF TO zcl_abapgit_html @@ -156,11 +157,12 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION. ENDIF. ro_html = render_infopanel( - iv_div_id = 'hotkeys' - iv_title = 'Hotkeys' - iv_hint = lv_hint - iv_hide = abap_true - io_content = ro_html ). + iv_div_id = 'hotkeys' + iv_title = 'Hotkeys' + iv_hint = lv_hint + iv_hide = abap_true + iv_scrollable = abap_false + io_content = ro_html ). IF IS ASSIGNED AND zcl_abapgit_hotkeys=>should_show_hint( ) = abap_true. ro_html->add( |
| @@ -174,6 +176,7 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION. METHOD render_infopanel. DATA lv_display TYPE string. + DATA lv_class TYPE string. CREATE OBJECT ro_html. @@ -181,7 +184,12 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION. lv_display = 'display:none'. ENDIF. - ro_html->add( |
| ). + lv_class = 'info-panel'. + IF iv_scrollable = abap_false. " Initially hide + lv_class = lv_class && ' info-panel-fixed'. + ENDIF. + + ro_html->add( |
| ). ro_html->add( |
{ iv_title }| && '
' diff --git a/src/zabapgit_css_common.w3mi.data.css b/src/zabapgit_css_common.w3mi.data.css index a71fc664d..1950c55f4 100644 --- a/src/zabapgit_css_common.w3mi.data.css +++ b/src/zabapgit_css_common.w3mi.data.css @@ -806,6 +806,11 @@ div.info-panel { box-shadow: 1px 1px 3px 2px #dcdcdc; } +div.info-panel-fixed { + position: fixed; + top: 15%; +} + div.info-panel div.info-hint { text-transform: uppercase; font-size: small;