Project

General

Profile

Defect #43714 ยป 0001-Fix-misleading-arrow-buttons-for-Available-Selected-.patch

Go MAEDA, 2026-01-25 09:48

View differences:

app/assets/images/icons.svg
<path d="M14 7l6 0"/>
<path d="M17 4l0 6"/>
</symbol>
<symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--arrow-narrow-left">
<path d="M5 12l14 0"/>
<path d="M5 12l4 4"/>
<path d="M5 12l4 -4"/>
</symbol>
<symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--arrow-narrow-right">
<path d="M5 12l14 0"/>
<path d="M15 16l4 -4"/>
<path d="M15 8l4 4"/>
</symbol>
<symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--arrow-right">
<path d="M4 9h8v-3.586a1 1 0 0 1 1.707 -.707l6.586 6.586a1 1 0 0 1 0 1.414l-6.586 6.586a1 1 0 0 1 -1.707 -.707v-3.586h-8a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1z"/>
</symbol>
app/assets/stylesheets/application.css
.query-columns label {
display:block;
}
#list-definition .buttons input[type=button] {
#list-definition .buttons button {
inline-size:35px;
display:block;
}
app/views/queries/_columns.html.erb
:ondblclick => "moveOptions(this.form.#{available_tag_id}, this.form.#{selected_tag_id});" %>
</div>
<div class="buttons">
<input type="button" value="&#8594;" class="move-right"
onclick="moveOptions(this.form.<%= available_tag_id %>, this.form.<%= selected_tag_id %>);" />
<input type="button" value="&#8592;" class="move-left"
onclick="moveOptions(this.form.<%= selected_tag_id %>, this.form.<%= available_tag_id %>);" />
<button type="button" class="move-right" onclick="moveOptions(this.form.<%= available_tag_id %>, this.form.<%= selected_tag_id %>);"><%= sprite_icon("arrow-narrow-right", rtl: true) %></button>
<button type="button" class="move-left" onclick="moveOptions(this.form.<%= selected_tag_id %>, this.form.<%= available_tag_id %>);"><%= sprite_icon("arrow-narrow-left", rtl: true) %></button>
</div>
<div class="query-columns">
<%= label_tag selected_tag_id, l(:description_selected_columns) %>
......
:ondblclick => "moveOptions(this.form.#{selected_tag_id}, this.form.#{available_tag_id});" %>
</div>
<div class="buttons">
<input type="button" value="&#8648;" onclick="moveOptionTop(this.form.<%= selected_tag_id %>);" />
<input type="button" value="&#8593;" onclick="moveOptionUp(this.form.<%= selected_tag_id %>);" />
<input type="button" value="&#8595;" onclick="moveOptionDown(this.form.<%= selected_tag_id %>);" />
<input type="button" value="&#8650;" onclick="moveOptionBottom(this.form.<%= selected_tag_id %>);" />
<button type="button" onclick="moveOptionTop(this.form.<%= selected_tag_id %>);">&#8648;</button>
<button type="button" onclick="moveOptionUp(this.form.<%= selected_tag_id %>);">&#8593;</button>
<button type="button" onclick="moveOptionDown(this.form.<%= selected_tag_id %>);">&#8595;</button>
<button type="button" onclick="moveOptionBottom(this.form.<%= selected_tag_id %>);">&#8650;</button>
</div>
<%= javascript_tag do %>
config/icon_source.yml
svg: apps
- name: shield-check
svg: shield-check
- name: arrow-narrow-left
svg: arrow-narrow-left
- name: arrow-narrow-right
svg: arrow-narrow-right
test/system/timelog_test.rb
visit '/settings?tab=timelog'
# Remove a column
select 'Comment', :from => 'Selected Columns'
page.first('input[type=button].move-left').click
page.first('button.move-left').click
# Add a column
select 'Tracker', :from => 'Available Columns'
page.first('input[type=button].move-right').click
page.first('button.move-right').click
click_on 'Save'
assert_text 'Successful update.'
    (1-1/1)