Commit d76e2d6e authored by Marius Cramer's avatar Marius Cramer
Browse files

- re-added table sorting

parent bbb85a4e
......@@ -633,8 +633,18 @@ $(document).on('click', 'th[data-column]', function(e) {
var act = $el.attr('data-form-action');
var form = $el.attr('data-submit-form');
var dir = $self.attr('data-ordered');
act = act + '?orderby=' + column;
ISPConfig.submitForm(form, act);
$(document).ajaxComplete(function() {
var $self = $('#pageForm .table th[data-column="' + column + '"]');
$self.parent().children('th[data-column]').removeAttr('data-ordered');
if(dir && dir == 'asc') $self.attr('data-ordered', 'desc');
else $self.attr('data-ordered', 'asc');
});
}
});
......
......@@ -271,6 +271,37 @@ thead.dark th.tiny-col {
overflow: hidden;
text-overflow: ellipsis; }
thead.dark th[data-column] {
cursor: pointer;
}
thead.dark th[data-column][data-ordered] {
font-weight: bold;
position: relative;
}
thead.dark th[data-column][data-ordered]:before {
content: "";
display: block;
position: absolute;
right: 5px;
top: 16px;
width: 0;
height: 0;
vertical-align: middle;
border-bottom: 5px solid #fff;
border-top: 5px solid transparent;
border-right: 5px solid transparent;
border-left: 6px solid transparent;
line-height: inherit;
}
thead.dark th[data-column][data-ordered="desc"]:before {
top: 21px;
border-bottom: 5px solid transparent;
border-top: 5px solid #fff;
}
thead.dark td input,
thead.dark td select {
width: 100%; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment