Skip to content

Commit

Permalink
Replace opHighlightCol with stimulus controller
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Aug 14, 2024
1 parent 04a202a commit 5b3f3a2
Show file tree
Hide file tree
Showing 57 changed files with 301 additions and 304 deletions.
4 changes: 2 additions & 2 deletions app/components/projects/table_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ See COPYRIGHT and LICENSE files for more details.
<div class="generic-table--flex-container">
<div class="generic-table--container <%= container_class %>">
<div class="generic-table--results-container">
<table class="generic-table" <%= table_id ? "id=\"#{table_id}\"".html_safe : '' %>>
<table class="generic-table" data-controller="table-highlighting" <%= table_id ? "id=\"#{table_id}\"".html_safe : '' %>>
<colgroup>
<% columns.each do |column| %>
<col <%= "opHighlightCol" unless column.attribute == :hierarchy %> >
<col>
<% end %>
<col>
</colgroup>
Expand Down
4 changes: 2 additions & 2 deletions app/components/table_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ See COPYRIGHT and LICENSE files for more details.

<div class="generic-table--container <%= container_class %>" data-test-selector="<%= test_selector %>">
<div class="generic-table--results-container">
<table class="generic-table">
<table class="generic-table" data-controller="table-highlighting">
<colgroup>
<% headers.each do |_name, _options| %>
<col opHighlightCol>
<col>
<% end %>
<col>
</colgroup>
Expand Down
8 changes: 4 additions & 4 deletions app/views/attribute_help_texts/_tab.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<% if entries.any? %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table class="generic-table">
<table class="generic-table" data-controller="table-highlighting">
<colgroup>
<col opHighlightCol>
<col opHighlightCol>
<col opHighlightCol>
<col>
<col>
<col>
<col>
</colgroup>
<thead>
Expand Down
8 changes: 4 additions & 4 deletions app/views/custom_fields/_custom_options.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ See COPYRIGHT and LICENSE files for more details.

<div class="generic-table--container">
<div class="generic-table--results-container">
<table class="generic-table" id="custom-options-table">
<table class="generic-table" id="custom-options-table" data-controller="table-highlighting">
<colgroup>
<col opHighlightCol>
<col opHighlightCol>
<col opHighlightCol>
<col>
<col>
<col>
<col>
</colgroup>
<thead>
Expand Down
14 changes: 7 additions & 7 deletions app/views/custom_fields/_tab.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ See COPYRIGHT and LICENSE files for more details.
</div>
</div>
<% end %>
<table class="generic-table">
<table class="generic-table" data-controller="table-highlighting">
<colgroup>
<col opHighlightCol>
<col opHighlightCol>
<col>
<col>
<% if tab[:name] == 'WorkPackageCustomField' %>
<col opHighlightCol>
<col opHighlightCol>
<col>
<col>
<% end %>
<col opHighlightCol>
<col opHighlightCol>
<col>
<col>
<col>
</colgroup>
<thead>
Expand Down
12 changes: 6 additions & 6 deletions app/views/forums/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ See COPYRIGHT and LICENSE files for more details.
<% else %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table class="generic-table boards">
<table class="generic-table boards" data-controller="table-highlighting">
<colgroup>
<col opHighlightCol>
<col opHighlightCol>
<col opHighlightCol>
<col opHighlightCol>
<col>
<col>
<col>
<col>
<% if User.current.allowed_in_project?(:manage_forums, @project) %>
<col opHighlightCol>
<col>
<col>
<% end %>
</colgroup>
Expand Down
12 changes: 6 additions & 6 deletions app/views/forums/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ See COPYRIGHT and LICENSE files for more details.
<% if @topics.any? %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table class="generic-table">
<table class="generic-table" data-controller="table-highlighting">
<colgroup>
<col opHighlightCol>
<col opHighlightCol>
<col opHighlightCol>
<col opHighlightCol>
<col opHighlightCol>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead>
<tr>
Expand Down
6 changes: 3 additions & 3 deletions app/views/groups/_memberships.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ See COPYRIGHT and LICENSE files for more details.
<% if @group.memberships.any? %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table class="generic-table memberships">
<table class="generic-table memberships" data-controller="table-highlighting">
<colgroup>
<col opHighlightCol>
<col opHighlightCol>
<col>
<col>
<col>
</colgroup>
<thead>
Expand Down
2 changes: 1 addition & 1 deletion app/views/groups/_users_table.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ See COPYRIGHT and LICENSE files for more details.

<table class="generic-table users">
<colgroup>
<col opHighlightCol>
<col colightCol>
<col>
</colgroup>
<thead>
Expand Down
6 changes: 3 additions & 3 deletions app/views/groups/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ See COPYRIGHT and LICENSE files for more details.
<% if @groups.any? %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table class="generic-table">
<table class="generic-table" data-controller="table-highlighting">
<colgroup>
<col opHighlightCol>
<col opHighlightCol>
<col>
<col>
<col>
</colgroup>
<thead>
Expand Down
4 changes: 2 additions & 2 deletions app/views/individual_principals/_memberships.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ See COPYRIGHT and LICENSE files for more details.
<div class="generic-table--results-container">
<table class="generic-table memberships">
<colgroup>
<col opHighlightCol>
<col opHighlightCol>
<col>
<col>
<%= call_individual_principals_memberships_hook(@individual_principal, 'colgroup') %>
<col>
</colgroup>
Expand Down
3 changes: 1 addition & 2 deletions app/views/my/access_token.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ See COPYRIGHT and LICENSE files for more details.
%>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table class="generic-table">
<table class="generic-table" data-controller="table-highlighting">
<%= call_hook(:view_access_tokens_table, user: @user) %>
</table>
</div>
</div>

Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ See COPYRIGHT and LICENSE files for more details.
<% if ical_tokens_grouped_by_query.any? %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table class="generic-table">
<table class="generic-table" data-controller="table-highlighting">
<%= render partial: "my/access_token_partials/token_table_header",
locals: {
locals: {
column_headers: [
t('attributes.name'),
WorkPackage.human_attribute_name(:calendar),
WorkPackage.human_attribute_name(:project),
User.human_attribute_name(:created_at),
t('my_account.access_tokens.headers.expiration')
]
}
]
}
%>
<tbody>
<% ical_tokens_grouped_by_query.each do |query_id, tokens| %>
Expand Down Expand Up @@ -103,5 +103,3 @@ See COPYRIGHT and LICENSE files for more details.
<% end %>
</div>
</div>


Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ See COPYRIGHT and LICENSE files for more details.
<% if granted_applications.any? %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table class="generic-table">
<table class="generic-table" data-controller="table-highlighting">
<%= render partial: "my/access_token_partials/token_table_header",
locals: {
locals: {
column_headers: [
t('attributes.name'),
t('attributes.name'),
User.human_attribute_name(:created_at),
t('my_account.access_tokens.headers.expiration')
]
}
]
}
%>
<tbody>
<% granted_applications.each do |application, tokens| %>
Expand Down
14 changes: 6 additions & 8 deletions app/views/my/access_token_partials/_rss_tokens_section.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ See COPYRIGHT and LICENSE files for more details.
<% if rss_token %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table class="generic-table">
<table class="generic-table" data-controller="table-highlighting">
<%= render partial: "my/access_token_partials/token_table_header",
locals: {
locals: {
column_headers: [
t('attributes.name'),
User.human_attribute_name(:created_at),
t('attributes.name'),
User.human_attribute_name(:created_at),
t('my_account.access_tokens.headers.expiration')
]
}
]
}
%>
<tbody>
<tr>
Expand Down Expand Up @@ -88,5 +88,3 @@ See COPYRIGHT and LICENSE files for more details.
<% end %>
</div>
</div>


Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ See COPYRIGHT and LICENSE files for more details.
<% if @storage_tokens.any? %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table class="generic-table">
<table class="generic-table" data-controller="table-highlighting">
<%= render partial: "my/access_token_partials/token_table_header",
locals: {
column_headers: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<colgroup>
<% column_headers&.length&.times do %>
<col opHighlightCol>
<col>
<% end %>
<col opHighlightCol>
<col>
</colgroup>
<thead>
<tr>
Expand All @@ -49,4 +49,4 @@ See COPYRIGHT and LICENSE files for more details.
</div>
</th>
</tr>
</thead>
</thead>
4 changes: 2 additions & 2 deletions app/views/principals/_global_roles.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ See COPYRIGHT and LICENSE files for more details.
<% else %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table class="generic-table principal_roles" id="table_principal_roles">
<table class="generic-table principal_roles" id="table_principal_roles" data-controller="table-highlighting">
<colgroup>
<col opHighlightCol>
<col>
<col>
</colgroup>
<thead>
Expand Down
6 changes: 3 additions & 3 deletions app/views/projects/settings/categories/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ See COPYRIGHT and LICENSE files for more details.
<% if @project.categories.any? %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table class="generic-table">
<table class="generic-table" data-controller="table-highlighting">
<colgroup>
<col opHighlightCol>
<col opHighlightCol>
<col>
<col>
<col>
</colgroup>
<thead>
Expand Down
8 changes: 4 additions & 4 deletions app/views/projects/settings/custom_fields/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ See COPYRIGHT and LICENSE files for more details.

<div class="generic-table--container">
<div class="generic-table--results-container">
<table class="generic-table">
<table class="generic-table" data-controller="table-highlighting">
<colgroup>
<col opHighlightCol>
<col opHighlightCol>
<col opHighlightCol>
<col>
<col>
<col>
</colgroup>
<thead>
<tr>
Expand Down
12 changes: 6 additions & 6 deletions app/views/projects/settings/types/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ See COPYRIGHT and LICENSE files for more details.

<div class="generic-table--container">
<div class="generic-table--results-container">
<table class="generic-table types">
<table class="generic-table types" data-controller="table-highlighting">
<colgroup>
<col opHighlightCol>
<col opHighlightCol>
<col opHighlightCol>
<col opHighlightCol>
<col opHighlightCol>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead>
<tr>
Expand Down
14 changes: 7 additions & 7 deletions app/views/repositories/_dir_list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table class="generic-table" data-repository-navigation-target="repoBrowser">
<table class="generic-table" data-controller="table-highlighting" data-repository-navigation-target="repoBrowser">
<colgroup>
<col opHighlightCol>
<col>
<col opHighlightCol>
<col opHighlightCol>
<col opHighlightCol>
<col opHighlightCol>
<col opHighlightCol>
<col>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead>
<tr id="root">
Expand Down
8 changes: 4 additions & 4 deletions app/views/repositories/_revisions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ See COPYRIGHT and LICENSE files for more details.
<div class="generic-table--results-container">
<table class="generic-table changesets">
<colgroup>
<col opHighlightCol>
<col>
<col>
<col opHighlightCol>
<col opHighlightCol>
<col opHighlightCol>
<col>
<col>
<col>
<col>
</colgroup>
<caption class="hidden-for-sighted">
<span>
Expand Down
Loading

0 comments on commit 5b3f3a2

Please sign in to comment.