aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortcit <tcit@tcit.fr>2014-04-23 10:34:22 +0200
committertcit <tcit@tcit.fr>2014-04-23 10:34:22 +0200
commitc97d23c5334b363250a1d7cfc5cffd0087f35c21 (patch)
tree455a4cd0886c0beb51f036482811fb94cbc5fa5e
parent4d99bae893eb47505f8ff6976917ef3af363ff5b (diff)
parent2a6440c134ee2d90a84b3e3a2e039d8fb4d83d04 (diff)
downloadwallabag-c97d23c5334b363250a1d7cfc5cffd0087f35c21.tar.gz
wallabag-c97d23c5334b363250a1d7cfc5cffd0087f35c21.tar.zst
wallabag-c97d23c5334b363250a1d7cfc5cffd0087f35c21.zip
Merge branch 'dev' of https://github.com/wallabag/wallabag into dev
-rwxr-xr-xinc/3rdparty/libraries/feedwriter/FeedWriter.php17
-rw-r--r--inc/3rdparty/site_config/custom/mobile.lemondeinformatique.fr.txt6
-rwxr-xr-xinc/poche/Poche.class.php25
-rwxr-xr-xinc/poche/config.inc.default.php (renamed from inc/poche/config.inc.php.new)4
-rwxr-xr-x[-rw-r--r--]inc/poche/global.inc.php1
-rwxr-xr-x[-rw-r--r--]install/index.php2
-rwxr-xr-xthemes/baggy/css/main.css3
-rwxr-xr-xthemes/baggy/css/print.css14
-rw-r--r--[-rwxr-xr-x]themes/baggy/fonts/icomoon.eotbin3724 -> 3896 bytes
-rw-r--r--[-rwxr-xr-x]themes/baggy/fonts/icomoon.svg17
-rw-r--r--[-rwxr-xr-x]themes/baggy/fonts/icomoon.ttfbin3560 -> 3732 bytes
-rw-r--r--[-rwxr-xr-x]themes/baggy/fonts/icomoon.woffbin3528 -> 3664 bytes
-rwxr-xr-xthemes/baggy/view.twig49
-rwxr-xr-x[-rw-r--r--]themes/default/css/style-default.css4
-rwxr-xr-xthemes/default/css/style.css13
-rwxr-xr-xthemes/default/img/default/print.pngbin0 -> 321 bytes
-rwxr-xr-xthemes/default/view.twig64
17 files changed, 190 insertions, 29 deletions
diff --git a/inc/3rdparty/libraries/feedwriter/FeedWriter.php b/inc/3rdparty/libraries/feedwriter/FeedWriter.php
index df4c8b4b..79639c0c 100755
--- a/inc/3rdparty/libraries/feedwriter/FeedWriter.php
+++ b/inc/3rdparty/libraries/feedwriter/FeedWriter.php
@@ -89,18 +89,11 @@ define('JSONP', 3, true);
89 */ 89 */
90 public function genarateFeed() 90 public function genarateFeed()
91 { 91 {
92 if ($this->version == RSS2) { 92 header('Content-type: text/xml; charset=UTF-8');
93// header('Content-type: text/xml; charset=UTF-8'); 93 // this line prevents Chrome 20 from prompting download
94 // this line prevents Chrome 20 from prompting download 94 // used by Google: https://news.google.com/news/feeds?ned=us&topic=b&output=rss
95 // used by Google: https://news.google.com/news/feeds?ned=us&topic=b&output=rss 95 header('X-content-type-options: nosniff');
96// header('X-content-type-options: nosniff'); 96
97 } elseif ($this->version == JSON) {
98// header('Content-type: application/json; charset=UTF-8');
99 $this->json = new stdClass();
100 } elseif ($this->version == JSONP) {
101// header('Content-type: application/javascript; charset=UTF-8');
102 $this->json = new stdClass();
103 }
104 $this->printHead(); 97 $this->printHead();
105 $this->printChannels(); 98 $this->printChannels();
106 $this->printItems(); 99 $this->printItems();
diff --git a/inc/3rdparty/site_config/custom/mobile.lemondeinformatique.fr.txt b/inc/3rdparty/site_config/custom/mobile.lemondeinformatique.fr.txt
new file mode 100644
index 00000000..24aec5c3
--- /dev/null
+++ b/inc/3rdparty/site_config/custom/mobile.lemondeinformatique.fr.txt
@@ -0,0 +1,6 @@
1title: //h2
2body: div[@id='illustration'] | //p
3prune: no
4tidy: no
5
6test_url: http://mobile.lemondeinformatique.fr/actualites/lire-les-datacenters-d-apple-google-et-facebook-eco-responsables-selon-greenpeace-le-monde-informatique-57122.html
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index aa313c25..7e3e6afe 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -101,7 +101,7 @@ class Poche
101 101
102 public function configFileIsAvailable() { 102 public function configFileIsAvailable() {
103 if (! self::$configFileAvailable) { 103 if (! self::$configFileAvailable) {
104 $this->notInstalledMessage[] = 'You have to rename inc/poche/config.inc.php.new to inc/poche/config.inc.php.'; 104 $this->notInstalledMessage[] = 'You have to copy (don\'t just rename!) inc/poche/config.inc.default.php to inc/poche/config.inc.php.';
105 105
106 return false; 106 return false;
107 } 107 }
@@ -486,12 +486,24 @@ class Poche
486 case 'toggle_fav' : 486 case 'toggle_fav' :
487 $this->store->favoriteById($id, $this->user->getId()); 487 $this->store->favoriteById($id, $this->user->getId());
488 Tools::logm('mark as favorite link #' . $id); 488 Tools::logm('mark as favorite link #' . $id);
489 Tools::redirect(); 489 if ( Tools::isAjaxRequest() ) {
490 echo 1;
491 exit;
492 }
493 else {
494 Tools::redirect();
495 }
490 break; 496 break;
491 case 'toggle_archive' : 497 case 'toggle_archive' :
492 $this->store->archiveById($id, $this->user->getId()); 498 $this->store->archiveById($id, $this->user->getId());
493 Tools::logm('archive link #' . $id); 499 Tools::logm('archive link #' . $id);
494 Tools::redirect(); 500 if ( Tools::isAjaxRequest() ) {
501 echo 1;
502 exit;
503 }
504 else {
505 Tools::redirect();
506 }
495 break; 507 break;
496 case 'archive_all' : 508 case 'archive_all' :
497 $this->store->archiveAll($this->user->getId()); 509 $this->store->archiveAll($this->user->getId());
@@ -876,13 +888,6 @@ class Poche
876 */ 888 */
877 public function import() { 889 public function import() {
878 890
879 if (!defined('IMPORT_LIMIT')) {
880 define('IMPORT_LIMIT', 5);
881 }
882 if (!defined('IMPORT_DELAY')) {
883 define('IMPORT_DELAY', 5);
884 }
885
886 if ( isset($_FILES['file']) ) { 891 if ( isset($_FILES['file']) ) {
887 Tools::logm('Import stated: parsing file'); 892 Tools::logm('Import stated: parsing file');
888 893
diff --git a/inc/poche/config.inc.php.new b/inc/poche/config.inc.default.php
index 83b3c4c0..3b08c212 100755
--- a/inc/poche/config.inc.php.new
+++ b/inc/poche/config.inc.default.php
@@ -42,6 +42,10 @@ define ('FLATTR_API', 'https://api.flattr.com/rest/v2/things/lookup/?url=');
42define ('NOT_FLATTRABLE', '0'); 42define ('NOT_FLATTRABLE', '0');
43define ('FLATTRABLE', '1'); 43define ('FLATTRABLE', '1');
44define ('FLATTRED', '2'); 44define ('FLATTRED', '2');
45// display or not print link in article view
46define ('SHOW_PRINTLINK', '1');
47// display or not percent of read in article view. Affects only default theme.
48define ('SHOW_READPERCENT', '1');
45define ('ABS_PATH', 'assets/'); 49define ('ABS_PATH', 'assets/');
46 50
47define ('DEFAULT_THEME', 'baggy'); 51define ('DEFAULT_THEME', 'baggy');
diff --git a/inc/poche/global.inc.php b/inc/poche/global.inc.php
index 15091387..14e9dd93 100644..100755
--- a/inc/poche/global.inc.php
+++ b/inc/poche/global.inc.php
@@ -43,6 +43,7 @@ if (! file_exists(INCLUDES . '/poche/config.inc.php')) {
43 Poche::$configFileAvailable = false; 43 Poche::$configFileAvailable = false;
44} else { 44} else {
45 require_once INCLUDES . '/poche/config.inc.php'; 45 require_once INCLUDES . '/poche/config.inc.php';
46 require_once INCLUDES . '/poche/config.inc.default.php';
46} 47}
47 48
48if (Poche::$configFileAvailable && DOWNLOAD_PICTURES) { 49if (Poche::$configFileAvailable && DOWNLOAD_PICTURES) {
diff --git a/install/index.php b/install/index.php
index e02952e0..b6c6abec 100644..100755
--- a/install/index.php
+++ b/install/index.php
@@ -53,7 +53,7 @@ else if (isset($_POST['install'])) {
53 else { 53 else {
54 $continue = true; 54 $continue = true;
55 // Create config.inc.php 55 // Create config.inc.php
56 if (!copy('inc/poche/config.inc.php.new', 'inc/poche/config.inc.php')) { 56 if (!copy('inc/poche/config.inc.default.php', 'inc/poche/config.inc.php')) {
57 $errors[] = 'Installation aborted, impossible to create inc/poche/config.inc.php file. Maybe you don\'t have write access to create it.'; 57 $errors[] = 'Installation aborted, impossible to create inc/poche/config.inc.php file. Maybe you don\'t have write access to create it.';
58 $continue = false; 58 $continue = false;
59 } 59 }
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;
746.icon-rss:before { 746.icon-rss:before {
747 content: "\e808"; 747 content: "\e808";
748} 748}
749.icon-print:before {
750 content: "\e80d";
751}
749 752
750/* ========================================================================== 753/* ==========================================================================
751 Icon selected 754 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 {
17 17
18/* Hide useless blocks */ 18/* Hide useless blocks */
19body > header, 19body > header,
20#article_toolbar,
20#links, 21#links,
21#sort, 22#sort,
22body > footer, 23body > footer,
@@ -46,3 +47,16 @@ abbr[title]:after {
46.pagination span.current { 47.pagination span.current {
47 border-style: dashed; 48 border-style: dashed;
48} 49}
50
51#main {
52 width: 100%;
53 padding: 0;
54 margin: 0;
55 margin-left: 0;
56 padding-right: 0;
57 padding-bottom: 0;
58}
59
60#article {
61 width: 100%;
62}
diff --git a/themes/baggy/fonts/icomoon.eot b/themes/baggy/fonts/icomoon.eot
index 02f53b36..56323516 100755..100644
--- a/themes/baggy/fonts/icomoon.eot
+++ b/themes/baggy/fonts/icomoon.eot
Binary files differ
diff --git a/themes/baggy/fonts/icomoon.svg b/themes/baggy/fonts/icomoon.svg
index d9c35b98..b4586136 100755..100644
--- a/themes/baggy/fonts/icomoon.svg
+++ b/themes/baggy/fonts/icomoon.svg
@@ -1,7 +1,21 @@
1<?xml version="1.0" standalone="no"?> 1<?xml version="1.0" standalone="no"?>
2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > 2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3<svg xmlns="http://www.w3.org/2000/svg"> 3<svg xmlns="http://www.w3.org/2000/svg">
4<metadata>Generated by IcoMoon</metadata> 4<metadata>
5<json>
6{
7 "fontFamily": "icomoon",
8 "majorVersion": 1,
9 "minorVersion": 0,
10 "version": "Version 1.0",
11 "fontId": "icomoon",
12 "psName": "icomoon",
13 "subFamily": "Regular",
14 "fullName": "icomoon",
15 "description": "Generated by IcoMoon"
16}
17</json>
18</metadata>
5<defs> 19<defs>
6<font id="icomoon" horiz-adv-x="512"> 20<font id="icomoon" horiz-adv-x="512">
7<font-face units-per-em="512" ascent="480" descent="-32" /> 21<font-face units-per-em="512" ascent="480" descent="-32" />
@@ -23,4 +37,5 @@
23<glyph unicode="&#xe80a;" d="M475.648 50.432v219.136q-9.216-10.24-19.968-18.944-76.288-58.368-121.856-96.256-14.336-12.288-23.552-19.456t-24.576-13.824-29.184-6.656h-1.024q-13.312 0-29.184 6.656t-24.576 13.824-23.552 19.456q-45.056 37.888-121.856 96.256-10.752 8.704-19.968 18.944v-219.136q0-4.096 3.072-6.656t6.144-2.56h420.864q3.584 0 6.144 2.56t3.072 6.656zM475.648 350.464v7.168t-0.512 3.584-0.512 3.584-1.536 2.56-2.56 2.048-4.096 1.024h-420.864q-3.584 0-6.144-3.072t-3.072-6.144q0-48.128 41.984-81.408 55.296-43.52 114.688-90.624 2.048-1.024 10.24-8.192t12.8-10.752 12.8-9.216 14.336-7.68 12.288-2.56h1.024q5.632 0 12.288 2.56t14.336 7.68 12.8 9.216 12.8 10.752 10.24 8.192q59.392 47.104 114.688 90.624 15.36 12.288 28.672 33.28t13.312 37.376zM512 361.216v-310.784q0-18.944-13.312-32.256t-32.256-13.824h-420.864q-18.432 0-32.256 13.824t-13.312 32.256v310.784q0 18.944 13.312 32.256t32.256 13.312h420.864q18.944 0 32.256-13.312t13.312-32.256z" /> 37<glyph unicode="&#xe80a;" d="M475.648 50.432v219.136q-9.216-10.24-19.968-18.944-76.288-58.368-121.856-96.256-14.336-12.288-23.552-19.456t-24.576-13.824-29.184-6.656h-1.024q-13.312 0-29.184 6.656t-24.576 13.824-23.552 19.456q-45.056 37.888-121.856 96.256-10.752 8.704-19.968 18.944v-219.136q0-4.096 3.072-6.656t6.144-2.56h420.864q3.584 0 6.144 2.56t3.072 6.656zM475.648 350.464v7.168t-0.512 3.584-0.512 3.584-1.536 2.56-2.56 2.048-4.096 1.024h-420.864q-3.584 0-6.144-3.072t-3.072-6.144q0-48.128 41.984-81.408 55.296-43.52 114.688-90.624 2.048-1.024 10.24-8.192t12.8-10.752 12.8-9.216 14.336-7.68 12.288-2.56h1.024q5.632 0 12.288 2.56t14.336 7.68 12.8 9.216 12.8 10.752 10.24 8.192q59.392 47.104 114.688 90.624 15.36 12.288 28.672 33.28t13.312 37.376zM512 361.216v-310.784q0-18.944-13.312-32.256t-32.256-13.824h-420.864q-18.432 0-32.256 13.824t-13.312 32.256v310.784q0 18.944 13.312 32.256t32.256 13.312h420.864q18.944 0 32.256-13.312t13.312-32.256z" />
24<glyph unicode="&#xe80b;" d="M0 133.888l256 256 256-256-75.776-75.776-180.224 179.712-180.224-179.712z" /> 38<glyph unicode="&#xe80b;" d="M0 133.888l256 256 256-256-75.776-75.776-180.224 179.712-180.224-179.712z" />
25<glyph unicode="&#xe80c;" d="M25.6 279.296q62.464-35.84 168.96-35.84t168.96 35.84l-27.648-248.832q-1.024-7.168-17.92-18.432t-51.2-22.016-72.192-10.752-71.68 10.752-51.2 22.016-18.432 18.432zM275.456 432.896q48.128-9.216 80.896-28.16t32.768-36.352v-5.12q0-29.696-57.344-50.688t-137.216-20.992-137.216 20.992-57.344 50.688v5.12q0 17.408 32.768 36.352t80.896 28.16l21.504 24.576q11.264 13.312 35.84 13.312h47.104q26.624 0 35.84-13.312zM247.808 375.552h43.008q-47.104 56.32-53.248 64.512-7.168 8.192-16.384 8.192h-52.224q-11.264 0-16.384-8.192l-54.272-64.512h43.008l32.768 33.792h41.984z" horiz-adv-x="389" /> 39<glyph unicode="&#xe80c;" d="M25.6 279.296q62.464-35.84 168.96-35.84t168.96 35.84l-27.648-248.832q-1.024-7.168-17.92-18.432t-51.2-22.016-72.192-10.752-71.68 10.752-51.2 22.016-18.432 18.432zM275.456 432.896q48.128-9.216 80.896-28.16t32.768-36.352v-5.12q0-29.696-57.344-50.688t-137.216-20.992-137.216 20.992-57.344 50.688v5.12q0 17.408 32.768 36.352t80.896 28.16l21.504 24.576q11.264 13.312 35.84 13.312h47.104q26.624 0 35.84-13.312zM247.808 375.552h43.008q-47.104 56.32-53.248 64.512-7.168 8.192-16.384 8.192h-52.224q-11.264 0-16.384-8.192l-54.272-64.512h43.008l32.768 33.792h41.984z" horiz-adv-x="389" />
40<glyph unicode="&#xe80d;" d="M128 448h256v-64h-256zM480 352h-448c-17.6 0-32-14.4-32-32v-160c0-17.6 14.398-32 32-32h96v-128h256v128h96c17.6 0 32 14.4 32 32v160c0 17.6-14.4 32-32 32zM352 32h-192v160h192v-160zM487.2 304c0-12.813-10.387-23.2-23.199-23.2-12.813 0-23.201 10.387-23.201 23.2s10.388 23.2 23.201 23.2c12.813 0 23.199-10.387 23.199-23.2z" />
26</font></defs></svg> \ No newline at end of file 41</font></defs></svg> \ No newline at end of file
diff --git a/themes/baggy/fonts/icomoon.ttf b/themes/baggy/fonts/icomoon.ttf
index 3860dd04..bb1f21f8 100755..100644
--- a/themes/baggy/fonts/icomoon.ttf
+++ b/themes/baggy/fonts/icomoon.ttf
Binary files differ
diff --git a/themes/baggy/fonts/icomoon.woff b/themes/baggy/fonts/icomoon.woff
index c3a91ed7..bab13779 100755..100644
--- a/themes/baggy/fonts/icomoon.woff
+++ b/themes/baggy/fonts/icomoon.woff
Binary files 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 @@
8 <ul class="links"> 8 <ul class="links">
9 <li class="topPosF"><a href="#top" title="{% trans "Back to top" %}" class="tool top icon icon-arrow-up-thick"><span>{% trans "Back to top" %}</span></a></li> 9 <li class="topPosF"><a href="#top" title="{% trans "Back to top" %}" class="tool top icon icon-arrow-up-thick"><span>{% trans "Back to top" %}</span></a></li>
10 <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.url | e | getDomain }}</span></a></li> 10 <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.url | e | getDomain }}</span></a></li>
11 <li><a title="{% trans "Mark as read" %}" class="tool icon icon-check {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="./?action=toggle_archive&amp;id={{ entry.id|e }}"><span>{% trans "Toggle mark as read" %}</span></a></li> 11 <li><a title="{% trans "Mark as read" %}" class="tool icon icon-check {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="javascript: void(null);" id="markAsRead"><span>{% trans "Toggle mark as read" %}</span></a></li>
12 <li><a title="{% trans "Favorite" %}" class="tool icon icon-star {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="./?action=toggle_fav&amp;id={{ entry.id|e }}"><span>{% trans "Toggle favorite" %}</span></a></li> 12 <li><a title="{% trans "Favorite" %}" class="tool icon icon-star {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="javascript: void(null);" id="setFav"><span>{% trans "Toggle favorite" %}</span></a></li>
13 <li><a title="{% trans "Delete" %}" class="tool delete icon icon-trash" href="./?action=delete&amp;id={{ entry.id|e }}"><span>{% trans "Delete" %}</span></a></li> 13 <li><a title="{% trans "Delete" %}" class="tool delete icon icon-trash" href="./?action=delete&amp;id={{ entry.id|e }}"><span>{% trans "Delete" %}</span></a></li>
14 {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="{% trans "Tweet" %}"><span>{% trans "Tweet" %}</span></a></li>{% endif %} 14 {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="{% trans "Tweet" %}"><span>{% trans "Tweet" %}</span></a></li>{% endif %}
15 {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="{% trans "Email" %}"><span>{% trans "Email" %}</span></a></li>{% endif %} 15 {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="{% trans "Email" %}"><span>{% trans "Email" %}</span></a></li>{% endif %}
16 {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %} 16 {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %}
17 {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span> ({{ flattr.numflattrs }})</a></li>{% endif %}{% endif %} 17 {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span> ({{ flattr.numflattrs }})</a></li>{% endif %}{% endif %}
18 {% if constant('SHOW_PRINTLINK') == 1 %}<li><a title="{% trans "Print" %}" class="tool icon icon-print" href="javascript: window.print();"><span>{% trans "Print" %}</span></a></li>{% endif %}
18 <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{% trans "Does this article appear wrong?" %}" class="tool bad-display icon icon-delete"><span>{% trans "Does this article appear wrong?" %}</span></a></li> 19 <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{% trans "Does this article appear wrong?" %}" class="tool bad-display icon icon-delete"><span>{% trans "Does this article appear wrong?" %}</span></a></li>
19 </ul> 20 </ul>
20 </div> 21 </div>
@@ -32,6 +33,50 @@
32 <script src="{{ poche_url }}themes/{{theme}}/js/restoreScroll.js"></script> 33 <script src="{{ poche_url }}themes/{{theme}}/js/restoreScroll.js"></script>
33 <script type="text/javascript"> 34 <script type="text/javascript">
34 $(document).ready(function() { 35 $(document).ready(function() {
36
37 // toggle read property of current article
38 $('#markAsRead').click(function(){
39 $("body").css("cursor", "wait");
40 $.ajax( { url: './?action=toggle_archive&id={{ entry.id|e }}' }).done(
41 function( data ) {
42 if ( data == '1' ) {
43 if ( $('#markAsRead').hasClass("archive-off") ) {
44 $('#markAsRead').removeClass("archive-off");
45 $('#markAsRead').addClass("archive");
46 }
47 else {
48 $('#markAsRead').removeClass("archive");
49 $('#markAsRead').addClass("archive-off");
50 }
51 }
52 else {
53 alert('Error! Pls check if you are logged in.');
54 }
55 });
56 $("body").css("cursor", "auto");
57 });
58
59 // toggle favorite property of current article
60 $('#setFav').click(function(){
61 $("body").css("cursor", "wait");
62 $.ajax( { url: './?action=toggle_fav&id={{ entry.id|e }}' }).done(
63 function( data ) {
64 if ( data == '1' ) {
65 if ( $('#setFav').hasClass("fav-off") ) {
66 $('#setFav').removeClass("fav-off");
67 $('#setFav').addClass("fav");
68 }
69 else {
70 $('#setFav').removeClass("fav");
71 $('#setFav').addClass("fav-off");
72 }
73 }
74 else {
75 alert('Error! Pls check if you are logged in.');
76 }
77 });
78 $("body").css("cursor", "auto");
79 });
35 80
36 $(window).scroll(function(e){ 81 $(window).scroll(function(e){
37 var scrollTop = $(window).scrollTop(); 82 var scrollTop = $(window).scrollTop();
diff --git a/themes/default/css/style-default.css b/themes/default/css/style-default.css
index 9dc7c0b0..889a9f5c 100644..100755
--- a/themes/default/css/style-default.css
+++ b/themes/default/css/style-default.css
@@ -52,4 +52,8 @@ a.link span {
52 52
53a.bad-display span { 53a.bad-display span {
54 background-image: url('../img/default/bad-display.png'); 54 background-image: url('../img/default/bad-display.png');
55}
56
57a.print span {
58 background-image: url('../img/default/print.png');
55} \ No newline at end of file 59} \ No newline at end of file
diff --git a/themes/default/css/style.css b/themes/default/css/style.css
index e536ac6b..11a8ea1c 100755
--- a/themes/default/css/style.css
+++ b/themes/default/css/style.css
@@ -331,7 +331,8 @@ a.email span,
331a.delete span, 331a.delete span,
332a.link span, 332a.link span,
333a.bad-display span, 333a.bad-display span,
334a.reading-time span { 334a.reading-time span,
335a.print span {
335 background-repeat: no-repeat; 336 background-repeat: no-repeat;
336} 337}
337 338
@@ -402,3 +403,13 @@ a#bagit-form-close {
402.opacity03 { 403.opacity03 {
403 /*opacity: 0.3;*/ 404 /*opacity: 0.3;*/
404} 405}
406
407#readLeftPercent {
408 display: inline-block;
409 /* Show textual content */
410 overflow: visible;
411 text-align: left;
412 text-indent: 0;
413 color: black;
414 width: 50px;
415} \ No newline at end of file
diff --git a/themes/default/img/default/print.png b/themes/default/img/default/print.png
new file mode 100755
index 00000000..83d6445b
--- /dev/null
+++ b/themes/default/img/default/print.png
Binary files differ
diff --git a/themes/default/view.twig b/themes/default/view.twig
index cc491c77..983cc1cd 100755
--- a/themes/default/view.twig
+++ b/themes/default/view.twig
@@ -7,14 +7,16 @@
7 <li><a href="./" title="{% trans "Return home" %}" class="tool back"><span>{% trans "Return home" %}</span></a></li> 7 <li><a href="./" title="{% trans "Return home" %}" class="tool back"><span>{% trans "Return home" %}</span></a></li>
8 <li><a href="#top" title="{% trans "Back to top" %}" class="tool top"><span>{% trans "Back to top" %}</span></a></li> 8 <li><a href="#top" title="{% trans "Back to top" %}" class="tool top"><span>{% trans "Back to top" %}</span></a></li>
9 <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}" class="tool link"><span>{{ entry.url | e | getDomain }}</span></a></li> 9 <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}" class="tool link"><span>{{ entry.url | e | getDomain }}</span></a></li>
10 <li><a title="{% trans "Mark as read" %}" class="tool {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="./?action=toggle_archive&amp;id={{ entry.id|e }}"><span>{% trans "Toggle mark as read" %}</span></a></li> 10 <li><a title="{% trans "Mark as read" %}" class="tool {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="javascript: void(null);" id="markAsRead"><span>{% trans "Toggle mark as read" %}</span></a></li>
11 <li><a title="{% trans "Favorite" %}" class="tool {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="./?action=toggle_fav&amp;id={{ entry.id|e }}"><span>{% trans "Toggle favorite" %}</span></a></li> 11 <li><a title="{% trans "Favorite" %}" class="tool {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="javascript: void(null);" id="setFav"><span>{% trans "Toggle favorite" %}</span></a></li>
12 <li><a title="{% trans "Delete" %}" class="tool delete" href="./?action=delete&amp;id={{ entry.id|e }}"><span>{% trans "Delete" %}</span></a></li> 12 <li><a title="{% trans "Delete" %}" class="tool delete" href="./?action=delete&amp;id={{ entry.id|e }}"><span>{% trans "Delete" %}</span></a></li>
13 {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter" title="{% trans "Tweet" %}"><span>{% trans "Tweet" %}</span></a></li>{% endif %} 13 {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter" title="{% trans "Tweet" %}"><span>{% trans "Tweet" %}</span></a></li>{% endif %}
14 {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email" title="{% trans "Email" %}"><span>{% trans "Email" %}</span></a></li>{% endif %} 14 {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email" title="{% trans "Email" %}"><span>{% trans "Email" %}</span></a></li>{% endif %}
15 {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %} 15 {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %}
16 {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span>{{ flattr.numflattrs }}</a></li>{% endif %}{% endif %} 16 {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span>{{ flattr.numflattrs }}</a></li>{% endif %}{% endif %}
17 {% if constant('SHOW_PRINTLINK') == 1 %}<li><a title="{% trans "Print" %}" class="tool print" href="javascript: window.print();"><span>{% trans "Print" %}</span></a></li>{% endif %}
17 <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{% trans "Does this article appear wrong?" %}" class="tool bad-display"><span>{% trans "Does this article appear wrong?" %}</span></a></li> 18 <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{% trans "Does this article appear wrong?" %}" class="tool bad-display"><span>{% trans "Does this article appear wrong?" %}</span></a></li>
19 {% if constant('SHOW_READPERCENT') == 1 %}<li><div id="readLeftPercent">0%</div></li>{% endif %}
18 </ul> 20 </ul>
19 </div> 21 </div>
20 <div id="article"> 22 <div id="article">
@@ -34,6 +36,60 @@
34 <script src="{{ poche_url }}themes/{{theme}}/js/restoreScroll.js"></script> 36 <script src="{{ poche_url }}themes/{{theme}}/js/restoreScroll.js"></script>
35 <script type="text/javascript"> 37 <script type="text/javascript">
36 $(document).ready(function() { 38 $(document).ready(function() {
39
40 // toggle read property of current article
41 $('#markAsRead').click(function(){
42 $("body").css("cursor", "wait");
43 $.ajax( { url: './?action=toggle_archive&id={{ entry.id|e }}' }).done(
44 function( data ) {
45 if ( data == '1' ) {
46 if ( $('#markAsRead').hasClass("archive-off") ) {
47 $('#markAsRead').removeClass("archive-off");
48 $('#markAsRead').addClass("archive");
49 }
50 else {
51 $('#markAsRead').removeClass("archive");
52 $('#markAsRead').addClass("archive-off");
53 }
54 }
55 else {
56 alert('Error! Pls check if you are logged in.');
57 }
58 });
59 $("body").css("cursor", "auto");
60 });
61
62 // toggle favorite property of current article
63 $('#setFav').click(function(){
64 $("body").css("cursor", "wait");
65 $.ajax( { url: './?action=toggle_fav&id={{ entry.id|e }}' }).done(
66 function( data ) {
67 if ( data == '1' ) {
68 if ( $('#setFav').hasClass("fav-off") ) {
69 $('#setFav').removeClass("fav-off");
70 $('#setFav').addClass("fav");
71 }
72 else {
73 $('#setFav').removeClass("fav");
74 $('#setFav').addClass("fav-off");
75 }
76 }
77 else {
78 alert('Error! Pls check if you are logged in.');
79 }
80 });
81 $("body").css("cursor", "auto");
82 });
83
84 // set percent of read on startup
85 if ( $(document).height() <= $(window).innerHeight() ) {
86 pp = 100;
87 }
88 else {
89 pp = 0;
90 }
91 $('#readLeftPercent').text( pp + '%' );
92
37 93
38 $(window).scroll(function(e){ 94 $(window).scroll(function(e){
39 var scrollTop = $(window).scrollTop(); 95 var scrollTop = $(window).scrollTop();
@@ -41,6 +97,10 @@
41 var scrollPercent = (scrollTop) / (docHeight); 97 var scrollPercent = (scrollTop) / (docHeight);
42 var scrollPercentRounded = Math.round(scrollPercent*100)/100; 98 var scrollPercentRounded = Math.round(scrollPercent*100)/100;
43 savePercent({{ entry.id|e }}, scrollPercentRounded); 99 savePercent({{ entry.id|e }}, scrollPercentRounded);
100
101 // change percent of read on scroll
102 pp = Math.round(scrollTop * 100 / ( docHeight - $(window).innerHeight() ));
103 $('#readLeftPercent').text( pp + '%' );
44 }); 104 });
45 105
46 retrievePercent({{ entry.id|e }}); 106 retrievePercent({{ entry.id|e }});