Page 1 of 1
how to make filter minimised in view all bug page by default
Posted: 22 Mar 2007, 13:05
by ikutluay
i see the javascript code but make it has parameter for this
making Filter minimized by default in view all bug page
Posted: 13 Apr 2007, 07:55
by davidf
Hello,
you can find here the change on source code I made on Mantis 1.0.7 for this functionality :
Index: /mantis/core/filter_api.php
===================================================================
--- /mantis/core/filter_api.php (revision 16)
+++ /mantis/core/filter_api.php (revision 17)
@@ -963,9 +963,9 @@
function filter_draw_selection_area( $p_page_number, $p_for_screen = true )
{
collapse_open( 'filter' );
+ filter_draw_selection_area2( $p_page_number, $p_for_screen, false );
+ collapse_closed( 'filter' );
filter_draw_selection_area2( $p_page_number, $p_for_screen, true );
- collapse_closed( 'filter' );
- filter_draw_selection_area2( $p_page_number, $p_for_screen, false );
collapse_end( 'filter' );
}
Index: /mantis/core/collapse_api.php
===================================================================
--- /mantis/core/collapse_api.php (revision 16)
+++ /mantis/core/collapse_api.php (revision 17)
@@ -78,15 +78,26 @@
}
global $g_open_collapse_section;
+
+ if ($p_name==='filter'){
+ if ( $g_open_collapse_section === true ) {
+ $t_icon = 'plus.png';
+ $t_alt = '+';
+ } else {
+ $t_icon = 'minus.png';
+ $t_alt = '-';
+ }
+ }
+ else
+ if ( $g_open_collapse_section === true ) {
+ $t_icon = 'minus.png';
+ $t_alt = '-';
+ } else {
+ $t_icon = 'plus.png';
+ $t_alt = '+';
+ }
+
- if ( $g_open_collapse_section === true ) {
- $t_icon = 'minus.png';
- $t_alt = '-';
- } else {
- $t_icon = 'plus.png';
- $t_alt = '+';
- }
-
echo "<a href=\"\" onclick=\"ToggleDiv( '$p_name', g_div_$p_name ); return false;\"
><img border=\"0\" src=\"images/$t_icon\" alt=\"$t_alt\" /></a> ";
}
Like that, the filter are minimized by default on the view all bug page, for all the new users when connecting the first time.
Posted: 18 Apr 2007, 08:54
by Mr.J!M
how do you apply this patch?
i'm very interrested in this.
I have to paste it in a file.patch or what?
the --- etc confusing me.
Posted: 15 Oct 2007, 22:01
by Peter2
I've found an easier way to change the default, by changing the default cookie value (which is used while no cookie is saved yet).
Read at
http://www.mantisbt.org/bugs/view.php?id=8465