From: <gi...@ma...> - 2010-08-25 06:05:59
|
The branch, master has been updated via 6b5e037ced1d03d772df41e6fe83023746eb758c (commit) via 99a9d10435e7895bf688582e778e67097dc77d8f (commit) via c0d2239266ed2a76fbe4fc0d90e13dc66fd129a7 (commit) via e087425c42128b517972f016b2b0b280198a55a3 (commit) via 6083666774c467034938f94486e697b68b35eb1c (commit) via 94c2e872d0c0fe1345e5284b5e5cfe08383dbb30 (commit) via 5dec982e75a1063633130fada6b6b862237f520d (commit) via d5a59a4cdebbe6a9ce846fbeca252599ff04e689 (commit) from 0e504c8813926e226c6d64ddfed22b77704126e5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6b5e037ced1d03d772df41e6fe83023746eb758c Author: Daryn Warriner <da...@ii...> Date: Wed Aug 25 00:31:45 2010 -0500 Bug #11826, Bug #11995, Fix invalid html in the view all bug filter. Add divs, classes and id's where necessary to facilitate moving style elements into css and inline javascript into javascript files. commit 99a9d10435e7895bf688582e778e67097dc77d8f Author: Daryn Warriner <da...@ii...> Date: Wed Aug 25 00:19:23 2010 -0500 remove border. It is not a valid tr attribute. commit c0d2239266ed2a76fbe4fc0d90e13dc66fd129a7 Author: Daryn Warriner <da...@ii...> Date: Wed Aug 25 00:18:44 2010 -0500 Move styles for recently-visited into css. remove html style elements. commit e087425c42128b517972f016b2b0b280198a55a3 Author: Daryn Warriner <da...@ii...> Date: Wed Aug 25 00:10:42 2010 -0500 Bug #11826 - Remove inline javascript for bug-jump field and put it in common.js. Add css styles for bug-jump. commit 6083666774c467034938f94486e697b68b35eb1c Author: Daryn Warriner <da...@ii...> Date: Tue Aug 24 23:56:51 2010 -0500 Add missing closing tags. commit 94c2e872d0c0fe1345e5284b5e5cfe08383dbb30 Author: Daryn Warriner <da...@ii...> Date: Tue Aug 24 23:56:07 2010 -0500 Use class rather than id for the menu links. They may appear more than once on the page. commit 5dec982e75a1063633130fada6b6b862237f520d Author: Daryn Warriner <da...@ii...> Date: Tue Aug 24 23:54:25 2010 -0500 Remove extra \". commit d5a59a4cdebbe6a9ce846fbeca252599ff04e689 Author: Daryn Warriner <da...@ii...> Date: Tue Aug 24 23:23:31 2010 -0500 Fix missing space causing validation error. ----------------------------------------------------------------------- Summary of changes: core/collapse_api.php | 5 +- core/filter_api.php | 160 ++++++++++++++++++++-------------------------- core/html_api.php | 18 ++--- core/print_api.php | 4 +- css/default.css | 59 +++++++++++++++-- javascript/common.js | 29 ++++++++ javascript/dev/common.js | 29 ++++++++ view_all_inc.php | 2 +- 8 files changed, 192 insertions(+), 114 deletions(-) ----------------------------------------------------------------------- commit 6b5e037ced1d03d772df41e6fe83023746eb758c Author: Daryn Warriner <da...@ii...> Date: Wed Aug 25 00:31:45 2010 -0500 Bug #11826, Bug #11995, Fix invalid html in the view all bug filter. Add divs, classes and id's where necessary to facilitate moving style elements into css and inline javascript into javascript files. diff --git a/core/filter_api.php b/core/filter_api.php index f59d2ea..857fb95 100644 --- a/core/filter_api.php +++ b/core/filter_api.php @@ -2115,6 +2115,7 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e ?> <br /> + <div class="filter-box"> <form method="post" name="filters<?php echo $t_form_name_suffix?>" id="filters_form<?php echo $t_form_name_suffix?>" action="<?php echo $t_action;?>"> <?php # CSRF protection not required here - form does not result in modifications ?> <input type="hidden" name="type" value="1" /> @@ -2126,11 +2127,12 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e ?> <input type="hidden" name="page_number" value="<?php echo $t_page_number?>" /> <input type="hidden" name="view_type" value="<?php echo $t_view_type?>" /> - <table class="width100" cellspacing="1"> - <?php $t_filter_cols = config_get( 'filter_custom_fields_per_row' ); if( $p_expanded ) { + ?> + <table width="100%" cellspacing="1"> + <?php $t_custom_cols = $t_filter_cols; $t_current_user_access_level = current_user_get_access_level(); @@ -3371,105 +3373,83 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e } ?> </tr> + </table> <?php } // expanded - ?> - <tr> - <td colspan="2"> - <?php - collapse_icon( 'filter' ); + collapse_icon( 'filter' ); + echo '<div class="search-box">'; echo lang_get( 'search' ) . ' '; echo '<input type="text" size="16" name="', FILTER_PROPERTY_SEARCH, '" value="', string_html_specialchars( $t_filter[FILTER_PROPERTY_SEARCH] ), '" />'; + echo '</div>'; ?> + <div class="submit-query"><input type="submit" name="filter" class="button-small" value="<?php echo lang_get( 'filter_button' )?>" /></div> + </form> + <div class="other-forms"> + <div class="filter-links"><?php + $f_switch_view_link = ( ON == config_get( 'dhtml_filters' ) ? 'view_all_set.php?type=6&view_type=' : 'view_filters_page.php?view_type=' ); + $t_view_filters = config_get( 'view_filters' ); + if(( SIMPLE_ONLY != $t_view_filters ) && ( ADVANCED_ONLY != $t_view_filters ) ) { + if( 'advanced' == $t_view_type ) { + echo '<span class="switch-view"><a href="', $f_switch_view_link, 'simple">', lang_get('simple_filters'), '</a></span>'; + } else { + echo '<span class="switch-view"><a href="', $f_switch_view_link, 'advanced">', lang_get('advanced_filters'), '</a></span>'; + } + } - <input type="submit" name="filter" class="button-small" value="<?php echo lang_get( 'filter_button' )?>" /> - </td> - </form> - <td class="center" colspan="<?php echo( $t_filter_cols - 6 )?>"> <!-- use this label for padding --> + if( access_has_project_level( config_get( 'create_permalink_threshold' ) ) ) { + echo '<span class="permalink"><a href="permalink_page.php?url=', urlencode( filter_get_url( $t_filter ) ), '">', lang_get( 'create_filter_link' ), '</a></span>'; + } ?> + </div><?php + $t_stored_queries_arr = array(); + $t_stored_queries_arr = filter_db_get_available_queries(); + + if( count( $t_stored_queries_arr ) > 0 ) { ?> + <div class="stored-queries"> + <form method="get" name="list_queries<?php echo $t_form_name_suffix;?>" action="view_all_set.php"> + <?php # CSRF protection not required here - form does not result in modifications ?> + <input type="hidden" name="type" value="3" /> + <select name="source_query_id"> + <option value="-1"><?php echo '[' . lang_get( 'reset_query' ) . ']'?></option> + <option value="-1"></option> <?php - if( ON == config_get( 'dhtml_filters' ) ) { - $f_switch_view_link = 'view_all_set.php?type=6&view_type='; - } else { - $f_switch_view_link = 'view_filters_page.php?view_type='; - } - - $t_view_filters = config_get( 'view_filters' ); - if(( SIMPLE_ONLY != $t_view_filters ) && ( ADVANCED_ONLY != $t_view_filters ) ) { - if( 'advanced' == $t_view_type ) { - print_bracket_link( $f_switch_view_link . 'simple', lang_get( 'simple_filters' ) ); - } else { - print_bracket_link( $f_switch_view_link . 'advanced', lang_get( 'advanced_filters' ) ); + $t_source_query_id = isset( $t_filter['_source_query_id'] ) ? $t_filter['_source_query_id'] : -1; + foreach( $t_stored_queries_arr as $t_query_id => $t_query_name ) { + echo '<option value="' . $t_query_id . '" '; + check_selected( $t_query_id, $t_source_query_id ); + echo '>' . string_display_line( $t_query_name ) . '</option>'; + } + ?> + </select> + <input type="submit" name="switch_to_query_button" class="button-small" value="<?php echo lang_get( 'use_query' )?>" /> + </form> + <form method="post" name="open_queries" action="query_view_page.php"> + <?php # CSRF protection not required here - form does not result in modifications ?> + <input type="submit" name="switch_to_query_button" class="button-small" value="<?php echo lang_get( 'open_queries' )?>" /> + </form> + </div><?php + } else { ?> + <div class="reset-query"> + <form method="get" name="reset_query" action="view_all_set.php"> + <?php # CSRF protection not required here - form does not result in modifications ?> + <input type="hidden" name="type" value="3" /> + <input type="hidden" name="source_query_id" value="-1" /> + <input type="submit" name="reset_query_button" class="button-small" value="<?php echo lang_get( 'reset_query' )?>" /> + </form> + </div><?php } - } - - if( access_has_project_level( config_get( 'create_permalink_threshold' ) ) ) { - print_bracket_link( 'permalink_page.php?url=' . urlencode( filter_get_url( $t_filter ) ), lang_get( 'create_filter_link' ), - /* new window = */ - true ); - } - ?> - </td> - <td class="right" colspan="4"> - <?php - $t_stored_queries_arr = array(); - $t_stored_queries_arr = filter_db_get_available_queries(); - - if( count( $t_stored_queries_arr ) > 0 ) { - ?> - <form method="get" name="list_queries<?php echo $t_form_name_suffix;?>" action="view_all_set.php"> - <?php # CSRF protection not required here - form does not result in modifications ?> - <input type="hidden" name="type" value="3" /> - <?php - if( ON == config_get( 'use_javascript' ) ) { - echo "<select name=\"source_query_id\" onchange=\"document.forms.list_queries$t_form_name_suffix.submit();\">"; - } else { - echo '<select name="source_query_id">'; - } - ?> - <option value="-1"><?php echo '[' . lang_get( 'reset_query' ) . ']'?></option> - <option value="-1"></option> - <?php - $t_source_query_id = isset( $t_filter['_source_query_id'] ) ? $t_filter['_source_query_id'] : -1; - foreach( $t_stored_queries_arr as $t_query_id => $t_query_name ) { - echo '<option value="' . $t_query_id . '" '; - check_selected( $t_query_id, $t_source_query_id ); - echo '>' . string_display_line( $t_query_name ) . '</option>'; - } - ?> - </select> - <input type="submit" name="switch_to_query_button" class="button-small" value="<?php echo lang_get( 'use_query' )?>" /> - </form> - <form method="post" name="open_queries" action="query_view_page.php"> - <?php # CSRF protection not required here - form does not result in modifications ?> - <input type="submit" name="switch_to_query_button" class="button-small" value="<?php echo lang_get( 'open_queries' )?>" /> - </form> - <?php - } else { - ?> - <form method="get" name="reset_query" action="view_all_set.php"> - <?php # CSRF protection not required here - form does not result in modifications ?> - <input type="hidden" name="type" value="3" /> - <input type="hidden" name="source_query_id" value="-1" /> - <input type="submit" name="reset_query_button" class="button-small" value="<?php echo lang_get( 'reset_query' )?>" /> - </form> - <?php - } - - if( access_has_project_level( config_get( 'stored_query_create_threshold' ) ) ) { - ?> - <form method="post" name="save_query" action="query_store_page.php"> - <?php # CSRF protection not required here - form does not result in modifications ?> - <input type="submit" name="save_query_button" class="button-small" value="<?php echo lang_get( 'save_query' )?>" /> - </form> - <?php - } - ?> - </td> - </tr> - </table> + if( access_has_project_level( config_get( 'stored_query_create_threshold' ) ) ) { ?> + <div class="save-query"> + <form method="post" name="save_query" action="query_store_page.php"> + <?php # CSRF protection not required here - form does not result in modifications ?> + <input type="submit" name="save_query_button" class="button-small" value="<?php echo lang_get( 'save_query' )?>" /> + </form> + </div><?php + } ?> + </div> + </div> <?php } diff --git a/css/default.css b/css/default.css index 36089d5..515b120 100644 --- a/css/default.css +++ b/css/default.css @@ -22,7 +22,7 @@ form { display: inline; } input {} input.button {} -input.button-small { font-size: 8pt; } +input.button-small { font-size: 1em; } textarea {} select {} @@ -91,23 +91,40 @@ td.login-info-left { width: 33%; padding: 0px; text-align: left; } td.login-info-middle { width: 33%; padding: 0px; text-align: center; } td.login-info-right { width: 33%; padding: 0px; text-align: right; white-space: nowrap; } -.main-menu { float: left; width:100%; margin: 0; padding: 0; overflow: hidden; font-size: 1em; position: relative; border: 1px solid #999; background-color: #e8e8e8;} -.main-menu ul { clear: left; float: left; list-style: none; position: relative; left: 50%; margin: 0; padding: .25em; } +.main-menu { float: left; width:100%; margin: 0; padding: 0; overflow: hidden; font-size: 1em; position: relative; border: 1px solid #999; background-color: #e8e8e8; z-index: 99; } +.main-menu ul { clear: left; float: left; list-style: none; position: relative; left: 50%; margin: 0 0 0 -3em; padding: .25em; } .main-menu ul li { display:block; float: left; list-style: none; padding: .5em; margin: 0; position: relative; right: 50%; } .main-menu ul li a { padding-left: .9em; border-left: 1px solid #000; text-decoration: underline; } -.main-menu ul li:first-child > a { padding-left; border-left: none; } +.main-menu ul li:first-child > a { padding-left: 0; border-left: none; } #manage-menu, #account-menu, #summary-menu , #summary-submenu, #manage-config-menu { float: left; width: 100%; margin: 0; padding: 0; overflow: hidden; font-size: 1em; position: relative; top: -1.5em; } #manage-menu ul, #manage-config-menu ul, #summary-menu ul, #summary-submenu ul { clear: left; float: left; list-style: none; position: relative; left: 50%; padding: 0; margin: 0; text-align: center; } #manage-menu ul li, #manage-config-menu ul li, #summary-menu ul li, #summary-submenu ul li { display:block; float: left; list-style: none; margin: .5em 0; padding: 0; position: relative; right: 50%; } #manage-menu ul a, #manage-config-menu ul a, #summary-menu ul a, #summary-submenu ul a, #account-menu ul a, #doc-menu ul a { text-decoration: underline; padding: 0 .25em; } -#manage-menu ul li:before, #manage-config-menu ul li:before, #summary-menu ul li:before, #summary-submenu ul li:before, #account-menu ul li:before, #doc-menu ul li:before { content: "[" } -#manage-menu ul li:after, #manage-config-menu ul li:after, #summary-menu ul li:after, #summary-submenu ul li:after, #account-menu ul li:after, #doc-menu ul li:after { content: "]" } #account-menu, #doc-menu { top: 0; } #account-menu ul, #doc-menu ul { margin: 0 auto; padding: .25em; float: right; text-align: center; } #account-menu ul li, #doc-menu ul li { display: block; float: left; padding: 0; margin: 0; } +/* bracket links */ +#manage-menu ul li:before, +#manage-config-menu ul li:before, +#summary-menu ul li:before, +#summary-submenu ul li:before, +#account-menu ul li:before, +#doc-menu ul li:before, +span.permalink:before, +span.switch-view:before { content: "[" } + +#manage-menu ul li:after, +#manage-config-menu ul li:after, +#summary-menu ul li:after, +#summary-submenu ul li:after, +#account-menu ul li:after, +#doc-menu ul li:after, +span.permalink:after, +span.switch-view:after { content: "]" } + #content { position: relative; top: 0; margin: 0; padding: .5em; } .recently-visited { position: relative; top: .5em; right: -14em; float: right; text-align: right; font-size: x-small; } @@ -231,3 +248,26 @@ div.quick-summary-right { width: 49%; padding: 2px; text-align: right; float: ri td.tainted { color: red; } td.tainted input[type="text"], td.tainted select { background-color: #ffffff; color: red; border: 1px solid red; } select.tainted { background-color: #ffffff; color: red; } + +.stored-queries select { font-size: .9em; } +#filter_closed_link { float: left; padding: .6em .5em; margin: 0; line-height: 2.25em;} +#filter_open_link { float: left; padding: 0 .5em; margin: 0; margin-top: -.3em;} + +.filter-box { clear: both; border: 1px solid #000; margin: 0; padding: 0; font-size: .9em; } +#filter_closed .filter-box { height: 2em; } + +.filter-box table { margin-bottom: 1em; } + +.search-box { float: left; position: relative; padding: 0; margin: 0; } +.submit-query{ float: left; position: relative; padding: 0 .5em; margin: 0; } +.other-forms { float: right; position: relative; padding: 0; margin: 0; } +.filter-links { float: left; position: relative; padding: 0 .5em; margin: 0; line-height: 2.25em; } +.stored-queries { float: left; padding: 0 .5em; margin: 0; line-height: 2.25em; } +.reset-query { float: left; padding: 0; margin: 0; line-height: 2.25em; } +.save-query { float: left; padding: 0 .5em; margin: 0; line-height: 2.25em; } + +#filter_open .search-box, +#filter_open .submit-query { top: -.9em; } +#filter_open .other-forms { top: -1.1em; } + +#filter_closed .other-forms { top: -.15em; } diff --git a/javascript/common.js b/javascript/common.js index fae9d4a..e97c891 100644 --- a/javascript/common.js +++ b/javascript/common.js @@ -163,6 +163,9 @@ $(document).ready( function() { $(this).addClass('field-default'); } }); + $('[name=source_query_id]').change( function() { + $(this).parent().submit(); + }); setBugLabel(); }); diff --git a/javascript/dev/common.js b/javascript/dev/common.js index 8af4bb4..b317a4d 100644 --- a/javascript/dev/common.js +++ b/javascript/dev/common.js @@ -167,6 +167,9 @@ $(document).ready( function() { $(this).addClass('field-default'); } }); + $('[name=source_query_id]').change( function() { + $(this).parent().submit(); + }); setBugLabel(); }); commit 99a9d10435e7895bf688582e778e67097dc77d8f Author: Daryn Warriner <da...@ii...> Date: Wed Aug 25 00:19:23 2010 -0500 remove border. It is not a valid tr attribute. diff --git a/view_all_inc.php b/view_all_inc.php index cacabc9..c6d9539 100644 --- a/view_all_inc.php +++ b/view_all_inc.php @@ -197,7 +197,7 @@ function write_bug_rows ( $p_rows ) # choose color based on status $status_color = get_status_color( $t_row->status ); - echo '<tr bgcolor="', $status_color, '" border="1" valign="top">'; + echo '<tr bgcolor="', $status_color, '" valign="top">'; foreach( $t_columns as $t_column ) { $t_column_value_function = 'print_column_value'; commit c0d2239266ed2a76fbe4fc0d90e13dc66fd129a7 Author: Daryn Warriner <da...@ii...> Date: Wed Aug 25 00:18:44 2010 -0500 Move styles for recently-visited into css. remove html style elements. diff --git a/core/print_api.php b/core/print_api.php index d522515..e503166 100644 --- a/core/print_api.php +++ b/core/print_api.php @@ -1494,7 +1494,7 @@ function print_recently_visited() { return; } - echo '<div align="right" class="recently-visited"><small>' . lang_get( 'recently_visited' ) . ': '; + echo '<div class="recently-visited">' . lang_get( 'recently_visited' ) . ': '; $t_first = true; foreach( $t_ids as $t_id ) { @@ -1506,7 +1506,7 @@ function print_recently_visited() { echo string_get_bug_view_link( $t_id ); } - echo '</small></div>'; + echo '</div>'; } # print a dropdown box from input array diff --git a/css/default.css b/css/default.css index 5fcc843..36089d5 100644 --- a/css/default.css +++ b/css/default.css @@ -108,7 +108,9 @@ td.login-info-right { width: 33%; padding: 0px; text-align: right; white-space: #account-menu ul, #doc-menu ul { margin: 0 auto; padding: .25em; float: right; text-align: center; } #account-menu ul li, #doc-menu ul li { display: block; float: left; padding: 0; margin: 0; } -#content { clear: both; margin: 0; padding: .5em; } +#content { position: relative; top: 0; margin: 0; padding: .5em; } +.recently-visited { position: relative; top: .5em; right: -14em; float: right; text-align: right; font-size: x-small; } + br { clear:both; } .bug-jump { position: relative; top: -2.5em; right: .5em; float: right; z-index: 100; } commit e087425c42128b517972f016b2b0b280198a55a3 Author: Daryn Warriner <da...@ii...> Date: Wed Aug 25 00:10:42 2010 -0500 Bug #11826 - Remove inline javascript for bug-jump field and put it in common.js. Add css styles for bug-jump. diff --git a/core/html_api.php b/core/html_api.php index 5bbe1da..8772fec 100644 --- a/core/html_api.php +++ b/core/html_api.php @@ -865,15 +865,12 @@ function print_menu() { echo '</ul>'; echo '</div>'; echo '<div class="bug-jump">'; - echo '<form method="post" action="' . helper_mantis_url( 'jump_to_bug.php">' ); + echo '<form method="post" action="' . helper_mantis_url( 'jump_to_bug.php" class="bug-jump-form">' ); # CSRF protection not required here - form does not result in modifications - if( ON == config_get( 'use_javascript' ) ) { - $t_bug_label = lang_get( 'issue_id' ); - echo "<input type=\"text\" name=\"bug_id\" size=\"10\" class=\"small\" value=\"$t_bug_label\" onfocus=\"if (this.value == '$t_bug_label') this.value = ''\" onblur=\"if (this.value == '') this.value = '$t_bug_label'\" /> "; - } else { - echo "<input type=\"text\" name=\"bug_id\" size=\"10\" class=\"small\" /> "; - } + $t_bug_label = lang_get( 'issue_id' ); + echo '<input type="hidden" name="bug_label" value="', $t_bug_label, '" />'; + echo '<input type="text" name="bug_id" size="10" class="small" /> '; echo '<input type="submit" class="button-small" value="' . lang_get( 'jump' ) . '" /> '; echo '</form>'; diff --git a/css/default.css b/css/default.css index 503aaf6..5fcc843 100644 --- a/css/default.css +++ b/css/default.css @@ -111,7 +111,8 @@ td.login-info-right { width: 33%; padding: 0px; text-align: right; white-space: #content { clear: both; margin: 0; padding: .5em; } br { clear:both; } -.bug-jump { position: relative; top: -2.5em; right: .5em; float: right; } +.bug-jump { position: relative; top: -2.5em; right: .5em; float: right; z-index: 100; } +.field-default { color: #999; } td.menu { diff --git a/javascript/common.js b/javascript/common.js index 9d00ca2..fae9d4a 100644 --- a/javascript/common.js +++ b/javascript/common.js @@ -147,8 +147,34 @@ $(document).ready( function() { button: element.id + '_datetime_button' }); }); + + + $('.bug-jump').find('[name=bug_id]').focus( function() { + var bug_label = $('.bug-jump-form').find('[name=bug_label]').val(); + if( $(this).val() == bug_label ) { + $(this).val(''); + $(this).removeClass('field-default'); + } + }); + $('.bug-jump').find('[name=bug_id]').blur( function() { + var bug_label = $('.bug-jump-form').find('[name=bug_label]').val(); + if( $(this).val() == '' ) { + $(this).val(bug_label); + $(this).addClass('field-default'); + } + }); + setBugLabel(); }); +function setBugLabel() { + var bug_label = $('.bug-jump-form').find('[name=bug_label]').val(); + var field = $('.bug-jump').find('[name=bug_id]'); + if( field.val() == '' ) { + field.val(bug_label); + field.addClass('field-default'); + } +} + /* * String manipulation */ diff --git a/javascript/dev/common.js b/javascript/dev/common.js index 345abde..8af4bb4 100644 --- a/javascript/dev/common.js +++ b/javascript/dev/common.js @@ -151,8 +151,34 @@ $(document).ready( function() { button: element.id + '_datetime_button' }); }); + + + $('.bug-jump').find('[name=bug_id]').focus( function() { + var bug_label = $('.bug-jump-form').find('[name=bug_label]').val(); + if( $(this).val() == bug_label ) { + $(this).val(''); + $(this).removeClass('field-default'); + } + }); + $('.bug-jump').find('[name=bug_id]').blur( function() { + var bug_label = $('.bug-jump-form').find('[name=bug_label]').val(); + if( $(this).val() == '' ) { + $(this).val(bug_label); + $(this).addClass('field-default'); + } + }); + setBugLabel(); }); +function setBugLabel() { + var bug_label = $('.bug-jump-form').find('[name=bug_label]').val(); + var field = $('.bug-jump').find('[name=bug_id]'); + if( field.val() == '' ) { + field.val(bug_label); + field.addClass('field-default'); + } +} + /* * String manipulation */ commit 6083666774c467034938f94486e697b68b35eb1c Author: Daryn Warriner <da...@ii...> Date: Tue Aug 24 23:56:51 2010 -0500 Add missing closing tags. diff --git a/core/html_api.php b/core/html_api.php index ec78877..5bbe1da 100644 --- a/core/html_api.php +++ b/core/html_api.php @@ -369,7 +369,7 @@ function html_css() { * @return null */ function html_css_link( $p_filename ) { - echo "\t", '<link rel="stylesheet" type="text/css" href="', string_sanitize_url( helper_mantis_url( 'css/' . $p_filename ), true ), '" >' . "\n"; + echo "\t", '<link rel="stylesheet" type="text/css" href="', string_sanitize_url( helper_mantis_url( 'css/' . $p_filename ), true ), '" />' . "\n"; } @@ -862,6 +862,7 @@ function print_menu() { echo '<li>'; echo implode( $t_menu_options, "</li>\n<li>" ); echo '</li>'; + echo '</ul>'; echo '</div>'; echo '<div class="bug-jump">'; echo '<form method="post" action="' . helper_mantis_url( 'jump_to_bug.php">' ); commit 94c2e872d0c0fe1345e5284b5e5cfe08383dbb30 Author: Daryn Warriner <da...@ii...> Date: Tue Aug 24 23:56:07 2010 -0500 Use class rather than id for the menu links. They may appear more than once on the page. diff --git a/core/html_api.php b/core/html_api.php index 88a9b40..ec78877 100644 --- a/core/html_api.php +++ b/core/html_api.php @@ -812,7 +812,7 @@ function print_menu() { # Manage Users (admins) or Manage Project (managers) or Manage Custom Fields if( access_has_global_level( config_get( 'manage_site_threshold' ) ) ) { $t_link = helper_mantis_url( 'manage_overview_page.php' ); - $t_menu_options[] = '<a id="manage-menu-link" href="' . $t_link . '">' . lang_get( 'manage_link' ) . '</a>'; + $t_menu_options[] = '<a class="manage-menu-link" href="' . $t_link . '">' . lang_get( 'manage_link' ) . '</a>'; } else { $t_show_access = min( config_get( 'manage_user_threshold' ), config_get( 'manage_project_threshold' ), config_get( 'manage_custom_fields_threshold' ) ); if( access_has_global_level( $t_show_access ) || access_has_any_project( $t_show_access ) ) { @@ -843,7 +843,7 @@ function print_menu() { # Account Page (only show accounts that are NOT protected) if( OFF == $t_protected ) { - $t_menu_options[] = '<a id="account-menu-link" href="' . helper_mantis_url( 'account_page.php">' ) . lang_get( 'account_link' ) . '</a>'; + $t_menu_options[] = '<a class="account-menu-link" href="' . helper_mantis_url( 'account_page.php">' ) . lang_get( 'account_link' ) . '</a>'; } # Add custom options commit 5dec982e75a1063633130fada6b6b862237f520d Author: Daryn Warriner <da...@ii...> Date: Tue Aug 24 23:54:25 2010 -0500 Remove extra \". diff --git a/core/collapse_api.php b/core/collapse_api.php index da2b34c..fabf08b 100644 --- a/core/collapse_api.php +++ b/core/collapse_api.php @@ -137,8 +137,7 @@ function collapse_icon( $p_name, $p_section = '' ) { $t_id = $p_name. '_closed_link'; } - echo "<a id=\"$t_id\" href=\"\" class=\"collapse-link\" \" - ><img border=\"0\" src=\"images/$t_icon\" alt=\"$t_alt\" /></a> "; + echo '<a id="', $t_id, '" href="" class="collapse-link"><img border="0" src="images/', $t_icon, '" alt="', $t_alt, '" /></a> '; } /** commit d5a59a4cdebbe6a9ce846fbeca252599ff04e689 Author: Daryn Warriner <da...@ii...> Date: Tue Aug 24 23:23:31 2010 -0500 Fix missing space causing validation error. diff --git a/core/collapse_api.php b/core/collapse_api.php index ca81a1b..da2b34c 100644 --- a/core/collapse_api.php +++ b/core/collapse_api.php @@ -80,7 +80,7 @@ function collapse_open( $p_name, $p_section = '' ) { $g_current_collapse_section = $t_block; $t_div_id = $t_block . '_open'; - echo '<div id="', $t_div_id, '"', ( $t_display ? 'class="collapse-open"' : ' class="collapse-closed"' ), '>'; + echo '<div id="', $t_div_id, '"', ( $t_display ? ' class="collapse-open"' : ' class="collapse-closed"' ), '>'; } /** ----------------------------------------------------------------------- -- Mantis Bug Tracker |