From cc9c8ad6c7c3325a88351bfd058ca25c2df84629 Mon Sep 17 00:00:00 2001 From: Rafik Robeal Date: Thu, 29 Aug 2019 20:31:24 -0700 Subject: [PATCH] Tweaks based on review comments & fix travis-ci --- bug_report_page.php | 8 ++++---- bug_view_inc.php | 4 ++-- bugnote_update.php | 2 +- bugnote_view_inc.php | 4 ---- core/collapse_api.php | 4 ++-- core/print_api.php | 10 ++++------ core/tag_api.php | 4 ++-- css/ace-mantis.css | 6 +++++- tests/Mantis/PrepareTest.php | 4 ++-- 9 files changed, 22 insertions(+), 24 deletions(-) diff --git a/bug_report_page.php b/bug_report_page.php index a29c83a21e..558e6da66b 100644 --- a/bug_report_page.php +++ b/bug_report_page.php @@ -376,8 +376,8 @@ - - + +
@@ -433,8 +433,8 @@
- - + + diff --git a/bug_view_inc.php b/bug_view_inc.php index 2617df465a..30deb72006 100644 --- a/bug_view_inc.php +++ b/bug_view_inc.php @@ -892,8 +892,8 @@ function bug_view_relationship_get_details( $p_bug_id, BugRelationshipData $p_re # add delete link if bug not read only and user has access level if( !bug_is_readonly( $p_bug_id ) && !current_user_is_anonymous() && ( $p_html_preview == false ) ) { if( access_has_bug_level( config_get( 'update_bug_threshold' ), $p_bug_id ) ) { - $t_relationship_info_html .= ' '; + $t_relationship_info_html .= ' '; } } diff --git a/bugnote_update.php b/bugnote_update.php index 0e6687f27b..414a0fe62e 100644 --- a/bugnote_update.php +++ b/bugnote_update.php @@ -74,7 +74,7 @@ trigger_error( ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR ); } -$f_bugnote_text = trim( $f_bugnote_text ) . "\n\n"; +$f_bugnote_text = trim( $f_bugnote_text ) . "\n"; bugnote_set_text( $f_bugnote_id, $f_bugnote_text ); bugnote_set_time_tracking( $f_bugnote_id, $f_time_tracking ); diff --git a/bugnote_view_inc.php b/bugnote_view_inc.php index e520d94788..8ab9f73636 100644 --- a/bugnote_view_inc.php +++ b/bugnote_view_inc.php @@ -312,10 +312,6 @@ echo string_display_links( $t_activity['note']->note ); $t_add_space = true; } - - if( $t_add_space && isset( $t_activity['attachments'] ) && count( $t_activity['attachments'] ) > 0 ) { - echo '

'; - } } else { if ( !$t_security_token_attachments_delete ) { $t_security_token_attachments_delete = form_security_token( 'bug_file_delete' ); diff --git a/core/collapse_api.php b/core/collapse_api.php index 938ccf72a0..12f4fef0fc 100644 --- a/core/collapse_api.php +++ b/core/collapse_api.php @@ -114,7 +114,7 @@ function collapse_closed( $p_name, $p_section = '', $p_css_class = '' ) { } /** - * Marks the location where a +/- icon is placed in output + * Marks the location where a down/up-arrow icon is placed in output * for the user to toggle the collapse block status. * This should appear in both the open and closed phase of a block. * @param string $p_name Collapse block name. @@ -134,7 +134,7 @@ function collapse_icon( $p_name, $p_section = '' ) { $t_id = $p_name. '_closed_link'; } - echo ''; + echo '  '; } /** diff --git a/core/print_api.php b/core/print_api.php index a7ba756eea..acb087984f 100644 --- a/core/print_api.php +++ b/core/print_api.php @@ -1877,11 +1877,12 @@ function print_bug_attachments_list( $p_bug_id, $p_security_token ) { * @return void */ function print_bug_attachment( array $p_attachment, $p_security_token ) { + echo '
'; if( $p_attachment['preview'] ) { $t_collapse_id = 'attachment_preview_' . $p_attachment['id']; global $g_collapse_cache_token; $g_collapse_cache_token[$t_collapse_id] = $p_attachment['type'] == 'image'; - collapse_open( $t_collapse_id, '', 'well well-sm' ); + collapse_open( $t_collapse_id, ''); } print_bug_attachment_header( $p_attachment, $p_security_token ); @@ -1894,14 +1895,13 @@ function print_bug_attachment( array $p_attachment, $p_security_token ) { } else if( $p_attachment['type'] === 'image' ) { print_bug_attachment_preview_image( $p_attachment ); } - collapse_closed( $t_collapse_id, '', 'well well-sm' ); + collapse_closed( $t_collapse_id, '' ); print_bug_attachment_header( $p_attachment, $p_security_token ); echo lang_get( 'word_separator' ); collapse_icon( $t_collapse_id ); collapse_end( $t_collapse_id ); - } else { - echo '
'; } + echo '
'; } /** @@ -1917,7 +1917,6 @@ function print_bug_attachment( array $p_attachment, $p_security_token ) { * @return void */ function print_bug_attachment_header( array $p_attachment, $p_security_token ) { - echo "\n"; if( $p_attachment['exists'] ) { if( $p_attachment['can_download'] ) { echo ''; @@ -1947,7 +1946,6 @@ function print_bug_attachment_header( array $p_attachment, $p_security_token ) { form_security_param( 'bug_file_delete', $p_security_token ) . '"> '; } - } /** diff --git a/core/tag_api.php b/core/tag_api.php index 18753712ca..19343a31d9 100644 --- a/core/tag_api.php +++ b/core/tag_api.php @@ -951,8 +951,8 @@ function tag_display_link( array $p_tag_row, $p_bug_id = 0 ) { if( $p_bug_id > 0 && access_has_bug_level( $t_detach, $p_bug_id ) ) { $t_tooltip = string_html_specialchars( sprintf( lang_get( 'tag_detach' ), string_display_line( $p_tag_row['name'] ) ) ); $t_href = 'tag_detach.php?bug_id=' . $p_bug_id . '&tag_id=' . $p_tag_row['id'] . $s_security_token; - echo ' '; - echo ''; + echo ' '; + echo ''; echo ''; } diff --git a/css/ace-mantis.css b/css/ace-mantis.css index fd676d3916..755a67619a 100644 --- a/css/ace-mantis.css +++ b/css/ace-mantis.css @@ -327,7 +327,11 @@ textarea.input-xs, select.input-xs[multiple] { -ms-transform: scale(1.3); transform: scale(1.3); } - +.well-xs { + padding: 4px 9px; + border-radius: 3px; + margin-bottom: 10px; +} .table-condensed2 > thead > tr > th, .table-condensed2 > tbody > tr > th, .table-condensed2 > tfoot > tr > th, diff --git a/tests/Mantis/PrepareTest.php b/tests/Mantis/PrepareTest.php index 7d72d97905..bd3e78df28 100644 --- a/tests/Mantis/PrepareTest.php +++ b/tests/Mantis/PrepareTest.php @@ -91,8 +91,8 @@ public function providerEmailLink() { $t_email = self::EMAIL; $t_text = 'Link Text'; $t_tooltip = 'Tooltip'; - $t_button_classes = 'class="btn btn-primary btn-white btn-round btn-xs"'; - $t_button_text = sprintf( ' %s', $t_text ); + $t_button_classes = 'class="noprint blue zoom-130"'; + $t_button_text = sprintf( ' %s', $t_text ); $t_test_data = array( 'Basic' => array(