Skip to content

Commit

Permalink
don't overlap 'click to reset' with long human conditions message
Browse files Browse the repository at this point in the history
  • Loading branch information
scambra committed Dec 16, 2024
1 parent a9ad40b commit e92ba75
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Support separators in action links
- Support :popup position, using jquery-ui dialog, but can be replaced with other library overriding ActiveScaffold.open_popup and ActiveScaffold.close_popup JS functions
- Use column.label in human conditions, same as form
- Don't overlap 'click to reset' with long human conditions message

= 3.7.10
- Move code from on_create.js.erb to partials, so it's easier to change parts, e.g. how new record is rendered
Expand Down
13 changes: 9 additions & 4 deletions app/assets/stylesheets/active_scaffold_layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,12 @@ padding: 4px;
text-align: center;
position: relative;
}
.active-scaffold .filtered-message {
display: flex;
}
.active-scaffold .filtered-message > * {
flex-grow: 1;
}

.active-scaffold .message, .active-scaffold-component .message {
font-size: 11px;
Expand All @@ -512,10 +518,9 @@ display: inline;
}

.active-scaffold .filtered-message .reset {
position: absolute;
display: inline;
right: 10px;
top: 4px;
margin-right: 5px;
white-space: nowrap;
flex-grow: 0;
padding: 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<%= content_tag :div, class: 'filtered-message',
style: ('display:none;' unless @filtered),
data: ({search: search_params || ''} if active_scaffold_config.store_user_settings && respond_to?(:search_params)) do %>
<%= @filtered.is_a?(Array) ? render(:partial => 'human_conditions', :locals => {:columns => @filtered}) : as_(active_scaffold_config.list.filtered_message) %>
<div><%= @filtered.is_a?(Array) ? render(:partial => 'human_conditions', :locals => {:columns => @filtered}) : as_(active_scaffold_config.list.filtered_message) %></div>
<% if active_scaffold_config.list.show_search_reset && @filtered -%>
<div class="reset">
<%= loading_indicator_tag(:action => :record, :id => nil) %>
Expand Down

0 comments on commit e92ba75

Please sign in to comment.