From 6b544902312524170d894251f17bd52dd2f431ca Mon Sep 17 00:00:00 2001 From: Damien Pobel Date: Thu, 29 Oct 2015 10:28:19 +0100 Subject: [PATCH] Enhanced the previous/next links to work in the application --- Resources/public/js/views/ezconf-listview.js | 17 ++++++++++++++++- Resources/views/List/list.html.twig | 4 ++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Resources/public/js/views/ezconf-listview.js b/Resources/public/js/views/ezconf-listview.js index 0d58895..e1c9b14 100644 --- a/Resources/public/js/views/ezconf-listview.js +++ b/Resources/public/js/views/ezconf-listview.js @@ -15,7 +15,10 @@ YUI.add('ezconf-listview', function (Y) { '.ezconf-list-location': { // tap is 'fast click' (touch friendly) 'tap': '_navigateToLocation' - } + }, + '.ezconf-list-page-link': { + 'tap': '_navigateToOffset' + }, }, initializer: function () { @@ -23,6 +26,18 @@ YUI.add('ezconf-listview', function (Y) { this.containerTemplate = '
'; }, + _navigateToOffset: function (e) { + var offset = e.target.getData('offset'); + + e.preventDefault(); + this.fire('navigateTo', { + routeName: 'eZConfListOffset', + routeParams: { + offset: offset, + }, + }); + }, + _navigateToLocation: function (e) { var link = e.target; diff --git a/Resources/views/List/list.html.twig b/Resources/views/List/list.html.twig index 2ece5a6..35f187c 100644 --- a/Resources/views/List/list.html.twig +++ b/Resources/views/List/list.html.twig @@ -19,14 +19,14 @@