From c2cf7075c24c1539befd4ba09881eed761c9d769 Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Tue, 22 Apr 2014 10:45:09 +0300 Subject: [PATCH] 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 ++++++- inc/poche/config.inc.php.new | 4 ++ themes/baggy/css/main.css | 3 ++ themes/baggy/css/print.css | 14 ++++++ themes/baggy/fonts/icomoon.eot | Bin 3724 -> 3896 bytes themes/baggy/fonts/icomoon.svg | 17 ++++++- themes/baggy/fonts/icomoon.ttf | Bin 3560 -> 3732 bytes themes/baggy/fonts/icomoon.woff | Bin 3528 -> 3664 bytes themes/baggy/view.twig | 49 +++++++++++++++++++- themes/default/css/style-default.css | 4 ++ themes/default/css/style.css | 13 +++++- themes/default/img/default/print.png | Bin 0 -> 321 bytes themes/default/view.twig | 64 ++++++++++++++++++++++++++- 13 files changed, 176 insertions(+), 8 deletions(-) mode change 100755 => 100644 themes/baggy/fonts/icomoon.eot mode change 100755 => 100644 themes/baggy/fonts/icomoon.svg mode change 100755 => 100644 themes/baggy/fonts/icomoon.ttf mode change 100755 => 100644 themes/baggy/fonts/icomoon.woff mode change 100644 => 100755 themes/default/css/style-default.css create mode 100755 themes/default/img/default/print.png diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 811895dca..dcfdc167d 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 83b3c4c02..3b08c212f 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 0991dbede..52d8ecaa4 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 9aefa779e..9dd6d295c 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 02f53b36d030547fa28eaf6d42f7bcfb7197ec11..563235166982e94bcbb1275d5f7fe0122b742aa8 GIT binary patch delta 488 zcmeB?-66+j!Oy@jg>NF88B2eX8s}t1UXh6*$^3^I7#Q{daYAx#V!;cKiO1yXTQ~K~ zGcYh#Ffec($w*C1VGz66&A`B815{;}0Tf_<#P|)!F9GsZGIC2Q7$XCcq%uRKX*m4cX2kK$8EXXe|VPFQzFz|uQ zQ($0bnw-q&z{op!38O0`@8(yGbC|T4)btq{89LcOKtPb6O^Ka{pOcfHhh33{je~=g znUkG^iJg^^owaN829{3tdKQp*Obm<%fF>(2s4`eFFbFG(DzYjn@iECVipVipGm0vj z8XMU$*)p2wF)1@En;MG>i|{ciE9o(rn%FTJ8_6+=HZU^$XJAbD=fKX*$;!&f&7Q!> zkN{&h95~R<%+A5e%E8VIqZto4D1g-YEC8u$XaKRn%zpJ#ZOdU6bpIiu+0DLes8ObnAB@#qM#CV};dGGs7-J<7l|xsXqI JvoUWZBLFKfShfHF delta 312 zcmdlX*CWf;!^gnzf_EaD8Hj7#Q{daYAx#V!;ddiO1yXcX!H2FfcGy zFfee*WTYmh{ExeLm4ShK3Q(0<22g1lSwMackgt%Jn49V%vE>?&-vhM6vLL^>gn=0-!@zq2B+tOi zG&z~kfstqO5=K`>p3Scq=P+q8nyBeBGBR|sfq;M@KbsOe4?ia-KM%VSGdnvc3kwGa zJ2ObGbMpq4PIhHRka-LYFNKOX#q-;IW#DE4^Uo{z^MDv2dNK>IIitvA8{UA)6L__R ZfTAExA`BT2$1pHWR^%7ne4jUx5dicvL7o5r diff --git a/themes/baggy/fonts/icomoon.svg b/themes/baggy/fonts/icomoon.svg old mode 100755 new mode 100644 index d9c35b98d..b45861363 --- 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 3860dd04141f2df89cde9392742608b8407f95b8..bb1f21f888d3786dd6db4bc0d75ab322b1eaac75 GIT binary patch delta 503 zcmaDMJw>*jfsuiMft#U$ftkU;KUm+0L+RgPpvWE|PDsv8EO_DZtc`(zQ3l8lNlz>; z0MY_LK8WT>pn-PA7+pny(pVnqRi6hjsR1Fr;-uaK9Ro9ZI5&d587(Up;Rvm4_aCM_m4eMUxxPBst_5aef5V&~!K1}g>zVMS3zRz)Q~CRs)i zIVNjHQAJZ@BReKrMiV_IWoBhlV^LudJ|<-)Jtk8VJ0@czIVRBtMuz_kj0yi7*tt1b zSvk4c6Brp1VC;qi2ilq0Iapaa*qLE8;{gW+kUF0QAXNJ#ZOdh!l#b4Jn0AGiaUm>4G8@#qM#CV};dGGs7- RJ<7l|`693I=6;??MgVj>T4MkJ delta 331 zcmbOt`$D>&fsuiMft#U$ftkU;KUm+0L+RfkpvWE|PDsv8EO_Dmtc`(zQ3l8lNlz>; z0MY_LK8WT>q?-6WMxIHGu8cgJ-5BREX)&6p=`%7ibh3effFM7c5<3q+CnrA- zyAm@yJ0}YZ2M0SdNUn1;4@)PzGRWUR@KUIFQ#`-TR|ak-F#o)QKM#ljq9-Ttm@|q@ hp1~6^`3;Yj5Kt7PNrWK-;syq$$&Gx%o2_{x83C8^Lnr_M diff --git a/themes/baggy/fonts/icomoon.woff b/themes/baggy/fonts/icomoon.woff old mode 100755 new mode 100644 index c3a91ed7fab59be57983b11dacfb8bc455545bb1..bab137795473159c2c2c0c176cfea5d3dce56ec7 GIT binary patch delta 502 zcmX>heL+U7+~3X3KP1GTfq^f8fr|kM_&69CCvW5xo2bKG-^swh)tR)Wf2Du0z7Ych zcLPv90fae}{vA%vO)LP4Jpl4UK=_5nv$piaVxSn036ReL#R3_ri77xa8zA2djKwZ? zX8;9(VkJPn3J5blV*HkoTT%fOn*rp5&69s_#AuP5SOGHd4N#B`j70+&@)C1Xfnr}6 z7#J-<*hON?wSxR&pkaIl6JL1hUgMVqD!nZTA~}HsSA!6P7$YMGzo4*~w1TRZzKNxs zvxjd`cuZni_T*T`RK8MI3j-Gh1}4T%24M!#$)_2$nK;Wge`Ea1QU6`!M~LY6Dc#-P zzo&Gwe*cm!`X{8DwX(amw!4y}`?m>ecje65x!oMEySsmjfYf~#dEL!Aw|nNy?ztS@ z-+}UTYiCw=bNm+heMR(l2vFYSJCFow{4V`{iD-9SV`E)+U3cTu?it-PrcMPC-BTO8 z>p1v+OcD7pMU<_Z2NWxl|8O}o@=kW(b_J4c+~)F(K(DDK^~dwud}ZKf0;*tOIA47t d9Y#;S!)?weI$4A#fD0lSz`!87Ig2Nb5da2KlaT-b delta 360 zcmca0b3$6I+~3X3KP1GTfr0k~0~Z4j@HQ|oOcYbB=U`yq;;`$RYv~`XZvzS zFo)8=L&>>`1q=+_F+hF@2)}TD)|Q@F3=-P_wT6`6?jH{D|>uMs7(30|So;kRJfTvd@heEpihpfClma4PamcW03%cyu{p8pjZwA z1EVDfyGU%gR*+v@0(AF^i7z~LF7V3&m0lGDk(@w+^S=;-C?g{Wzo4*~w1TRZzKNxs zvxjd`cuZp2$>L#Pi#HW#DE4@)#J-EBN!k=*bB@=8PhfXYd37-3#=G$mUNxaf|>g CpipW6 diff --git a/themes/baggy/view.twig b/themes/baggy/view.twig index ffb512a38..62af2516e 100755 --- a/themes/baggy/view.twig +++ b/themes/baggy/view.twig @@ -8,13 +8,14 @@ @@ -32,6 +33,50 @@