From c2cf7075c24c1539befd4ba09881eed761c9d769 Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Tue, 22 Apr 2014 10:45:09 +0300 Subject: print view fixed in baggy; print link added; read percent added in default theme; archive and favorite re-factored to be ajax action in article view --- inc/poche/Poche.class.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'inc/poche/Poche.class.php') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 811895dc..dcfdc167 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -434,12 +434,24 @@ class Poche case 'toggle_fav' : $this->store->favoriteById($id, $this->user->getId()); Tools::logm('mark as favorite link #' . $id); - Tools::redirect(); + if ( Tools::isAjaxRequest() ) { + echo 1; + exit; + } + else { + Tools::redirect(); + } break; case 'toggle_archive' : $this->store->archiveById($id, $this->user->getId()); Tools::logm('archive link #' . $id); - Tools::redirect(); + if ( Tools::isAjaxRequest() ) { + echo 1; + exit; + } + else { + Tools::redirect(); + } break; case 'archive_all' : $this->store->archiveAll($this->user->getId()); -- cgit v1.2.3