From: Maryana Rozhankivska Date: Tue, 22 Apr 2014 07:45:09 +0000 (+0300) Subject: print view fixed in baggy; print link added; read percent added in default theme... X-Git-Tag: 1.7.0^2~19^2~2^2~2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=c2cf7075c24c1539befd4ba09881eed761c9d769;p=github%2Fwallabag%2Fwallabag.git 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 --- 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()); diff --git a/inc/poche/config.inc.php.new b/inc/poche/config.inc.php.new index 83b3c4c0..3b08c212 100755 --- a/inc/poche/config.inc.php.new +++ b/inc/poche/config.inc.php.new @@ -42,6 +42,10 @@ define ('FLATTR_API', 'https://api.flattr.com/rest/v2/things/lookup/?url='); define ('NOT_FLATTRABLE', '0'); define ('FLATTRABLE', '1'); define ('FLATTRED', '2'); +// display or not print link in article view +define ('SHOW_PRINTLINK', '1'); +// display or not percent of read in article view. Affects only default theme. +define ('SHOW_READPERCENT', '1'); define ('ABS_PATH', 'assets/'); define ('DEFAULT_THEME', 'baggy'); diff --git a/themes/baggy/css/main.css b/themes/baggy/css/main.css index 0991dbed..52d8ecaa 100755 --- a/themes/baggy/css/main.css +++ b/themes/baggy/css/main.css @@ -746,6 +746,9 @@ margin-top:1em; .icon-rss:before { content: "\e808"; } +.icon-print:before { + content: "\e80d"; +} /* ========================================================================== Icon selected diff --git a/themes/baggy/css/print.css b/themes/baggy/css/print.css index 9aefa779..9dd6d295 100755 --- a/themes/baggy/css/print.css +++ b/themes/baggy/css/print.css @@ -17,6 +17,7 @@ img { /* Hide useless blocks */ body > header, +#article_toolbar, #links, #sort, body > footer, @@ -46,3 +47,16 @@ abbr[title]:after { .pagination span.current { border-style: dashed; } + +#main { + width: 100%; + padding: 0; + margin: 0; + margin-left: 0; + padding-right: 0; + padding-bottom: 0; +} + +#article { + width: 100%; +} diff --git a/themes/baggy/fonts/icomoon.eot b/themes/baggy/fonts/icomoon.eot old mode 100755 new mode 100644 index 02f53b36..56323516 Binary files a/themes/baggy/fonts/icomoon.eot and b/themes/baggy/fonts/icomoon.eot differ diff --git a/themes/baggy/fonts/icomoon.svg b/themes/baggy/fonts/icomoon.svg old mode 100755 new mode 100644 index d9c35b98..b4586136 --- a/themes/baggy/fonts/icomoon.svg +++ b/themes/baggy/fonts/icomoon.svg @@ -1,7 +1,21 @@ -Generated by IcoMoon + + +{ + "fontFamily": "icomoon", + "majorVersion": 1, + "minorVersion": 0, + "version": "Version 1.0", + "fontId": "icomoon", + "psName": "icomoon", + "subFamily": "Regular", + "fullName": "icomoon", + "description": "Generated by IcoMoon" +} + + @@ -23,4 +37,5 @@ + \ No newline at end of file diff --git a/themes/baggy/fonts/icomoon.ttf b/themes/baggy/fonts/icomoon.ttf old mode 100755 new mode 100644 index 3860dd04..bb1f21f8 Binary files a/themes/baggy/fonts/icomoon.ttf and b/themes/baggy/fonts/icomoon.ttf differ diff --git a/themes/baggy/fonts/icomoon.woff b/themes/baggy/fonts/icomoon.woff old mode 100755 new mode 100644 index c3a91ed7..bab13779 Binary files a/themes/baggy/fonts/icomoon.woff and b/themes/baggy/fonts/icomoon.woff differ diff --git a/themes/baggy/view.twig b/themes/baggy/view.twig index ffb512a3..62af2516 100755 --- a/themes/baggy/view.twig +++ b/themes/baggy/view.twig @@ -8,13 +8,14 @@ @@ -32,6 +33,50 @@