All files / src/ui/pages/db zcl_abapgit_gui_page_db.clas.locals_imp.abap

51.56% Statements 33/64
50% Branches 1/2
50% Functions 1/2
51.56% Lines 33/64

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 651x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x                                                                
CLASS lcl_popup_to_confirm DEFINITION.
 
  PUBLIC SECTION.
 
    CLASS-METHODS create
      IMPORTING
        !iv_titlebar              TYPE clike DEFAULT 'Warning'
        !iv_text_question         TYPE clike
        !iv_text_button_1         TYPE clike DEFAULT 'Yes'
        !iv_action_button_1       TYPE clike
        !iv_text_button_2         TYPE clike DEFAULT 'No'
        !iv_action_button_2       TYPE clike
        !iv_default_button        TYPE clike DEFAULT '2'
        !iv_display_cancel_button TYPE abap_bool DEFAULT abap_false
        !iv_action_cancel         TYPE clike DEFAULT zcl_abapgit_popup_to_confirm=>c_action-cancel
        !iv_popup_type            TYPE clike DEFAULT 'ICON_MESSAGE_WARNING'
      RAISING
        zcx_abapgit_exception.
 
    CLASS-METHODS render
      RETURNING
        VALUE(ri_html) TYPE REF TO object
      RAISING
        zcx_abapgit_exception.
 
    CLASS-METHODS close.
 
  PRIVATE SECTION.
 
    CLASS-DATA go_popup TYPE REF TO zcl_abapgit_popup_to_confirm.
 
ENDCLASS.
 
CLASS lcl_popup_to_confirm IMPLEMENTATION.

  METHOD create.
    go_popup = zcl_abapgit_popup_to_confirm=>create(
      iv_titlebar              = iv_titlebar
      iv_text_question         = iv_text_question
      iv_text_button_1         = iv_text_button_1
      iv_action_button_1       = iv_action_button_1
      iv_text_button_2         = iv_text_button_2
      iv_action_button_2       = iv_action_button_2
      iv_default_button        = iv_default_button
      iv_display_cancel_button = iv_display_cancel_button
      iv_action_cancel         = iv_action_cancel
      iv_popup_type            = iv_popup_type ).
  ENDMETHOD.

  METHOD render.
    IF go_popup IS INITIAL OR go_popup->was_closed( ) = abap_true.
      ri_html = zcl_abapgit_html=>create( ).
    ELSE.
      ri_html = zcl_abapgit_gui_in_page_modal=>create( go_popup ).
    ENDIF.
  ENDMETHOD.

  METHOD close.
    IF go_popup IS BOUND.
      go_popup->close( ).
    ENDIF.
  ENDMETHOD.

ENDCLASS.