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

This commit is contained in:
Maryana Rozhankivska
2014-04-22 10:45:09 +03:00
parent bfe1ad6dbc
commit c2cf7075c2
13 changed files with 176 additions and 8 deletions

View File

@ -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());