Skip to content

Commit

Permalink
Open links to website in new browser window
Browse files Browse the repository at this point in the history
Links to marcbernardtools.com are now opened in a new browser window.
  • Loading branch information
mbtools committed Dec 11, 2023
1 parent 15c22e5 commit c7a068f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/core/#mbtools#if_actions.intf.abap
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ INTERFACE /mbtools/if_actions
CONSTANTS go_faq TYPE string VALUE 'go_faq' ##NO_TEXT.
CONSTANTS go_about TYPE string VALUE 'go_about' ##NO_TEXT.
" Internet
CONSTANTS url TYPE string VALUE 'url' ##NO_TEXT.
CONSTANTS url TYPE string VALUE 'url?url=' ##NO_TEXT.
CONSTANTS mbt_portfolio TYPE string VALUE 'mbt_portfolio' ##NO_TEXT.
CONSTANTS mbt_docs TYPE string VALUE 'mbt_docs' ##NO_TEXT.
CONSTANTS mbt_support TYPE string VALUE 'mbt_support' ##NO_TEXT.
CONSTANTS mbt_license TYPE string VALUE 'mbt_license' ##NO_TEXT.
CONSTANTS mbt_website TYPE string VALUE 'mbt_website' ##NO_TEXT.
" Objects
CONSTANTS show_object TYPE string VALUE 'show_object' ##NO_TEXT.
Expand Down
6 changes: 6 additions & 0 deletions src/ui/#mbtools#cl_gui_router.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ CLASS /mbtools/cl_gui_router IMPLEMENTATION.
/mbtools/cl_utilities=>call_browser( /mbtools/if_definitions=>c_www_home ).
rs_handled-state = /mbtools/cl_gui=>c_event_state-no_more_act.

WHEN /mbtools/if_actions=>mbt_license.
" License Terms
/mbtools/cl_utilities=>call_browser(
/mbtools/if_definitions=>c_www_home && /mbtools/if_definitions=>c_www_terms ).
rs_handled-state = /mbtools/cl_gui=>c_event_state-no_more_act.

WHEN /mbtools/if_actions=>mbt_portfolio.
" Portfolio
/mbtools/cl_utilities=>call_browser(
Expand Down
9 changes: 2 additions & 7 deletions src/uipages/#mbtools#cl_gui_page_about.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ CLASS /mbtools/cl_gui_page_about IMPLEMENTATION.
METHOD /mbtools/if_gui_event_handler~on_event.

CASE ii_event->mv_action.

Check failure on line 51 in src/uipages/#mbtools#cl_gui_page_about.clas.abap

View check run for this annotation

abaplint / abaplint

CASE construct too short, it must have a minimum of 2 WHEN branches

https://rules.abaplint.org/short_case
WHEN /mbtools/if_actions=>go_license.
/mbtools/cl_utilities=>call_browser(
/mbtools/if_definitions=>c_www_home && /mbtools/if_definitions=>c_www_terms ).
rs_handled-state = /mbtools/cl_gui=>c_event_state-re_render.
WHEN /mbtools/if_actions=>go_back.
rs_handled-state = /mbtools/cl_gui=>c_event_state-go_back.
ENDCASE.
Expand Down Expand Up @@ -155,14 +151,13 @@ CLASS /mbtools/cl_gui_page_about IMPLEMENTATION.
" Avoid harvest
ri_html->add( |<p>Copyright { /mbtools/if_special_chars=>c_copyright } { sy-datum(4) } Marc Bernard Tools</p>| ).

ri_html->add( |<p>{ ri_html->a( iv_typ = /mbtools/if_html=>c_action_type-url
iv_act = /mbtools/if_definitions=>c_www_home
ri_html->add( |<p>{ ri_html->a( iv_act = /mbtools/if_actions=>mbt_website
iv_txt = /mbtools/if_definitions=>c_www_home ) }</p>| ).

ri_html->add( |<form method="post">| ).

ri_html->add( |<input type="submit" name="action" value="License Terms" formaction="sapevent:{
/mbtools/if_actions=>go_license }">| ).
/mbtools/if_actions=>mbt_license }">| ).

ri_html->add( |<input type="submit" name="action" value="Back" formaction="sapevent:{
/mbtools/if_actions=>go_back }" class="main">| ).
Expand Down
10 changes: 8 additions & 2 deletions src/uipages/#mbtools#cl_gui_page_main.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@ CLASS /mbtools/cl_gui_page_main IMPLEMENTATION.
iv_action = ii_event->mv_action ).
ENDIF.

IF ii_event->mv_action = /mbtools/if_actions=>tools_check OR
ii_event->mv_action = /mbtools/if_actions=>tools_update OR
ii_event->mv_action = /mbtools/if_actions=>tool_install OR
ii_event->mv_action = /mbtools/if_actions=>tool_uninstall.
/mbtools/cl_tool_manager=>action_tools( /mbtools/if_actions=>tool_sync ).
ENDIF.

CASE ii_event->mv_action.

WHEN /mbtools/if_actions=>tools_check.
Expand Down Expand Up @@ -349,8 +356,7 @@ CLASS /mbtools/cl_gui_page_main IMPLEMENTATION.

lo_bar_menu->add(
iv_txt = 'Website'
iv_typ = /mbtools/if_html=>c_action_type-url
iv_act = /mbtools/if_definitions=>c_www_home
iv_act = /mbtools/if_actions=>mbt_website
)->add(
iv_txt = 'About'
iv_act = /mbtools/if_actions=>go_about ).
Expand Down

0 comments on commit c7a068f

Please sign in to comment.