From e39872e511cc8a28faa3b4cd487547f5a97f2b33 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Wed, 21 Feb 2018 17:52:21 +0100 Subject: [PATCH] Fancybox fix 9 --- Site/Pages/v5/Financial/FileExpenseClaim.aspx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Site/Pages/v5/Financial/FileExpenseClaim.aspx b/Site/Pages/v5/Financial/FileExpenseClaim.aspx index b93c463d..ec2379ff 100644 --- a/Site/Pages/v5/Financial/FileExpenseClaim.aspx +++ b/Site/Pages/v5/Financial/FileExpenseClaim.aspx @@ -193,7 +193,20 @@ lensShape: "round", lensSize: 200 }); - console.log(instance); + + if (instance.group.length > 1) { + if (instance.currIndex > 0) { + $('a.data-arrow-previous').show(); + } else { + $('a.data-arrow-previous').hide(); + } + + if (instance.currIndex < instance.group.length - 1) { + $('a.data-arrow-next').show(); + } else { + $('a.data-arrow-next').hide(); + } + } }, afterLoad: function(instance, current) { @@ -201,9 +214,7 @@ /* TODO: MAKE A RIGHT-TO-LEFT VERSION OF THIS */ if ( instance.group.length > 1 && current.$content ) { - console.log(instance); - //console.log(current); - current.$content.append('→←'); + current.$content.append('→←'); } },