Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions app/views/workflows/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<table class="list workflows transitions transitions-<%= name %>">
<thead>
<tr>
<th>
<tr class='fixed-row'>
<th class='fixed-column'>
<%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input[type=checkbox]:not(:disabled)')",
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
:class => 'no-tooltip icon-only icon-checked') %>
<%=l(:label_current_status)%>
</th>
<th colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th>
</tr>
<tr>
<td></td>
<tr class='fixed-row status'>
<td class='fixed-column'></td>
<% for new_status in @statuses %>
<td style="width:<%= 75 / @statuses.size %>%;">
<%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input[type=checkbox]:not(:disabled).new-status-#{new_status.id}')",
Expand All @@ -26,7 +26,7 @@
<% for old_status in [nil] + @statuses %>
<% next if old_status.nil? && name != 'always' %>
<tr>
<td class="name">
<td class="name fixed-column">
<%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input[type=checkbox]:not(:disabled).old-status-#{old_status.try(:id) || 0}')",
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
:class => 'no-tooltip icon-only icon-checked') %>
Expand Down
40 changes: 20 additions & 20 deletions app/views/workflows/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,28 @@

<% if @trackers && @roles && @statuses.any? %>
<%= form_tag workflows_path, method: :patch, id: 'workflow_form' do %>
<%= @trackers.map {|tracker| hidden_field_tag 'tracker_id[]', tracker.id, :id => nil}.join.html_safe %>
<%= @roles.map {|role| hidden_field_tag 'role_id[]', role.id, :id => nil}.join.html_safe %>
<%= hidden_field_tag 'used_statuses_only', params[:used_statuses_only], :id => nil %>
<div class="autoscroll">
<div class="sticky-table-wrapper">
<%= @trackers.map {|tracker| hidden_field_tag 'tracker_id[]', tracker.id, :id => nil}.join.html_safe %>
<%= @roles.map {|role| hidden_field_tag 'role_id[]', role.id, :id => nil}.join.html_safe %>
<%= hidden_field_tag 'used_statuses_only', params[:used_statuses_only], :id => nil %>
<%= render :partial => 'form', :locals => {:name => 'always', :workflows => @workflows['always']} %>

<fieldset class="collapsible" style="padding: 0; margin-top: 0.5em;">
<legend onclick="toggleFieldset(this);" class="icon icon-collapsed"><%= l(:label_additional_workflow_transitions_for_author) %></legend>
<div id="author_workflows" style="margin: 0.5em 0 0.5em 0;">
<%= render :partial => 'form', :locals => {:name => 'author', :workflows => @workflows['author']} %>
</div>
</fieldset>
<%= javascript_tag "hideFieldset($('#author_workflows'))" unless @workflows['author'].present? %>

<fieldset class="collapsible" style="padding: 0;">
<legend onclick="toggleFieldset(this);" class="icon icon-collapsed"><%= l(:label_additional_workflow_transitions_for_assignee) %></legend>
<div id="assignee_workflows" style="margin: 0.5em 0 0.5em 0;">
<%= render :partial => 'form', :locals => {:name => 'assignee', :workflows => @workflows['assignee']} %>
</div>
</fieldset>
<%= javascript_tag "hideFieldset($('#assignee_workflows'))" unless @workflows['assignee'].present? %>
</div>

<fieldset class="collapsible" style="padding: 0; margin-top: 0.5em;">
<legend onclick="toggleFieldset(this);" class="icon icon-collapsed"><%= l(:label_additional_workflow_transitions_for_author) %></legend>
<div id="author_workflows" class="sticky-table-wrapper" style="margin: 0.5em 0 0.5em 0;">
<%= render :partial => 'form', :locals => {:name => 'author', :workflows => @workflows['author']} %>
</div>
</fieldset>
<%= javascript_tag "hideFieldset($('#author_workflows'))" unless @workflows['author'].present? %>

<fieldset class="collapsible" style="padding: 0;">
<legend onclick="toggleFieldset(this);" class="icon icon-collapsed"><%= l(:label_additional_workflow_transitions_for_assignee) %></legend>
<div id="assignee_workflows" class="sticky-table-wrapper" style="margin: 0.5em 0 0.5em 0;">
<%= render :partial => 'form', :locals => {:name => 'assignee', :workflows => @workflows['assignee']} %>
</div>
</fieldset>
<%= javascript_tag "hideFieldset($('#assignee_workflows'))" unless @workflows['assignee'].present? %>
<%= submit_tag l(:button_save) %>
<% end %>
<% end %>
31 changes: 17 additions & 14 deletions app/views/workflows/permissions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@
<%= @trackers.map {|tracker| hidden_field_tag 'tracker_id[]', tracker.id, :id => nil}.join.html_safe %>
<%= @roles.map {|role| hidden_field_tag 'role_id[]', role.id, :id => nil}.join.html_safe %>
<%= hidden_field_tag 'used_statuses_only', params[:used_statuses_only], :id => nil %>
<div class="autoscroll">
<div class="sticky-table-wrapper">
<table class="list workflows fields_permissions">
<thead>
<tr>
<th>
<tr class='fixed-row'>
<th class='fixed-column'>
<%=l(:label_issue_status)%>
</th>
<th colspan="<%= @statuses.length %>"><%=l(:label_issue_status)%></th>
<th colspan="<%= @statuses.length %>"></th>
</tr>
<tr>
<td></td>
<tr class='fixed-row status'>
<td class='fixed-column'></td>
<% for status in @statuses %>
<td style="width:<%= 75 / @statuses.size %>%;">
<%= status.name %>
Expand All @@ -52,15 +53,16 @@
</tr>
</thead>
<tbody>
<tr class="group open">
<td colspan="<%= @statuses.size + 1 %>">
<span class="expander icon icon-expanded" onclick="toggleRowGroup(this);">&nbsp;</span>
<tr class="group open fixed-row">
<td class='fixed-column'>
<span class="expander icon icon-expanded" onclick="toggleRowGroup(this);">&nbsp;</span>
<%= l(:field_core_fields) %>
</td>
<td colspan="<%= @statuses.size %>"></td>
</tr>
<% @fields.each do |field, name| %>
<tr>
<td class="name">
<td class="name fixed-column">
<%= name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %>
</td>
<% for status in @statuses -%>
Expand All @@ -72,15 +74,16 @@
</tr>
<% end %>
<% if @custom_fields.any? %>
<tr class="group open">
<td colspan="<%= @statuses.size + 1 %>">
<span class="expander icon icon-expanded" onclick="toggleRowGroup(this);">&nbsp;</span>
<tr class="group open fixed-row">
<td class='fixed-column'>
<span class="expander icon icon-expended" onclick="toggleRowGroup(this);">&nbsp;</span>
<%= l(:label_custom_field_plural) %>
</td>
<td colspan="<%= @statuses.size %>"></td>
</tr>
<% @custom_fields.each do |field| %>
<tr>
<td class="name">
<td class="name fixed-column">
<%= field.name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %>
</td>
<% for status in @statuses -%>
Expand Down
76 changes: 76 additions & 0 deletions public/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,80 @@ ul.properties li span {font-style:italic;}

#workflow_copy_form select { width: 200px; }
table.transitions td.enabled {background: #bfb;}
@media screen {
table.fields_permissions td {
min-width: 100px;
}
table.transitions td {
min-width: 50px;
}
body.controller-issues div.autoscroll,
.sticky-table-wrapper {
max-height: 500px;
}
}

body.controller-issues div.autoscroll,
.sticky-table-wrapper {
table-layout: fixed;
overflow-x: auto;
margin-bottom: 1.2em;
position: relative;
}

body.controller-issues div.autoscroll table.issues,
.sticky-table-wrapper table {
overflow-y: scroll;
overflow-x: scroll;
}
body.controller-issues div.autoscroll table.issues thead tr td,
body.controller-issues div.autoscroll table.issues thead tr th,
.sticky-table-wrapper table tr.fixed-row td, .sticky-table-wrapper table tr.fixed-row th {
position: -webkit-sticky;
position: sticky;
top: 0px;
z-index: 10;
}
.sticky-table-wrapper table td.fixed-column, .sticky-table-wrapper table th.fixed-column {
position: -webkit-sticky;
position: sticky;
left: 0px;
z-index: 9;
border-right: 1px solid #dfe8f1;
}
.sticky-table-wrapper table.workflows tr.fixed-row.status td {
top: 23px;
background-color: #fff;
}
.sticky-table-wrapper table.fields_permissions tr.fixed-row.group td {
top: 40px;
background-color: #fff;
border-top: 1px solid #dfe8f1;
}
.sticky-table-wrapper table.transitions tr.fixed-row.status td:not(.fixed-column) {
border-bottom: 1px solid #dfe8f1;
}
.sticky-table-wrapper table.workflows thead tr td.fixed-column, .sticky-table-wrapper table.workflows thead tr th.fixed-column {
z-index: 11;
white-space: nowrap;
}
.sticky-table-wrapper table.fields_permissions tr.fixed-row.group td.fixed-column {
z-index: 11;
white-space: nowrap;
border-right: none;
background-color: #fff;
}
.sticky-table-wrapper table tbody td.fixed-column, .sticky-table-wrapper table tbody th.fixed-column {
background-color: #fff;
}
.sticky-table-wrapper table.workflows tr:nth-child(odd) td.fixed-column {
background-color: #f6f7f8;
}
/* Only Safari */
_::-webkit-full-page-media, _:future, :root .sticky-table-wrapper table.fields_permissions tr.fixed-row.group td {
top: 0px;
}

#workflow_form table select {font-size:90%; max-width:100px;}
table.fields_permissions td.readonly {background:#ddd;}
table.fields_permissions td.required {background:#d88;}
Expand Down Expand Up @@ -1819,6 +1893,8 @@ img.filecontent.image {background-image: url(../images/transparent.png);}
#wiki_add_attachment { display:none; }
.hide-when-print, .pagination ul.pages, .pagination .per-page { display: none !important; }
.autoscroll {overflow-x: visible;}
body.controller-issues div.autoscroll table.issues,
.sticky-table-wrapper table { overflow-x: visible; overflow-y: visible; }
table.list {margin-top:0.5em;}
table.list th, table.list td {border: 1px solid #aaa;}
}
Expand Down