Fix sorted icons placement
- Move icons to the header of the row. By this way they will play nicely with custom admin themes (like djangocms-admin-style). - Also fix icons for Django 1.5 (now the admin looks the same as with Django >= 1.6)
This commit is contained in:
@@ -2,24 +2,7 @@
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.sortable .inline-related .module.aligned .fa,
|
||||
.sortable .inline-related h3 .fa,
|
||||
.sortable.inline-group .module .fa {
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.sortable .inline-related .module.aligned .fa {
|
||||
margin: 5px 10px 0 0;
|
||||
}
|
||||
|
||||
.sortable .inline-related.flat-admin .module.aligned .fa {
|
||||
margin: 9px 10px 0 0;
|
||||
}
|
||||
|
||||
.sortable.inline-group .module .fa {
|
||||
margin: 26px -10px 0 10px;
|
||||
}
|
||||
|
||||
.sortable.inline-group.flat-admin .module .fa {
|
||||
margin: 34px -10px 0 10px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
success: function() {
|
||||
var fieldsets = ui.item.find('fieldset'),
|
||||
highlightedSelector = fieldsets.filter('.collapsed').length === fieldsets.length ? 'h3' : '.form-row',
|
||||
icons = ui.item.parent().find(highlightedSelector).find('.fa');
|
||||
icons = ui.item.parent().find('h3 > .fa');
|
||||
|
||||
// set icons based on position
|
||||
icons.removeClass('fa-sort-desc fa-sort-asc fa-sort');
|
||||
|
||||
Reference in New Issue
Block a user