0003-Use-icon-icon-classes-for-sort-elements.patch

Marius BALTEANU, 2019-05-29 23:36

Download (2.54 KB)

View differences:

app/helpers/queries_helper.rb
171 171
      css, order = nil, column.default_order
172 172
      if column.name.to_s == query.sort_criteria.first_key
173 173
        if query.sort_criteria.first_asc?
174
          css = 'sort asc'
174
          css = 'sort asc icon icon-sorted-desc'
175 175
          order = 'desc'
176 176
        else
177
          css = 'sort desc'
177
          css = 'sort desc icon icon-sorted-asc'
178 178
          order = 'asc'
179 179
        end
180 180
      end
app/helpers/sort_helper.rb
160 160
    end
161 161
  end
162 162
end
163

  
public/stylesheets/application.css
365 365
tr.builtin td.name {font-style:italic;}
366 366

  
367 367
a.sort { padding-right: 16px; background-position: 100% 50%; background-repeat: no-repeat; }
368
a.sort.asc  { background-image: url(../images/arrow_up.png); }
369
a.sort.desc { background-image: url(../images/arrow_down.png); }
370 368

  
371 369
table.boards a.board { background: url(../images/comment.png) no-repeat 0% 50%; padding-left: 20px; }
372 370
table.boards td.last-message {text-align:left;font-size:80%;}
......
1502 1500
.icon-collapsed { background-image: url(../images/arrow_right.png); }
1503 1501
.icon-bookmark { background-image: url(../images/tag_blue_delete.png); }
1504 1502
.icon-bookmark-off { background-image: url(../images/tag_blue_add.png); }
1503
.icon-sorted-asc { background-image: url(../images/arrow_down.png); }
1504
.icon-sorted-desc { background-image: url(../images/arrow_up.png); }
1505 1505

  
1506 1506
.icon-file { background-image: url(../images/files/default.png); }
1507 1507
.icon-file.text-plain { background-image: url(../images/files/text.png); }
1508
-