mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
parent
819ac3940a
commit
299ff5d9d5
|
@ -40,16 +40,31 @@ CLASS zcl_abapgit_gui_chunk_lib DEFINITION PUBLIC FINAL CREATE PUBLIC.
|
|||
RAISING zcx_abapgit_exception.
|
||||
|
||||
CLASS-METHODS render_hotkey_overview
|
||||
IMPORTING
|
||||
io_page TYPE REF TO zcl_abapgit_gui_page
|
||||
RETURNING
|
||||
VALUE(ro_html) TYPE REF TO zcl_abapgit_html
|
||||
RAISING
|
||||
zcx_abapgit_exception.
|
||||
|
||||
CLASS-METHODS render_infopanel
|
||||
IMPORTING
|
||||
iv_div_id TYPE string
|
||||
iv_title TYPE string
|
||||
iv_hide TYPE abap_bool DEFAULT abap_true
|
||||
iv_hint TYPE string OPTIONAL
|
||||
io_content TYPE REF TO zcl_abapgit_html
|
||||
RETURNING
|
||||
VALUE(ro_html) TYPE REF TO zcl_abapgit_html
|
||||
RAISING
|
||||
zcx_abapgit_exception.
|
||||
|
||||
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
|
||||
CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
|
||||
CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD render_branch_span.
|
||||
|
@ -100,7 +115,7 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
|
|||
|
||||
METHOD render_hotkey_overview.
|
||||
|
||||
DATA: lv_display TYPE string,
|
||||
DATA: lv_hint TYPE string,
|
||||
lt_hotkeys TYPE zif_abapgit_definitions=>tty_hotkey,
|
||||
lt_actions TYPE zif_abapgit_gui_page_hotkey=>tty_hotkey_action,
|
||||
lo_settings TYPE REF TO zcl_abapgit_settings.
|
||||
|
@ -109,56 +124,82 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
|
|||
<ls_action> LIKE LINE OF lt_actions.
|
||||
|
||||
lo_settings = zcl_abapgit_persist_settings=>get_instance( )->read( ).
|
||||
|
||||
lt_hotkeys = lo_settings->get_hotkeys( ).
|
||||
|
||||
lt_actions = zcl_abapgit_hotkeys=>get_default_hotkeys_from_pages( ).
|
||||
lt_hotkeys = lo_settings->get_hotkeys( ).
|
||||
lt_actions = zcl_abapgit_hotkeys=>get_default_hotkeys_from_pages( io_page ).
|
||||
|
||||
CREATE OBJECT ro_html.
|
||||
|
||||
lv_display = 'display:none'.
|
||||
|
||||
ro_html->add( |<div id="hotkeys" class="news" style="{ lv_display }">| ).
|
||||
|
||||
ro_html->add( '<div class="headbar title">Hotkeys'
|
||||
&& '<div class="float-right">'
|
||||
&& zcl_abapgit_html=>a(
|
||||
iv_txt = '❌'
|
||||
iv_typ = zif_abapgit_definitions=>c_action_type-onclick
|
||||
iv_act = 'closeHotkeyOverview()'
|
||||
iv_class = 'close-btn' )
|
||||
&& '</div></div>' ).
|
||||
|
||||
READ TABLE lt_hotkeys ASSIGNING <ls_hotkey>
|
||||
WITH KEY action = zcl_abapgit_gui_page=>c_global_page_action-showhotkeys.
|
||||
IF sy-subrc = 0.
|
||||
ro_html->add( |<div class="paddings">Close window with '{ <ls_hotkey>-sequence }' |
|
||||
&& |or upper right corner X</div>| ).
|
||||
ENDIF.
|
||||
|
||||
" Generate hotkeys
|
||||
ro_html->add( |<div class="newslist">| ).
|
||||
|
||||
ro_html->add( '<table>' ).
|
||||
|
||||
" Render hotkeys
|
||||
ro_html->add( '<ul class="hotkeys">' ).
|
||||
LOOP AT lt_hotkeys ASSIGNING <ls_hotkey>.
|
||||
|
||||
READ TABLE lt_actions ASSIGNING <ls_action>
|
||||
WITH TABLE KEY action
|
||||
COMPONENTS action = <ls_hotkey>-action.
|
||||
|
||||
IF sy-subrc = 0.
|
||||
ro_html->add( '<tr>' ).
|
||||
ro_html->add( |<td>{ <ls_hotkey>-sequence }</td><td>-</td><td>{ <ls_action>-name }</td>| ).
|
||||
ro_html->add( '</tr>' ).
|
||||
ro_html->add( |<li>|
|
||||
&& |<span class="key-id">{ <ls_hotkey>-sequence }</span>|
|
||||
&& |<span class="key-descr">{ <ls_action>-name }</span>|
|
||||
&& |</li>| ).
|
||||
ENDIF.
|
||||
|
||||
ENDLOOP.
|
||||
ro_html->add( '</ul>' ).
|
||||
|
||||
ro_html->add( '</table>' ).
|
||||
" Wrap
|
||||
READ TABLE lt_hotkeys ASSIGNING <ls_hotkey>
|
||||
WITH KEY action = zcl_abapgit_gui_page=>c_global_page_action-showhotkeys.
|
||||
IF sy-subrc = 0.
|
||||
lv_hint = |Close window with '{ <ls_hotkey>-sequence }' or upper right corner 'X'|.
|
||||
ENDIF.
|
||||
|
||||
ro_html = render_infopanel(
|
||||
iv_div_id = 'hotkeys'
|
||||
iv_title = 'Hotkeys'
|
||||
iv_hint = lv_hint
|
||||
iv_hide = abap_true
|
||||
io_content = ro_html ).
|
||||
|
||||
IF zcl_abapgit_hotkeys=>should_show_hint( ) = abap_true.
|
||||
ro_html->add( |<div id="hotkeys-hint" class="corner-hint">|
|
||||
&& |Press '{ <ls_hotkey>-sequence }' to get keyboard shortcuts list|
|
||||
&& |</div>| ).
|
||||
ENDIF.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD render_infopanel.
|
||||
|
||||
DATA lv_display TYPE string.
|
||||
|
||||
CREATE OBJECT ro_html.
|
||||
|
||||
IF iv_hide = abap_true. " Initially hide
|
||||
lv_display = 'display:none'.
|
||||
ENDIF.
|
||||
|
||||
ro_html->add( |<div id="{ iv_div_id }" class="info-panel" style="{ lv_display }">| ).
|
||||
|
||||
ro_html->add( |<div class="info-title">{ iv_title }|
|
||||
&& '<div class="float-right">'
|
||||
&& zcl_abapgit_html=>a(
|
||||
iv_txt = '❌'
|
||||
iv_typ = zif_abapgit_definitions=>c_action_type-onclick
|
||||
iv_act = |toggleDisplay('{ iv_div_id }')|
|
||||
iv_class = 'close-btn' )
|
||||
&& '</div></div>' ).
|
||||
|
||||
IF iv_hint IS NOT INITIAL.
|
||||
ro_html->add( '<div class="info-hint">'
|
||||
&& zcl_abapgit_html=>icon( iv_name = 'alert' iv_class = 'pad-right' )
|
||||
&& iv_hint
|
||||
&& '</div>' ).
|
||||
ENDIF.
|
||||
|
||||
ro_html->add( |<div class="info-list">| ).
|
||||
ro_html->add( io_content ).
|
||||
ro_html->add( '</div>' ).
|
||||
|
||||
ro_html->add( '</div>' ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
@ -219,7 +260,7 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
|
|||
METHOD render_news.
|
||||
|
||||
DATA: lv_text TYPE string,
|
||||
lv_display TYPE string,
|
||||
lv_hint TYPE string,
|
||||
lt_log TYPE zcl_abapgit_news=>tt_log.
|
||||
|
||||
FIELD-SYMBOLS: <ls_line> LIKE LINE OF lt_log.
|
||||
|
@ -232,30 +273,7 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
|
|||
|
||||
lt_log = io_news->get_log( ).
|
||||
|
||||
IF io_news->has_unseen( ) = abap_false.
|
||||
lv_display = 'display:none'.
|
||||
ENDIF.
|
||||
|
||||
ro_html->add( |<div id="news" class="news" style="{ lv_display }">| ).
|
||||
|
||||
ro_html->add( '<div class="headbar title">Announcement of the latest changes'
|
||||
&& '<div class="float-right">'
|
||||
&& zcl_abapgit_html=>a(
|
||||
iv_txt = '❌'
|
||||
iv_typ = zif_abapgit_definitions=>c_action_type-onclick
|
||||
iv_act = 'displayNews()'
|
||||
iv_class = 'close-btn' )
|
||||
&& '</div></div>' ).
|
||||
|
||||
IF io_news->has_important( ) = abap_true.
|
||||
ro_html->add( '<div class="headbar important">'
|
||||
&& zcl_abapgit_html=>icon( iv_name = 'alert' iv_class = 'pad-right' )
|
||||
&& 'Please note changes marked with "!"'
|
||||
&& '</div>' ).
|
||||
ENDIF.
|
||||
|
||||
" Generate news
|
||||
ro_html->add( |<div class="newslist">| ).
|
||||
" Render news
|
||||
LOOP AT lt_log ASSIGNING <ls_line>.
|
||||
IF <ls_line>-is_header = abap_true.
|
||||
IF <ls_line>-pos_to_cur > 0.
|
||||
|
@ -270,9 +288,18 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
|
|||
ro_html->add( |<li>{ <ls_line>-text }</li>| ).
|
||||
ENDIF.
|
||||
ENDLOOP.
|
||||
ro_html->add( '</div>' ).
|
||||
|
||||
ro_html->add( '</div>' ).
|
||||
" Wrap
|
||||
IF io_news->has_important( ) = abap_true.
|
||||
lv_hint = 'Please note changes marked with "!"'.
|
||||
ENDIF.
|
||||
|
||||
ro_html = render_infopanel(
|
||||
iv_div_id = 'news'
|
||||
iv_title = 'Announcement of the latest changes'
|
||||
iv_hint = lv_hint
|
||||
iv_hide = boolc( io_news->has_unseen( ) = abap_false )
|
||||
io_content = ro_html ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
@ -320,7 +347,7 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
|
|||
ELSE.
|
||||
lv_icon = 'arrow-up/grey80'.
|
||||
ENDIF.
|
||||
ro_html->add_a( iv_act = 'displayNews()'
|
||||
ro_html->add_a( iv_act = |toggleDisplay('news')|
|
||||
iv_typ = zif_abapgit_definitions=>c_action_type-onclick
|
||||
iv_txt = zcl_abapgit_html=>icon( iv_name = lv_icon
|
||||
iv_class = 'pad-sides'
|
||||
|
|
|
@ -153,7 +153,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE IMPLEMENTATION.
|
|||
|
||||
DATA: ls_hotkey_action LIKE LINE OF rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Global: Show hotkeys|.
|
||||
ls_hotkey_action-name = |Show hotkeys help|.
|
||||
ls_hotkey_action-action = c_global_page_action-showhotkeys.
|
||||
ls_hotkey_action-default_hotkey = |?|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
@ -221,8 +221,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE IMPLEMENTATION.
|
|||
|
||||
METHOD render_hotkey_overview.
|
||||
|
||||
CREATE OBJECT ro_html.
|
||||
ro_html->add( zcl_abapgit_gui_chunk_lib=>render_hotkey_overview( ) ).
|
||||
ro_html = zcl_abapgit_gui_chunk_lib=>render_hotkey_overview( me ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
|
|
@ -173,12 +173,12 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_CODE_INSP IMPLEMENTATION.
|
|||
|
||||
DATA: ls_hotkey_action LIKE LINE OF rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Code Inspector: Stage|.
|
||||
ls_hotkey_action-name = |Stage|.
|
||||
ls_hotkey_action-action = c_actions-stage.
|
||||
ls_hotkey_action-default_hotkey = |s|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Code Inspector: Re-Run|.
|
||||
ls_hotkey_action-name = |Re-Run|.
|
||||
ls_hotkey_action-action = c_actions-rerun.
|
||||
ls_hotkey_action-default_hotkey = |r|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
|
|
@ -1041,7 +1041,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_DIFF IMPLEMENTATION.
|
|||
|
||||
DATA: ls_hotkey_action LIKE LINE OF rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Diff: Stage|.
|
||||
ls_hotkey_action-name = |Stage changes|.
|
||||
ls_hotkey_action-action = |stagePatch|.
|
||||
ls_hotkey_action-default_hotkey = |s|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
|
|
@ -44,7 +44,7 @@ ENDCLASS.
|
|||
|
||||
|
||||
|
||||
CLASS zcl_abapgit_gui_page_main IMPLEMENTATION.
|
||||
CLASS ZCL_ABAPGIT_GUI_PAGE_MAIN IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD build_main_menu.
|
||||
|
@ -307,6 +307,58 @@ CLASS zcl_abapgit_gui_page_main IMPLEMENTATION.
|
|||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD zif_abapgit_gui_page_hotkey~get_hotkey_actions.
|
||||
|
||||
DATA: ls_hotkey_action TYPE zif_abapgit_gui_page_hotkey=>ty_hotkey_action.
|
||||
|
||||
ls_hotkey_action-name = |abapGit settings|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-go_settings.
|
||||
ls_hotkey_action-default_hotkey = |x|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Stage changes|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-go_stage.
|
||||
ls_hotkey_action-default_hotkey = |s|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Switch branch|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-git_branch_switch.
|
||||
ls_hotkey_action-default_hotkey = |b|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Installed repo list|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-go_repo_overview.
|
||||
ls_hotkey_action-default_hotkey = |o|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Refresh repository|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-repo_refresh.
|
||||
ls_hotkey_action-default_hotkey = |r|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Pull|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-git_pull.
|
||||
ls_hotkey_action-default_hotkey = |p|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Add online repository|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-repo_newonline.
|
||||
ls_hotkey_action-default_hotkey = |n|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Uninstall repository|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-repo_purge.
|
||||
ls_hotkey_action-default_hotkey = |u|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Show diffs|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-go_diff.
|
||||
ls_hotkey_action-default_hotkey = |d|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD zif_abapgit_gui_page~on_event.
|
||||
|
||||
DATA: lv_key TYPE zif_abapgit_persistence=>ty_repo-key,
|
||||
|
@ -362,57 +414,4 @@ CLASS zcl_abapgit_gui_page_main IMPLEMENTATION.
|
|||
ENDCASE.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD zif_abapgit_gui_page_hotkey~get_hotkey_actions.
|
||||
|
||||
DATA: ls_hotkey_action TYPE zif_abapgit_gui_page_hotkey=>ty_hotkey_action.
|
||||
|
||||
ls_hotkey_action-name = |Main: Settings|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-go_settings.
|
||||
ls_hotkey_action-default_hotkey = |x|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Main: Stage|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-go_stage.
|
||||
ls_hotkey_action-default_hotkey = |s|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Main: Switch branch|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-git_branch_switch.
|
||||
ls_hotkey_action-default_hotkey = |b|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Main: Repo overview|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-go_repo_overview.
|
||||
ls_hotkey_action-default_hotkey = |o|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Main: Refresh|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-repo_refresh.
|
||||
ls_hotkey_action-default_hotkey = |r|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Main: Pull|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-git_pull.
|
||||
ls_hotkey_action-default_hotkey = |p|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Main: + Online|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-repo_newonline.
|
||||
ls_hotkey_action-default_hotkey = |n|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Main: Uninstall|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-repo_purge.
|
||||
ls_hotkey_action-default_hotkey = |u|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-name = |Main: Show diff|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-go_diff.
|
||||
ls_hotkey_action-default_hotkey = |d|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
ENDCLASS.
|
||||
|
|
|
@ -487,7 +487,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_STAGE IMPLEMENTATION.
|
|||
|
||||
DATA: ls_hotkey_action TYPE zif_abapgit_gui_page_hotkey=>ty_hotkey_action.
|
||||
|
||||
ls_hotkey_action-name = |Stage: Patch|.
|
||||
ls_hotkey_action-name = |Patch|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-go_patch.
|
||||
ls_hotkey_action-default_hotkey = |p|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
|
|
@ -6,6 +6,8 @@ CLASS zcl_abapgit_hotkeys DEFINITION
|
|||
PUBLIC SECTION.
|
||||
CLASS-METHODS:
|
||||
get_default_hotkeys_from_pages
|
||||
IMPORTING
|
||||
io_page TYPE REF TO zcl_abapgit_gui_page OPTIONAL
|
||||
RETURNING
|
||||
VALUE(rt_hotkey_actions) TYPE zif_abapgit_gui_page_hotkey=>tty_hotkey_action
|
||||
RAISING
|
||||
|
@ -19,16 +21,25 @@ CLASS zcl_abapgit_hotkeys DEFINITION
|
|||
RAISING
|
||||
zcx_abapgit_exception.
|
||||
|
||||
CLASS-METHODS should_show_hint
|
||||
RETURNING
|
||||
VALUE(rv_yes) TYPE abap_bool.
|
||||
|
||||
PRIVATE SECTION.
|
||||
CLASS-DATA gv_hint_was_shown TYPE abap_bool.
|
||||
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
|
||||
CLASS zcl_abapgit_hotkeys IMPLEMENTATION.
|
||||
CLASS ZCL_ABAPGIT_HOTKEYS IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD get_default_hotkeys_from_pages.
|
||||
|
||||
DATA: lt_hotkey_actions TYPE zif_abapgit_gui_page_hotkey=>tty_hotkey_action,
|
||||
lo_interface TYPE REF TO cl_oo_interface,
|
||||
lv_class_name TYPE abap_abstypename,
|
||||
lt_classes TYPE seo_relkeys.
|
||||
|
||||
FIELD-SYMBOLS: <ls_class> TYPE seorelkey.
|
||||
|
@ -42,8 +53,13 @@ CLASS zcl_abapgit_hotkeys IMPLEMENTATION.
|
|||
ENDTRY.
|
||||
|
||||
lt_classes = lo_interface->get_implementing_classes( ).
|
||||
IF io_page IS BOUND.
|
||||
lv_class_name = cl_abap_classdescr=>get_class_name( io_page ).
|
||||
SHIFT lv_class_name LEFT DELETING LEADING '\CLASS='.
|
||||
ENDIF.
|
||||
|
||||
LOOP AT lt_classes ASSIGNING <ls_class>.
|
||||
CHECK lv_class_name IS INITIAL OR lv_class_name = <ls_class>-clsname.
|
||||
|
||||
CALL METHOD (<ls_class>-clsname)=>zif_abapgit_gui_page_hotkey~get_hotkey_actions
|
||||
RECEIVING
|
||||
|
@ -108,4 +124,11 @@ CLASS zcl_abapgit_hotkeys IMPLEMENTATION.
|
|||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD should_show_hint.
|
||||
IF gv_hint_was_shown = abap_false.
|
||||
rv_yes = abap_true.
|
||||
gv_hint_was_shown = abap_true.
|
||||
ENDIF.
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
|
|
|
@ -791,7 +791,7 @@ div.tutorial h2 {
|
|||
|
||||
/* News Announcement */
|
||||
|
||||
div.news {
|
||||
div.info-panel {
|
||||
position: absolute;
|
||||
z-index: 99;
|
||||
top: 36px;
|
||||
|
@ -802,18 +802,24 @@ div.news {
|
|||
box-shadow: 1px 1px 3px 2px #dcdcdc;
|
||||
}
|
||||
|
||||
div.news div.headbar {
|
||||
div.info-panel div.info-hint {
|
||||
text-transform: uppercase;
|
||||
font-size: small;
|
||||
padding: 4px 6px;
|
||||
padding: 8px 6px 0px;
|
||||
text-align: center;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
div.news div.title {
|
||||
div.info-panel div.info-title {
|
||||
text-transform: uppercase;
|
||||
font-size: small;
|
||||
padding: 6px;
|
||||
text-align: center;
|
||||
color: #f8f8f8;
|
||||
background-color: #888;
|
||||
}
|
||||
|
||||
div.news div.title a.close-btn {
|
||||
div.info-panel div.info-title a.close-btn {
|
||||
color: #d8d8d8;
|
||||
padding-left: 12px;
|
||||
padding-right: 2px;
|
||||
|
@ -821,19 +827,18 @@ div.news div.title a.close-btn {
|
|||
bottom: 1px;
|
||||
}
|
||||
|
||||
div.news div.important { color: #aaa; }
|
||||
div.news div.newslist {
|
||||
padding: 0.5em 0.7em;
|
||||
div.info-panel div.info-list {
|
||||
padding: 0.8em 0.7em 1em;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
div.news li {
|
||||
div.info-panel li {
|
||||
padding-left: 10px;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
div.news h1:first-child { margin: auto; }
|
||||
div.news h1 {
|
||||
div.info-panel h1:first-child { margin: auto; }
|
||||
div.info-panel h1 {
|
||||
font-size: inherit;
|
||||
padding: 6px 4px;
|
||||
margin: 4px auto auto;
|
||||
|
@ -841,7 +846,7 @@ div.news h1 {
|
|||
font-weight: normal;
|
||||
}
|
||||
|
||||
div.news .version-marker {
|
||||
div.info-panel .version-marker {
|
||||
color: white;
|
||||
display: inline-block;
|
||||
margin-left: 20px;
|
||||
|
@ -851,12 +856,12 @@ div.news .version-marker {
|
|||
background-color: #ccc;
|
||||
}
|
||||
|
||||
div.news .update {
|
||||
div.info-panel .update {
|
||||
border: #e8ba30 1px solid;
|
||||
background-color: #f5c538;
|
||||
}
|
||||
|
||||
.newslist td {
|
||||
div.info-panel div.info-list td {
|
||||
padding-right: 1em
|
||||
}
|
||||
|
||||
|
@ -899,4 +904,42 @@ div.news .update {
|
|||
/* diff-patch */
|
||||
.patch-active {
|
||||
color: lightgrey !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* HOTKEYS */
|
||||
|
||||
ul.hotkeys {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
ul.hotkeys span.key-id {
|
||||
background: #f0f0f0;
|
||||
border: 1px solid #dcdcdc;
|
||||
border-radius: 3px;
|
||||
padding: 1px 7px;
|
||||
width: 0.5em;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
margin-top: 0.2em;
|
||||
}
|
||||
|
||||
ul.hotkeys span.key-descr {
|
||||
margin-left: 1.2em;
|
||||
}
|
||||
|
||||
div.corner-hint {
|
||||
position: fixed;
|
||||
bottom: 10px;
|
||||
right: 10px;
|
||||
color: #aaa;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 3px;
|
||||
padding: 4px;
|
||||
font-size: smaller;
|
||||
opacity: 0.5;
|
||||
background: white;
|
||||
z-index: 99;
|
||||
}
|
||||
|
|
|
@ -576,15 +576,9 @@ DiffHelper.prototype.highlightButton = function(state) {
|
|||
**********************************************************/
|
||||
|
||||
// News announcement
|
||||
function displayNews() {
|
||||
var div = document.getElementById("news");
|
||||
div.style.display = (div.style.display) ? '' : 'none';
|
||||
}
|
||||
|
||||
// Hotkey Overview
|
||||
function closeHotkeyOverview() {
|
||||
var div = document.getElementById("hotkeys");
|
||||
div.style.display = (div.style.display) ? '' : 'none';
|
||||
function toggleDisplay(divId) {
|
||||
var div = document.getElementById(divId);
|
||||
if (div) div.style.display = (div.style.display) ? '' : 'none';
|
||||
}
|
||||
|
||||
function KeyNavigation() {
|
||||
|
@ -945,7 +939,11 @@ function setKeyBindings(oKeyMap){
|
|||
var oHotkeys = new Hotkeys(oKeyMap);
|
||||
|
||||
document.addEventListener('keypress', oHotkeys.onkeydown.bind(oHotkeys));
|
||||
|
||||
setTimeout(function(){
|
||||
var div = document.getElementById("hotkeys-hint");
|
||||
if (div) div.style.opacity = 0.2;
|
||||
}, 4900);
|
||||
setTimeout(function(){ toggleDisplay("hotkeys-hint") }, 5000);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue
Block a user