how to make filter minimised in view all bug page by default
Moderators: Developer, Contributor
-
ikutluay
- Posts: 60
- Joined: 20 Mar 2007, 07:21
- Location: www.ibrahimkutluay.net/blog
- Contact:
how to make filter minimised in view all bug page by default
i see the javascript code but make it has parameter for this
making Filter minimized by default in view all bug page
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.
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.
David F
Senior Project Manager
Senior Project Manager
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
Read at
http://www.mantisbt.org/bugs/view.php?id=8465