Skip to content
Extraits de code Groupes Projets
Valider 828b1e0a rédigé par diosmosis's avatar diosmosis
Parcourir les fichiers

Show column as sorted, even if sort is disabled and do not show pointer cursor...

Show column as sorted, even if sort is disabled and do not show pointer cursor if sort is not enabled.
parent 29585f2d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -399,23 +399,23 @@ $.extend(DataTable.prototype, UIControl.prototype, {
self.onClickSort(this);
}
);
}
if (self.param.filter_sort_column != '') {
// are we in a subdatatable?
var currentIsSubDataTable = $(domElem).parent().hasClass('cellSubDataTable');
var imageSortSrc = getSortImageSrc();
var imageSortWidth = 16;
var imageSortHeight = 16;
var sortOrder = self.param.filter_sort_order;
var ImageSortClass = sortOrder.charAt(0).toUpperCase() + sortOrder.substr(1);
// we change the style of the column currently used as sort column
// adding an image and the class columnSorted to the TD
$(".sortable#" + self.param.filter_sort_column + ' #thDIV', domElem).parent()
.addClass('columnSorted')
.prepend('<div class="sortIconContainer sortIconContainer' + ImageSortClass + '"><img class="sortIcon" width="' + imageSortWidth + '" height="' + imageSortHeight + '" src="' + imageSortSrc + '" /></div>');
}
if (self.param.filter_sort_column != '') {
// are we in a subdatatable?
var currentIsSubDataTable = $(domElem).parent().hasClass('cellSubDataTable');
var imageSortSrc = getSortImageSrc();
var imageSortWidth = 16;
var imageSortHeight = 16;
var sortOrder = self.param.filter_sort_order;
var ImageSortClass = sortOrder.charAt(0).toUpperCase() + sortOrder.substr(1);
// we change the style of the column currently used as sort column
// adding an image and the class columnSorted to the TD
$("th#" + self.param.filter_sort_column + ' #thDIV', domElem).parent()
.addClass('columnSorted')
.prepend('<div class="sortIconContainer sortIconContainer' + ImageSortClass + '"><img class="sortIcon" width="' + imageSortWidth + '" height="' + imageSortHeight + '" src="' + imageSortSrc + '" /></div>');
}
},
......
<thead>
<tr>
{% for column in properties.columns_to_display %}
<th class="sortable {% if loop.first %}first{% elseif loop.last %}last{% endif %}" id="{{ column }}">
<th class="{% if properties.enable_sort %}sortable{% endif %} {% if loop.first %}first{% elseif loop.last %}last{% endif %}" id="{{ column }}">
{% if properties.metrics_documentation[column]|default is not empty %}
<div class="columnDocumentation">
<div class="columnDocumentationTitle">
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter