From aa9f25bfead25313f9f2f7699a8c09cbdb412191 Mon Sep 17 00:00:00 2001 From: noackorama <noackorama@gmail.com> Date: Sun, 12 Jul 2015 11:13:44 +0200 Subject: [PATCH] fix sorter --- assets/studiptable.js | 3 +++ views/presenting/details.php | 4 ++-- views/presenting/overview_list.php | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/assets/studiptable.js b/assets/studiptable.js index cb8c480..51b5e2d 100644 --- a/assets/studiptable.js +++ b/assets/studiptable.js @@ -82,6 +82,9 @@ STUDIP.table = function (element, opt) { } else if (sortType === 'int') { sort1 = parseFloat('0' + $(a).find('td:nth-child(' + headerIndex + ')').text().trim()); sort2 = parseFloat('0' + $(b).find('td:nth-child(' + headerIndex + ')').text().trim()); + } else if (sortType === 'sorter') { + sort1 = parseFloat('0' + $(a).find('td:nth-child(' + headerIndex + ')').data('sorter')); + sort2 = parseFloat('0' + $(b).find('td:nth-child(' + headerIndex + ')').data('sorter')); } else { sort1 = $(a).find('td:nth-child(' + headerIndex + ')').text().trim().toLowerCase(); sort2 = $(b).find('td:nth-child(' + headerIndex + ')').text().trim().toLowerCase(); diff --git a/views/presenting/details.php b/views/presenting/details.php index d72ae79..e40ed80 100644 --- a/views/presenting/details.php +++ b/views/presenting/details.php @@ -18,10 +18,10 @@ if ($icon) { <div> <?= htmlReady($marketplugin['short_description']) ?> </div> -<?if ($marketplugin['description'] || $marketplugin['long_description']) : ?> +<?if ($marketplugin['description']) : ?> <div> <br> - <?= formatReady($marketplugin['description'] ?: $marketplugin['long_description']) ?> + <?= formatReady($marketplugin['description']) ?> </div> <? endif ?> <? if (count($marketplugin->images) > 0 || $marketplugin->isWritable()) : ?> diff --git a/views/presenting/overview_list.php b/views/presenting/overview_list.php index 7f4c65a..feb38b6 100644 --- a/views/presenting/overview_list.php +++ b/views/presenting/overview_list.php @@ -10,7 +10,7 @@ <th data-sort-type="int"> <?= _('Standorte') ?> </th> - <th data-sort-type="int"> + <th data-sort-type="sorter"> <?= _('Letzte �nderung') ?> </th> <th data-sort-type="int"> @@ -32,7 +32,7 @@ <td> <?= htmlReady($marketplugin->uses->count()) ?> </td> - <td> + <td data-sorter="<?= $marketplugin->releases->orderBy('chdate DESC')->first()->chdate ?>"> <?= strftime('%x', $marketplugin->releases->orderBy('chdate DESC')->first()->chdate) ?> </td> <td> -- GitLab