From 8c617ddea892b8c806fe4ad093cbc454d6ac7ce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 17 Jan 2014 17:19:43 +0100 Subject: [PATCH] [add] ajax behavior when we start an entry --- app/controllers/front.php | 4 +- app/views/_entry.twig | 12 +- app/views/_top.twig | 2 +- web/assets/js/event.js | 18 +-- web/assets/js/item.js | 243 ++++++++++++++++++++++---------------- 5 files changed, 164 insertions(+), 115 deletions(-) diff --git a/app/controllers/front.php b/app/controllers/front.php index c4185eb..78cf6d7 100644 --- a/app/controllers/front.php +++ b/app/controllers/front.php @@ -19,9 +19,9 @@ $front->get('/restore/{id}', 'Poche\Controller\EntryController::restoreAction') // bookmarks $front->get('/bookmarks', 'Poche\Controller\BookmarkController::indexAction'); -$front->get('/star/{id}', 'Poche\Controller\BookmarkController::addAction') +$front->match('/star/{id}', 'Poche\Controller\BookmarkController::addAction') ->bind('star_entry'); -$front->get('/unstar/{id}', 'Poche\Controller\BookmarkController::removeAction') +$front->match('/unstar/{id}', 'Poche\Controller\BookmarkController::removeAction') ->bind('unstar_entry'); // archive diff --git a/app/views/_entry.twig b/app/views/_entry.twig index add0867..191eb22 100644 --- a/app/views/_entry.twig +++ b/app/views/_entry.twig @@ -10,12 +10,18 @@