? return_dynamic_filters.php ? javascript/addLoadEvent.js ? javascript/dynamic_filters.js ? javascript/xmlhttprequest.js Index: view_all_inc.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/view_all_inc.php,v retrieving revision 1.142 diff -u -r1.142 view_all_inc.php --- view_all_inc.php 1 Aug 2004 05:53:01 -0000 1.142 +++ view_all_inc.php 11 Aug 2004 22:12:13 -0000 @@ -49,6 +49,15 @@ if ( ON == $t_enable_sponsorship ) { $col_count++; } + + $t_dynamic_filters = config_get( 'dhtml_filters' ); + if ( ON == $t_dynamic_filters){ + ?> + + + +
Index: view_filters_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/view_filters_page.php,v retrieving revision 1.19 diff -u -r1.19 view_filters_page.php --- view_filters_page.php 1 Aug 2004 03:29:25 -0000 1.19 +++ view_filters_page.php 11 Aug 2004 22:12:35 -0000 @@ -170,81 +170,27 @@ - + - + - - -
/> - + - + - + - + @@ -266,23 +212,13 @@ - + - - - + - + - + @@ -329,88 +253,18 @@ - + - + - + - - - - - - - - - - - -
- : - - "; - print_month_option_list( $t_filter['start_month'] ); - print "\n"; - } - if ( strcasecmp( $t_char, "D" ) == 0 ) { - print "\n"; - } - if ( strcasecmp( $t_char, "Y" ) == 0 ) { - print "\n"; - } - } - ?> -
- : - - "; - print_month_option_list( $t_filter['end_month'] ); - print "\n"; - } - if ( strcasecmp( $t_char, "D" ) == 0 ) { - print "\n"; - } - if ( strcasecmp( $t_char, "Y" ) == 0 ) { - print "\n"; - } - } - ?> -
+ @@ -443,22 +297,8 @@ '; - if ( isset( $t_accessible_custom_fields_names[$t_base + $j] ) ) { - echo ''; + if ( isset( $t_accessible_custom_fields_ids[$t_base + $j] ) ) { + print_filter_custom_field($t_accessible_custom_fields_ids[$t_base + $j]); } else { echo ' '; } Index: core/current_user_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/current_user_api.php,v retrieving revision 1.21 diff -u -r1.21 current_user_api.php --- core/current_user_api.php 6 Aug 2004 15:38:50 -0000 1.21 +++ core/current_user_api.php 11 Aug 2004 20:47:19 -0000 @@ -96,7 +96,7 @@ $t_filter = ''; if ( !is_blank( $f_filter_string ) ) { - $t_filter = unserialize( $f_filter_string ); + $t_filter = @unserialize( $f_filter_string ); } else if ( !filter_is_cookie_valid() ) { return false; } else { Index: core/filter_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/filter_api.php,v retrieving revision 1.54 diff -u -r1.54 filter_api.php --- core/filter_api.php 8 Aug 2004 15:19:37 -0000 1.54 +++ core/filter_api.php 11 Aug 2004 21:10:03 -0000 @@ -405,8 +405,8 @@ $t_custom_fields = custom_field_get_ids(); foreach( $t_custom_fields as $t_cfid ) { - $t_first_time = true; - $t_custom_where_clause = ''; + $t_first_time = true; + $t_custom_where_clause = ''; # Ignore all custom filters that are not set, or that are set to '' or "any" $t_any_found = false; foreach( $t_filter['custom_fields'][$t_cfid] as $t_filter_member ) { @@ -646,8 +646,8 @@ } ?>
-
- + + '; @@ -702,22 +702,22 @@ > - : + : - : + : - : + : - : + : - : + : - : + : - + + + - + + + - + + + - + + + - + + + - + + + > - : + : - : + : - : + : - : + : - : + : - + + + - - + + + + - + + + - + + + - + + + > - : + : - : + : - : + : - : + : $t_filter_cols ) { @@ -1133,10 +1166,11 @@ ?> - + + - + + - + - + + + + + + + + '; - $t_fields .= ''; + $t_fields .= ''; $t_fields .= string_display( lang_get_defaulted( $t_accessible_custom_fields_names[$i] ) ); $t_fields .= ' '; } $t_output = ''; $t_any_found = false; - $t_values .= ' ' ; + $t_values .= ' ' ; if ( !isset( $t_filter['custom_fields'][$t_accessible_custom_fields_ids[$i]] ) ) { $t_values .= lang_get( 'any' ); } else { @@ -1248,6 +1291,7 @@ } $t_output = $t_output . $t_this_string; + $t_values .= ''; } if ( true == $t_any_found ) { @@ -1735,4 +1779,306 @@ return $p_filter_arr; } + + + /** + * The following functions each print out an individual filter field. + * They are derived from view_filters_page.php + * + * The functions follow a strict naming convention: + * + * print_filter_[filter_name] + * + * Where [filter_name] is the same as the "name" of the form element for + * that filter. This naming convention is depended upon by the controller + * at the end of the script. + */ + /** + * I expect that this code could be made simpler by refactoring into a + * class so as to avoid all those calls to global(which are pretty ugly) + * + * These functions could also be shared by view_filters_page.php + * + */ + function print_filter_reporter_id(){ + global $t_select_modifier, $t_filter; + ?> + + + + + + + + +
/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ : + + "; + print_month_option_list( $t_filter['start_month'] ); + print "\n"; + } + if ( strcasecmp( $t_char, "D" ) == 0 ) { + print "\n"; + } + if ( strcasecmp( $t_char, "Y" ) == 0 ) { + print "\n"; + } + } + ?> +
+ : + + "; + print_month_option_list( $t_filter['end_month'] ); + print "\n"; + } + if ( strcasecmp( $t_char, "D" ) == 0 ) { + print "\n"; + } + if ( strcasecmp( $t_char, "Y" ) == 0 ) { + print "\n"; + } + } + ?> +
+ + + unknown custom filter (custom ) + + '; + echo ''; + echo ''; + foreach( $t_accessible_custom_fields_values[$j] as $t_item ) { + if ( ( strtolower( $t_item ) != "any" ) && ( trim( $t_item ) != "" ) ) { + echo '' . "\n"; + } + } + echo ''; + } + + } + ?>