mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
Change default width of abapgit (#4751)
* Change default width of abapgit * Center settings forms
This commit is contained in:
parent
212fcb779e
commit
50bd3941e0
|
@ -7,6 +7,16 @@
|
||||||
body {
|
body {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.centered {
|
||||||
|
max-width: 1280px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.full_width {
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
a, a:visited {
|
a, a:visited {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
@ -1043,13 +1053,15 @@ settings_tab tr:first-child td { border-top: 0px; }
|
||||||
/* DIALOGS */
|
/* DIALOGS */
|
||||||
|
|
||||||
.dialog {
|
.dialog {
|
||||||
|
margin: 0 auto;
|
||||||
|
margin-top: 1em;
|
||||||
|
margin-bottom: 1em;
|
||||||
border: 1px solid;
|
border: 1px solid;
|
||||||
padding: 1em 1em;
|
padding: 1em 1em;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
.dialog-form {
|
.dialog-form {
|
||||||
margin: 1em 1em 1em 1em;
|
|
||||||
width: 600px;
|
width: 600px;
|
||||||
}
|
}
|
||||||
.dialog-form-center {
|
.dialog-form-center {
|
||||||
|
|
|
@ -262,6 +262,16 @@ RepoOverViewHelper.prototype.toggleRepoListDetail = function (forceDisplay) {
|
||||||
RepoOverViewHelper.prototype.toggleItemsDetail = function(forceDisplay){
|
RepoOverViewHelper.prototype.toggleItemsDetail = function(forceDisplay){
|
||||||
if (this.detailCssClass) {
|
if (this.detailCssClass) {
|
||||||
this.isDetailsDisplayed = forceDisplay || !this.isDetailsDisplayed;
|
this.isDetailsDisplayed = forceDisplay || !this.isDetailsDisplayed;
|
||||||
|
|
||||||
|
// change layout to wide if details are displayed
|
||||||
|
if (this.isDetailsDisplayed) {
|
||||||
|
document.body.classList.remove("centered");
|
||||||
|
document.body.classList.add("full_width");
|
||||||
|
} else {
|
||||||
|
document.body.classList.add("centered");
|
||||||
|
document.body.classList.remove("full_width");
|
||||||
|
}
|
||||||
|
|
||||||
this.detailCssClass.style.display = this.isDetailsDisplayed ? "" : "none";
|
this.detailCssClass.style.display = this.isDetailsDisplayed ? "" : "none";
|
||||||
this.actionCssClass.style.display = this.isDetailsDisplayed ? "none" : "";
|
this.actionCssClass.style.display = this.isDetailsDisplayed ? "none" : "";
|
||||||
var icon = document.getElementById("icon-filter-detail");
|
var icon = document.getElementById("icon-filter-detail");
|
||||||
|
|
|
@ -13,8 +13,15 @@ CLASS zcl_abapgit_gui_page DEFINITION PUBLIC ABSTRACT
|
||||||
|
|
||||||
PROTECTED SECTION.
|
PROTECTED SECTION.
|
||||||
|
|
||||||
|
CONSTANTS:
|
||||||
|
BEGIN OF c_page_layout,
|
||||||
|
centered TYPE string VALUE `centered`,
|
||||||
|
full_width TYPE string VALUE `full_width`,
|
||||||
|
END OF c_page_layout.
|
||||||
|
|
||||||
TYPES:
|
TYPES:
|
||||||
BEGIN OF ty_control,
|
BEGIN OF ty_control,
|
||||||
|
page_layout TYPE string,
|
||||||
page_title TYPE string,
|
page_title TYPE string,
|
||||||
page_menu TYPE REF TO zcl_abapgit_html_toolbar,
|
page_menu TYPE REF TO zcl_abapgit_html_toolbar,
|
||||||
END OF ty_control .
|
END OF ty_control .
|
||||||
|
@ -22,7 +29,7 @@ CLASS zcl_abapgit_gui_page DEFINITION PUBLIC ABSTRACT
|
||||||
DATA ms_control TYPE ty_control .
|
DATA ms_control TYPE ty_control .
|
||||||
|
|
||||||
METHODS render_content
|
METHODS render_content
|
||||||
ABSTRACT
|
ABSTRACT
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(ri_html) TYPE REF TO zif_abapgit_html
|
VALUE(ri_html) TYPE REF TO zif_abapgit_html
|
||||||
RAISING
|
RAISING
|
||||||
|
@ -77,13 +84,14 @@ ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLASS ZCL_ABAPGIT_GUI_PAGE IMPLEMENTATION.
|
CLASS zcl_abapgit_gui_page IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD constructor.
|
METHOD constructor.
|
||||||
|
|
||||||
super->constructor( ).
|
super->constructor( ).
|
||||||
mo_settings = zcl_abapgit_persist_settings=>get_instance( )->read( ).
|
mo_settings = zcl_abapgit_persist_settings=>get_instance( )->read( ).
|
||||||
|
ms_control-page_layout = c_page_layout-centered.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
@ -315,7 +323,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE IMPLEMENTATION.
|
||||||
ri_html->add( '<!DOCTYPE html>' ).
|
ri_html->add( '<!DOCTYPE html>' ).
|
||||||
ri_html->add( '<html lang="en">' ).
|
ri_html->add( '<html lang="en">' ).
|
||||||
ri_html->add( html_head( ) ).
|
ri_html->add( html_head( ) ).
|
||||||
ri_html->add( '<body>' ).
|
ri_html->add( |<body class="{ ms_control-page_layout }">| ).
|
||||||
ri_html->add( title( ) ).
|
ri_html->add( title( ) ).
|
||||||
|
|
||||||
ri_html->add( render_content( ) ). " TODO -> render child
|
ri_html->add( render_content( ) ). " TODO -> render child
|
||||||
|
|
|
@ -104,6 +104,7 @@ CLASS zcl_abapgit_gui_page_diff DEFINITION
|
||||||
METHODS build_menu
|
METHODS build_menu
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(ro_menu) TYPE REF TO zcl_abapgit_html_toolbar .
|
VALUE(ro_menu) TYPE REF TO zcl_abapgit_html_toolbar .
|
||||||
|
METHODS set_layout.
|
||||||
|
|
||||||
METHODS render_content
|
METHODS render_content
|
||||||
REDEFINITION .
|
REDEFINITION .
|
||||||
|
@ -205,7 +206,7 @@ ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLASS ZCL_ABAPGIT_GUI_PAGE_DIFF IMPLEMENTATION.
|
CLASS zcl_abapgit_gui_page_diff IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD add_filter_sub_menu.
|
METHOD add_filter_sub_menu.
|
||||||
|
@ -484,6 +485,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_DIFF IMPLEMENTATION.
|
||||||
super->constructor( ).
|
super->constructor( ).
|
||||||
ms_control-page_title = 'Diff'.
|
ms_control-page_title = 'Diff'.
|
||||||
mv_unified = zcl_abapgit_persistence_user=>get_instance( )->get_diff_unified( ).
|
mv_unified = zcl_abapgit_persistence_user=>get_instance( )->get_diff_unified( ).
|
||||||
|
set_layout( ).
|
||||||
mv_repo_key = iv_key.
|
mv_repo_key = iv_key.
|
||||||
mo_repo ?= zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ).
|
mo_repo ?= zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ).
|
||||||
|
|
||||||
|
@ -505,6 +507,16 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_DIFF IMPLEMENTATION.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
METHOD set_layout.
|
||||||
|
|
||||||
|
IF mv_unified = abap_true.
|
||||||
|
ms_control-page_layout = c_page_layout-centered.
|
||||||
|
ELSE.
|
||||||
|
ms_control-page_layout = c_page_layout-full_width.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD get_normalized_fname_with_path.
|
METHOD get_normalized_fname_with_path.
|
||||||
|
|
||||||
|
@ -602,7 +614,6 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_DIFF IMPLEMENTATION.
|
||||||
DATA: ls_diff_file LIKE LINE OF mt_diff_files,
|
DATA: ls_diff_file LIKE LINE OF mt_diff_files,
|
||||||
li_progress TYPE REF TO zif_abapgit_progress.
|
li_progress TYPE REF TO zif_abapgit_progress.
|
||||||
|
|
||||||
|
|
||||||
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
|
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
|
||||||
|
|
||||||
li_progress = zcl_abapgit_progress=>get_instance( lines( mt_diff_files ) ).
|
li_progress = zcl_abapgit_progress=>get_instance( lines( mt_diff_files ) ).
|
||||||
|
@ -996,6 +1007,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_DIFF IMPLEMENTATION.
|
||||||
WHEN c_actions-toggle_unified. " Toggle file diplay
|
WHEN c_actions-toggle_unified. " Toggle file diplay
|
||||||
|
|
||||||
mv_unified = zcl_abapgit_persistence_user=>get_instance( )->toggle_diff_unified( ).
|
mv_unified = zcl_abapgit_persistence_user=>get_instance( )->toggle_diff_unified( ).
|
||||||
|
set_layout( ).
|
||||||
rs_handled-state = zcl_abapgit_gui=>c_event_state-re_render.
|
rs_handled-state = zcl_abapgit_gui=>c_event_state-re_render.
|
||||||
|
|
||||||
WHEN c_actions-toggle_hidden_chars. " Toggle display of hidden characters
|
WHEN c_actions-toggle_hidden_chars. " Toggle display of hidden characters
|
||||||
|
|
|
@ -363,6 +363,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_PATCH IMPLEMENTATION.
|
||||||
|
|
||||||
" While patching we always want to be in split mode
|
" While patching we always want to be in split mode
|
||||||
CLEAR: mv_unified.
|
CLEAR: mv_unified.
|
||||||
|
set_layout( ).
|
||||||
CREATE OBJECT mo_stage.
|
CREATE OBJECT mo_stage.
|
||||||
|
|
||||||
ms_control-page_title = 'Patch'.
|
ms_control-page_title = 'Patch'.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user