Skip to content

Commit

Permalink
Feature TICKET 7476: Test Spec Filters - Adding CHOSEN Select + Alway…
Browse files Browse the repository at this point in the history
…s advanced mode
  • Loading branch information
fmancardi committed Mar 19, 2016
1 parent f516cc1 commit 3e9c50c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 37 deletions.
42 changes: 21 additions & 21 deletions gui/templates/inc_filter_panel.tpl
Expand Up @@ -4,7 +4,7 @@
*
* Shows the filter panel. Included by some other templates.
* At the moment: planTCNavigator, execNavigator, planAddTCNavigator, tcTree.
* Inspired by idea in discussion regarding BUGID 3301.
* Inspired by idea in discussion regarding TICKET 3301.
*
* Naming conventions for variables are based on the names
* used in plan/planTCNavigator.tpl.
Expand Down Expand Up @@ -194,7 +194,7 @@
{$labels.caption_nav_filters}
</div>

<div id="filters" class="x-panel-body exec_additional_info" style="padding-top: 3px;">
<div id="filters" class="x-panel-body exec_additional_info" style="padding-top: 3px;overflow: visible;">

<table class="smallGrey" style="width:98%;">

Expand Down Expand Up @@ -224,7 +224,7 @@
<tr>
<td>{$labels.testsuite}</td>
<td>
<select name="filter_toplevel_testsuite">
<select class="chosen-select" name="filter_toplevel_testsuite">
{html_options options=$control->filters.filter_toplevel_testsuite.items
selected=$control->filters.filter_toplevel_testsuite.selected}
</select>
Expand All @@ -235,7 +235,7 @@
{if $control->filters.filter_keywords}
<tr>
<td>{$labels.keyword}</td>
<td><select name="filter_keywords[]"
<td><select class="chosen-select" name="filter_keywords[]"
title="{$labels.keywords_filter_help}"
multiple="multiple"
size="{$control->filters.filter_keywords.size}">
Expand Down Expand Up @@ -269,7 +269,7 @@
<tr>
<td>{$labels.status}</td>
<td>
<select id="filter_workflow_status"
<select class="chosen-select" id="filter_workflow_status"
{if $control->advanced_filter_mode}
name="filter_workflow_status[]" multiple="multiple"
size="{$control->filter_item_quantity}">
Expand All @@ -287,7 +287,7 @@
<tr>
<td>{$labels.importance}</td>
<td>
<select id="filter_importance"
<select class="chosen-select" id="filter_importance"
{if $control->advanced_filter_mode}
name="filter_importance[]" multiple="multiple"
size="{$control->filters.filter_importance.size}">
Expand All @@ -305,7 +305,7 @@
<tr>
<td>{$labels.priority}</td>
<td>
<select name="filter_priority">
<select class="chosen-select" name="filter_priority">
<option value="">{$control->option_strings.any}</option>
{html_options options=$gsmarty_option_importance
selected=$control->filters.filter_priority.selected}
Expand All @@ -318,7 +318,7 @@
<tr>
<td>{$labels.execution_type}</td>
<td>
<select name="filter_execution_type">
<select class="chosen-select" name="filter_execution_type">
{html_options options=$control->filters.filter_execution_type.items
selected=$control->filters.filter_execution_type.selected}
</select>
Expand All @@ -332,15 +332,15 @@
<td>

{if $control->advanced_filter_mode}
<select name="filter_assigned_user[]"
<select class="chosen-select" name="filter_assigned_user[]"
id="filter_assigned_user"
multiple="multiple"
size="{$control->filter_item_quantity}" >
{html_options options=$control->filters.filter_assigned_user.items
selected=$control->filters.filter_assigned_user.selected}
</select>
{else}
<select name="filter_assigned_user"
<select class="chosen-select" name="filter_assigned_user"
id="filter_assigned_user"
onchange="javascript: triggerAssignedBox('filter_assigned_user',
'filter_assigned_user_include_unassigned',
Expand Down Expand Up @@ -397,7 +397,7 @@
<tr>
<td>{$labels.filter_result}</td>
<td>
<select id="filter_result_result"
<select class="chosen-select" id="filter_result_result"
{if $control->advanced_filter_mode}
name="filter_result_result[]" multiple="multiple"
size="{$control->filter_item_quantity}">
Expand All @@ -413,7 +413,7 @@
<tr>
<td>{$labels.filter_on}</td>
<td>
<select name="filter_result_method" id="filter_result_method"
<select class="chosen-select" name="filter_result_method" id="filter_result_method"
onchange="javascript: triggerBuildChooser('filter_result_build_row',
'filter_result_method',
{$control->configuration->filter_methods.status_code.specific_build});">
Expand All @@ -425,7 +425,7 @@

<tr id="filter_result_build_row">
<td>{$labels.build}</td>
<td><select id="filter_result_build" name="filter_result_build">
<td><select class="chosen-select" id="filter_result_build" name="filter_result_build">
{html_options options=$control->filters.filter_result.filter_result_build.items
selected=$control->filters.filter_result.filter_result_build.selected}
</select>
Expand Down Expand Up @@ -549,13 +549,13 @@
<tr>
<td>{$labels.status}</td>
<td>
<select class="chosen-select" id="filter_status"
{if $control->advanced_filter_mode}
<select id="filter_status"
name="filter_status[]"
multiple="multiple"
size="{$control->filter_item_quantity}" >
{else}
<select id="filter_status" name="filter_status">
name="filter_status">
{/if}
{html_options options=$control->filters.filter_status.items
selected=$control->filters.filter_status.selected}
Expand All @@ -569,13 +569,13 @@
<tr>
<td>{$labels.req_type}</td>
<td>
<select class="chosen-select" id="filter_type"
{if $control->advanced_filter_mode}
<select id="filter_type"
name="filter_type[]"
multiple="multiple"
size="{$control->filter_item_quantity}" >
{else}
<select id="filter_type" name="filter_type">
name="filter_type">
{/if}
{html_options options=$control->filters.filter_type.items
selected=$control->filters.filter_type.selected}
Expand All @@ -588,13 +588,13 @@
<tr>
<td>{$labels.req_spec_type}</td>
<td>
<select class="chosen-select" id="filter_spec_type"
{if $control->advanced_filter_mode}
<select id="filter_spec_type"
name="filter_spec_type[]"
multiple="multiple"
size="{$control->filter_item_quantity}" >
{else}
<select id="filter_spec_type" name="filter_spec_type">
name="filter_spec_type">
{/if}
{html_options options=$control->filters.filter_spec_type.items
selected=$control->filters.filter_spec_type.selected}
Expand All @@ -618,13 +618,13 @@
<tr>
<td>{$labels.has_relation_type}</td>
<td>
<select class="chosen-select" id="filter_relation"
{if $control->advanced_filter_mode}
<select id="filter_relation"
name="filter_relation[]"
multiple="multiple"
size="{$control->filter_item_quantity}" >
{else}
<select id="filter_relation" name="filter_relation">
name="filter_relation">
{/if}
{html_options options=$control->filters.filter_relation.items
selected=$control->filters.filter_relation.selected}
Expand Down
16 changes: 0 additions & 16 deletions lib/functions/tlTestCaseFilterControl.class.php
Expand Up @@ -383,8 +383,6 @@ public function __destruct()
*/
protected function read_config()
{
file_put_contents('/development/var/tracer.log',"\n" . __METHOD__,FILE_APPEND);

// some configuration reading already done in parent class
parent::read_config();

Expand Down Expand Up @@ -413,14 +411,6 @@ protected function read_config()
break;
}



/*
$this->advanced_filter_mode = ($this->filter_mode_choice_enabled &&
$this->args->advanced_filter_mode &&
!$this->args->simple_filter_mode);
*/
return tl::OK;
} // end of method

Expand Down Expand Up @@ -1970,12 +1960,6 @@ private function init_filter_workflow_status()
if (!$selection || $this->args->reset_filters)
{
$selection = null;
$cfx = $this->configuration->{$key . "_values"};
if( !is_null($cfx) )
{
$selection = (array)$cfx;
$this->do_filtering = true;
}
}
else
{
Expand Down

0 comments on commit 3e9c50c

Please sign in to comment.