diff --git a/src/zabapgit_css_common.w3mi.data.css b/src/zabapgit_css_common.w3mi.data.css index 5a8ee5538..2528aa62f 100644 --- a/src/zabapgit_css_common.w3mi.data.css +++ b/src/zabapgit_css_common.w3mi.data.css @@ -37,6 +37,8 @@ form input:focus, textarea:focus { .grey { color: lightgrey !important; } .darkgrey { color: #808080 !important; } .attention { color: red !important; } +.error { color: #d41919 !important; } +.warning { color: #e4ae0d !important; } .blue { color: #5e8dc9 !important; } .red { color: red !important; } @@ -105,6 +107,19 @@ span.page_title { padding-left: 0.4em; } +/* ERROR LOG */ + +div.log { + padding: 6px; + margin: 4px; + background-color: #fee6e6; + border: 1px #fdcece solid; + border-radius: 4px; +} + +div.log > span { display:block; } +div.log .octicon { padding-right: 6px; } + /* MENU */ div.menu { display: inline; } div.menu .menu_end { border-right: 0px !important; } diff --git a/src/zabapgit_css_common.w3mi.xml b/src/zabapgit_css_common.w3mi.xml index 7f7372fc2..cbea95037 100644 --- a/src/zabapgit_css_common.w3mi.xml +++ b/src/zabapgit_css_common.w3mi.xml @@ -3,7 +3,7 @@ ZABAPGIT_CSS_COMMON - + Abapgit common CSS MI @@ -15,7 +15,7 @@ MI ZABAPGIT_CSS_COMMON filename - ~wwwtmp.css + common.css MI diff --git a/src/zabapgit_definitions.prog.abap b/src/zabapgit_definitions.prog.abap index 478591319..30a6e3e40 100644 --- a/src/zabapgit_definitions.prog.abap +++ b/src/zabapgit_definitions.prog.abap @@ -227,6 +227,7 @@ CONSTANTS: BEGIN OF gc_action, go_debuginfo TYPE string VALUE 'go_debuginfo', go_settings TYPE string VALUE 'go_settings', go_tutorial TYPE string VALUE 'go_tutorial', + jump TYPE string VALUE 'jump', jump_pkg TYPE string VALUE 'jump_pkg', END OF gc_action. diff --git a/src/zabapgit_gui_router.prog.abap b/src/zabapgit_gui_router.prog.abap index c70393e4a..d910693cb 100644 --- a/src/zabapgit_gui_router.prog.abap +++ b/src/zabapgit_gui_router.prog.abap @@ -35,8 +35,8 @@ CLASS lcl_gui_router DEFINITION FINAL. RAISING lcx_exception. METHODS get_page_stage - IMPORTING iv_key TYPE lcl_persistence_repo=>ty_repo-key - RETURNING VALUE(ri_page) TYPE REF TO lif_gui_page + IMPORTING iv_key TYPE lcl_persistence_repo=>ty_repo-key + RETURNING VALUE(ri_page) TYPE REF TO lif_gui_page RAISING lcx_exception. METHODS get_page_db_by_name @@ -310,7 +310,7 @@ CLASS lcl_gui_router IMPLEMENTATION. CREATE OBJECT lo_stage_page EXPORTING - io_repo = lo_repo. + io_repo = lo_repo. ri_page = lo_stage_page. diff --git a/src/zabapgit_page_stage.prog.abap b/src/zabapgit_page_stage.prog.abap index 9de53d4d6..576a0057a 100644 --- a/src/zabapgit_page_stage.prog.abap +++ b/src/zabapgit_page_stage.prog.abap @@ -12,7 +12,8 @@ CLASS lcl_gui_page_stage DEFINITION FINAL INHERITING FROM lcl_gui_page. METHODS: constructor - IMPORTING io_repo TYPE REF TO lcl_repo_online + IMPORTING + io_repo TYPE REF TO lcl_repo_online RAISING lcx_exception, lif_gui_page~on_event REDEFINITION. diff --git a/src/zabapgit_stage_logic.prog.abap b/src/zabapgit_stage_logic.prog.abap index 20266e33d..14e05763d 100644 --- a/src/zabapgit_stage_logic.prog.abap +++ b/src/zabapgit_stage_logic.prog.abap @@ -30,11 +30,13 @@ ENDCLASS. CLASS lcl_stage_logic IMPLEMENTATION. METHOD get. + rs_files-local = io_repo->get_files_local( ). rs_files-remote = io_repo->get_files_remote( ). remove_identical( CHANGING cs_files = rs_files ). - remove_ignored( EXPORTING io_repo = io_repo - CHANGING cs_files = rs_files ). + remove_ignored( EXPORTING io_repo = io_repo + CHANGING cs_files = rs_files ). + ENDMETHOD. METHOD count. @@ -58,10 +60,14 @@ CLASS lcl_stage_logic IMPLEMENTATION. lv_index = sy-tabix. IF io_repo->get_dot_abapgit( )->is_ignored( - iv_path = -path + iv_path = -path iv_filename = -filename ) = abap_true. DELETE cs_files-remote INDEX lv_index. + ELSEIF -path = gc_root_dir AND -filename = gc_dot_abapgit. + " Remove .abapgit from remotes - it cannot be removed or ignored + DELETE cs_files-remote INDEX lv_index. ENDIF. + ENDLOOP. ENDMETHOD. diff --git a/src/zabapgit_util.prog.abap b/src/zabapgit_util.prog.abap index de87acd11..55a455651 100644 --- a/src/zabapgit_util.prog.abap +++ b/src/zabapgit_util.prog.abap @@ -1069,16 +1069,14 @@ CLASS lcl_log IMPLEMENTATION. RETURN. ENDIF. - ro_html->add( '
' ). LOOP AT mt_log ASSIGNING . - CONCATENATE -msgv1 - -msgv2 - -msgv3 - -msgv4 INTO lv_string SEPARATED BY space. + CONCATENATE -msgv1 -msgv2 -msgv3 -msgv4 + INTO lv_string SEPARATED BY space. + ro_html->add( '' ). + ro_html->add_icon( iv_name = 'alert' iv_class = 'error' ). " warning CSS exists too ro_html->add( lv_string ). - ro_html->add( '
' ). + ro_html->add( '
' ). ENDLOOP. - ro_html->add( '
' ). ENDMETHOD. diff --git a/src/zabapgit_view_repo.prog.abap b/src/zabapgit_view_repo.prog.abap index cba7161f1..2a4a128be 100644 --- a/src/zabapgit_view_repo.prog.abap +++ b/src/zabapgit_view_repo.prog.abap @@ -146,7 +146,7 @@ CLASS lcl_gui_view_repo_content IMPLEMENTATION. lo_log = lo_browser->get_log( ). IF mo_repo->is_offline( ) = abap_false AND lo_log->count( ) > 0. - ro_html->add( '
' ). + ro_html->add( '
' ). ro_html->add( lo_log->to_html( ) ). " shows eg. list of unsupported objects ro_html->add( '
' ). ENDIF. @@ -278,6 +278,10 @@ CLASS lcl_gui_view_repo_content IMPLEMENTATION. iv_act = |{ gc_action-repo_remote_change }?{ lv_key }| ). lo_tb_advanced->add( iv_txt = 'Make off-line' iv_act = |{ gc_action-repo_remote_detach }?{ lv_key }| ). + IF iv_rstate IS INITIAL AND iv_lstate IS INITIAL. + lo_tb_advanced->add( iv_txt = 'Force stage' + iv_act = |{ gc_action-go_stage }?{ lv_key }| ). + ENDIF. ELSE. lo_tb_advanced->add( iv_txt = 'Make on-line' iv_act = |{ gc_action-repo_remote_attach }?{ lv_key }| ).