From ed81201142ca2d47c652d91ed871687c8d64d8fa Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Sun, 15 Feb 2015 11:40:59 +0100 Subject: Added sorting indicators --- css/businessadmin.css | 4 ++++ include/assignments-overview.php | 10 +++++----- include/clients-overview.php | 6 +++--- include/contacts-overview.php | 6 +++--- js/businessadmin.js | 9 +++++---- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/css/businessadmin.css b/css/businessadmin.css index 3f8b06f..da70bf8 100644 --- a/css/businessadmin.css +++ b/css/businessadmin.css @@ -50,6 +50,10 @@ body { display: none; } +th.sorting, th.sorting_asc, th.sorting_desc { + min-width: 50px; +} + td { /*vertical-align: middle !important;*/ line-height: 1.428571429 !important; diff --git a/include/assignments-overview.php b/include/assignments-overview.php index 2881987..a21408e 100644 --- a/include/assignments-overview.php +++ b/include/assignments-overview.php @@ -22,14 +22,14 @@
Overview
- +
- - + + - - + + diff --git a/include/clients-overview.php b/include/clients-overview.php index a238ab1..f3e2a24 100644 --- a/include/clients-overview.php +++ b/include/clients-overview.php @@ -22,11 +22,11 @@
Overview
-
#Offer#Offer BriefingTimePriceTimePrice Tools
+
- - + + diff --git a/include/contacts-overview.php b/include/contacts-overview.php index 8548e3e..cd3b1bc 100644 --- a/include/contacts-overview.php +++ b/include/contacts-overview.php @@ -22,11 +22,11 @@
Overview
-
#Name#Name Tools
+
- - + + diff --git a/js/businessadmin.js b/js/businessadmin.js index fecd18a..956b371 100644 --- a/js/businessadmin.js +++ b/js/businessadmin.js @@ -63,6 +63,7 @@ $(document).ready(function(){ // Use the MixItUp plugin for sorting tables $('.mixitup').mixItUp({ animation: { + duration: 200, effects: 'fade' }, layout: { @@ -70,15 +71,15 @@ $(document).ready(function(){ } }); $('.mixitup .mixitup-sort').click(function(){ - $(this).closest('.mixitup').mixItUp('sort', $(this).data('sort')); - var mapping = { desc: 'asc', asc: 'desc' } $(this).data('sort', $(this).data('sort').replace(/asc|desc/gi, function(m){ return mapping[m]; })); + $(this).closest('.mixitup').mixItUp('sort', $(this).data('sort')); + var sorting = $(this).data('sort').substring($(this).data('sort').indexOf(':') + 1); - $(this).parent().find('.mixitup-sort').removeClass('active'); - $(this).addClass('active'); + $(this).parent().find('.mixitup-sort').removeClass('active sorting_asc sorting_desc').addClass('sorting'); + $(this).addClass('active sorting_' + sorting).removeClass('sorting'); }); }); \ No newline at end of file -- cgit v1.2.3
#Name#Name Address Tools