Patch #31433 » 0001-Use-the-regular-icon-icon-classes-for-sort-handler.patch
| app/helpers/application_helper.rb | ||
|---|---|---|
| 570 | 570 |
:reorder_param => options[:param] || object.class.name.underscore |
| 571 | 571 |
} |
| 572 | 572 |
content_tag('span', '',
|
| 573 |
:class => "sort-handle", |
|
| 573 |
:class => "icon-only icon-sort-handle sort-handle",
|
|
| 574 | 574 |
:data => data, |
| 575 | 575 |
:title => l(:button_sort)) |
| 576 | 576 |
end |
| app/helpers/my_helper.rb | ||
|---|---|---|
| 34 | 34 |
def render_block(block, user) |
| 35 | 35 |
content = render_block_content(block, user) |
| 36 | 36 |
if content.present? |
| 37 |
handle = content_tag('span', '', :class => 'sort-handle', :title => l(:button_move))
|
|
| 37 |
handle = content_tag('span', '', :class => 'icon-only icon-sort-handle sort-handle', :title => l(:button_move))
|
|
| 38 | 38 |
close = link_to(l(:button_delete), |
| 39 | 39 |
{:action => "remove_block", :block => block},
|
| 40 |
:remote => true, :method => 'post',
|
|
| 40 |
:remote => true, :method => 'post', |
|
| 41 | 41 |
:class => "icon-only icon-close", :title => l(:button_delete)) |
| 42 | 42 |
content = content_tag('div', handle + close, :class => 'contextual') + content
|
| 43 | 43 | |
| app/views/custom_field_enumerations/index.html.erb | ||
|---|---|---|
| 6 | 6 |
<ul id="custom_field_enumerations" class="flat"> |
| 7 | 7 |
<% @custom_field.enumerations.each_with_index do |value, position| %> |
| 8 | 8 |
<li> |
| 9 |
<span class="sort-handle"></span> |
|
| 9 |
<span class="icon-only icon-sort-handle sort-handle"></span>
|
|
| 10 | 10 |
<%= hidden_field_tag "custom_field_enumerations[#{value.id}][position]", position, :class => 'position' %>
|
| 11 | 11 |
<%= text_field_tag "custom_field_enumerations[#{value.id}][name]", value.name, :size => 40 %>
|
| 12 | 12 |
<%= hidden_field_tag "custom_field_enumerations[#{value.id}][active]", 0 %>
|
| public/stylesheets/application.css | ||
|---|---|---|
| 1497 | 1497 |
.icon-add-bullet { background-image: url(../images/bullet_add.png); }
|
| 1498 | 1498 |
.icon-shared { background-image: url(../images/link.png); }
|
| 1499 | 1499 |
.icon-actions { background-image: url(../images/3_bullets.png); }
|
| 1500 |
.icon-sort-handle { background-image: url(../images/reorder.png); }
|
|
| 1500 | 1501 | |
| 1501 | 1502 |
.icon-file { background-image: url(../images/files/default.png); }
|
| 1502 | 1503 |
.icon-file.text-plain { background-image: url(../images/files/text.png); }
|
| ... | ... | |
| 1517 | 1518 |
.icon-file.application-zip { background-image: url(../images/files/zip.png); }
|
| 1518 | 1519 |
.icon-file.application-x-gzip { background-image: url(../images/files/zip.png); }
|
| 1519 | 1520 | |
| 1520 |
.sort-handle { width:16px; height:16px; background:url(../images/reorder.png) no-repeat 0 50%; cursor:move; }
|
|
| 1521 |
.sort-handle { cursor:move; }
|
|
| 1521 | 1522 |
.sort-handle.ajax-loading { background-image: url(../images/loading.gif); }
|
| 1522 | 1523 |
tr.ui-sortable-helper { border:1px solid #e4e4e4; }
|
| 1523 | 1524 | |