Compare commits

..

1 Commits

Author SHA1 Message Date
4b1fa4c2fe Merge pull request #1081 from wallabag/dev
Version 1.9.0
2015-02-18 19:17:31 +01:00
26 changed files with 45 additions and 250 deletions

View File

@ -4,6 +4,6 @@ wallabag is a self hostable application allowing you to not miss any content any
More informations on our website: [wallabag.org](http://wallabag.org)
## License
Copyright © 2013-2015 Nicolas Lœuillet <nicolas@loeuillet.org>
Copyright © 2013-2014 Nicolas Lœuillet <nicolas@loeuillet.org>
This work is free. You can redistribute it and/or modify it under the
terms of the MIT License. See the COPYING file for more details.

View File

@ -23,9 +23,8 @@
"issues": "https://github.com/wallabag/wallabag/issues"
},
"require": {
"php": ">=5.3.3",
"twig/twig": "1.*",
"twig/extensions": "1.0.*",
"umpirsky/twig-gettext-extractor": "1.1.*"
}
}
}

View File

@ -421,26 +421,6 @@ class Database {
return $id;
}
public function getPreviousArticle($id, $user_id)
{
$sql = "SELECT id FROM entries WHERE id = (SELECT max(id) FROM entries WHERE id < ?) AND user_id=? AND is_read=0";
$params = array($id, $user_id);
$query = $this->executeQuery($sql, $params);
$id_entry = $query->fetchAll();
$id = $id_entry[0][0];
return $id;
}
public function getNextArticle($id, $user_id)
{
$sql = "SELECT id FROM entries WHERE id = (SELECT min(id) FROM entries WHERE id > ?) AND user_id=? AND is_read=0";
$params = array($id, $user_id);
$query = $this->executeQuery($sql, $params);
$id_entry = $query->fetchAll();
$id = $id_entry[0][0];
return $id;
}
public function updateContent($id, $content, $user_id)
{

View File

@ -200,34 +200,27 @@ class Poche
//search for possible duplicate
$duplicate = NULL;
$clean_url = $url->getUrl();
$duplicate = $this->store->retrieveOneByURL($url->getUrl(), $this->user->getId());
// Clean URL to remove parameters from feedburner and all this stuff. Taken from Shaarli.
$i=strpos($clean_url,'&utm_source='); if ($i!==false) $clean_url=substr($clean_url,0,$i);
$i=strpos($clean_url,'?utm_source='); if ($i!==false) $clean_url=substr($clean_url,0,$i);
$i=strpos($clean_url,'#xtor=RSS-'); if ($i!==false) $clean_url=substr($clean_url,0,$i);
$duplicate = $this->store->retrieveOneByURL($clean_url, $this->user->getId());
$last_id = $this->store->add($clean_url, $title, $body, $this->user->getId());
$last_id = $this->store->add($url->getUrl(), $title, $body, $this->user->getId());
if ( $last_id ) {
Tools::logm('add link ' . $clean_url);
Tools::logm('add link ' . $url->getUrl());
if (DOWNLOAD_PICTURES) {
$content = Picture::filterPicture($body, $clean_url, $last_id);
$content = Picture::filterPicture($body, $url->getUrl(), $last_id);
Tools::logm('updating content article');
$this->store->updateContent($last_id, $content, $this->user->getId());
}
if ($duplicate != NULL) {
// duplicate exists, so, older entry needs to be deleted (as new entry should go to the top of list), BUT favorite mark and tags should be preserved
Tools::logm('link ' . $clean_url . ' is a duplicate');
Tools::logm('link ' . $url->getUrl() . ' is a duplicate');
// 1) - preserve tags and favorite, then drop old entry
$this->store->reassignTags($duplicate['id'], $last_id);
if ($duplicate['is_fav']) {
$this->store->favoriteById($last_id, $this->user->getId());
}
if ($this->store->deleteById($duplicate['id'], $this->user->getId())) {
Tools::logm('previous link ' . $clean_url .' entry deleted');
Tools::logm('previous link ' . $url->getUrl() .' entry deleted');
}
}
@ -242,7 +235,7 @@ class Poche
}
else {
$this->messages->add('e', _('error during insertion : the link wasn\'t added'));
Tools::logm('error during insertion : the link wasn\'t added ' . $clean_url);
Tools::logm('error during insertion : the link wasn\'t added ' . $url->getUrl());
}
if ($autoclose == TRUE) {
@ -310,16 +303,11 @@ class Poche
if ( Tools::isAjaxRequest() ) {
echo 1;
exit;
} else {
}
else {
Tools::redirect();
}
break;
case 'archive_and_next' :
$nextid = $this->store->getPreviousArticle($id, $this->user->getId());
$this->store->archiveById($id, $this->user->getId());
Tools::logm('archive link #' . $id);
Tools::redirect('?view=view&id=' . $nextid);
break;
case 'archive_all' :
$this->store->archiveAll($this->user->getId());
Tools::logm('archive all links');
@ -465,11 +453,9 @@ class Poche
Tools::redirect();
}
$tags = $this->store->retrieveTagsByEntry($id);
$all_tags = $this->store->retrieveAllTags($this->user->getId());
$tpl_vars = array(
'entry_id' => $id,
'tags' => $tags,
'alltags' => $all_tags,
'entry' => $entry,
);
break;
@ -523,20 +509,6 @@ class Poche
$flattr->checkItem($entry['url'], $entry['id']);
}
# previous and next
$previous = FALSE;
$previous_id = $this->store->getPreviousArticle($id, $this->user->getId());
$next = FALSE;
$next_id = $this->store->getNextArticle($id, $this->user->getId());
if ($this->store->retrieveOneById($previous_id, $this->user->getId())) {
$previous = TRUE;
}
if ($this->store->retrieveOneById($next_id, $this->user->getId())) {
$next = TRUE;
}
$navigate = $arrayName = array('previous' => $previous, 'previousid' => $previous_id, 'next' => $next, 'nextid' => $next_id);
# tags
$tags = $this->store->retrieveTagsByEntry($entry['id']);
@ -544,8 +516,7 @@ class Poche
'entry' => $entry,
'content' => $content,
'flattr' => $flattr,
'tags' => $tags,
'navigate' => $navigate
'tags' => $tags
);
}
else {

View File

@ -15,7 +15,6 @@ class Routing
protected $view;
protected $action;
protected $id;
protected $autoclose;
protected $url;
protected $file;
protected $defaultVars = array();
@ -112,7 +111,9 @@ class Routing
$tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0);
$limit = (isset($_GET['limit']) ? intval($_GET['limit']) : 0);
$this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type'], $limit);
}
} //elseif (ALLOW_REGISTER && isset($_GET['register'])) {
//$this->wallabag->register
//}
//allowed ONLY to logged in user
if (\Session::isLogged() === true)

View File

@ -96,6 +96,7 @@ class WallabagEpub extends WallabagEBooks
$bookEnd = "</body>\n</html>\n";
$log = new Logger("wallabag", TRUE);
$fileDir = CACHE;
$book = new EPub(EPub::BOOK_VERSION_EPUB3, DEBUG_POCHE);
$log->logLine("new EPub()");
@ -120,12 +121,8 @@ class WallabagEpub extends WallabagEBooks
$book->addDublinCoreMetadata(DublinCore::CONTRIBUTOR, "PHP");
$book->addDublinCoreMetadata(DublinCore::CONTRIBUTOR, "wallabag");
/*
* Line not used but planned to be used
*
*$cssData = "body {\n margin-left: .5em;\n margin-right: .5em;\n text-align: justify;\n}\n\np {\n font-family: serif;\n font-size: 10pt;\n text-align: justify;\n text-indent: 1em;\n margin-top: 0px;\n margin-bottom: 1ex;\n}\n\nh1, h2 {\n font-family: sans-serif;\n font-style: italic;\n text-align: center;\n background-color: #6b879c;\n color: white;\n width: 100%;\n}\n\nh1 {\n margin-bottom: 2px;\n}\n\nh2 {\n margin-top: -2px;\n margin-bottom: 2px;\n}\n";
*/
$cssData = "body {\n margin-left: .5em;\n margin-right: .5em;\n text-align: justify;\n}\n\np {\n font-family: serif;\n font-size: 10pt;\n text-align: justify;\n text-indent: 1em;\n margin-top: 0px;\n margin-bottom: 1ex;\n}\n\nh1, h2 {\n font-family: sans-serif;\n font-style: italic;\n text-align: center;\n background-color: #6b879c;\n color: white;\n width: 100%;\n}\n\nh1 {\n margin-bottom: 2px;\n}\n\nh2 {\n margin-top: -2px;\n margin-bottom: 2px;\n}\n";
$log->logLine("Add Cover");
$fullTitle = "<h1> " . $this->bookTitle . "</h1>\n";
@ -183,6 +180,8 @@ class WallabagMobi extends WallabagEBooks
$mobi = new MOBI();
$content = new MOBIFile();
$messages = new Messages(); // for later
Tools::logm('Filling metadata for Mobi...');
$content->set("title", $this->bookTitle);
@ -244,9 +243,10 @@ class WallabagPDF extends WallabagEbooks
$pdf->writeHTMLCell(0, 0, '', '', $intro, 0, 1, 0, true, '', true);
$i = 1;
Tools::logm('Adding actual content...');
foreach ($this->entries as $item) {
$tags = $this->wallabag->store->retrieveTagsByEntry($item['id']);
$tags = $this->wallabag->store->retrieveTagsByEntry($entry['id']);
foreach ($tags as $tag) {
$pdf->SetKeywords($tag['value']);
}
@ -260,7 +260,7 @@ class WallabagPDF extends WallabagEbooks
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->Output('cache/' . $this->bookFileName . '.pdf', 'FD');
$pdf->Output($this->bookFileName . '.pdf', 'FD');
}
catch (Exception $e) {
Tools::logm('TCPDF has encountered an error : '.$e->getMessage());

File diff suppressed because one or more lines are too long

View File

@ -43,19 +43,5 @@ jQuery(function($) {
}
});
$('.suggestedtag').click(function(){
var input = $("#value");
var value = input.val();
var tag = $(this).text();
var terms = value.split(','); // tags into the <input>
if (jQuery.inArray(tag, terms) == -1 ) { // if the tag hasn't already been added
value += tag + ",";
input.val(value);
}
input.focus();
input[0].selectionStart = input[0].selectionEnd = input.val().length;
});
});

1
themes/_global/js/jquery-2.0.3.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,27 +0,0 @@
function navigateKeyboard(leftURL, rightURL) {
window.addEventListener("keypress", function (event) {
var key = event.which || event.keyCode; // event.keyCode is used for IE8 and earlier versions
switch (key) {
case 37:
goLeft(leftURL);
break;
case 39:
goRight(rightURL);
break;
}
}, false);
}
function goLeft(leftURL) {
if (leftURL != "?view=view&id=") {
window.location = window.location.origin + window.location.pathname + leftURL;
}
}
function goRight(rightURL) {
if (rightURL != "?view=view&id=") {
window.location = window.location.origin + window.location.pathname + rightURL;
}
}

View File

@ -30,12 +30,10 @@
<link rel="stylesheet" href="{{ poche_url }}themes/{{theme}}/css/messages.css" media="all">
<link rel="stylesheet" href="{{ poche_url }}themes/{{theme}}/css/print.css" media="print">
<script src="{{ poche_url }}themes/_global/js/jquery-2.1.3.min.js"></script>
<script src="{{ poche_url }}themes/_global/js/jquery.mobile.events.touch.min.js"></script>
<script src="{{ poche_url }}themes/_global/js/jquery-2.0.3.min.js"></script>
<script src="{{ poche_url }}themes/_global/js/autoClose.js"></script>
<script src="{{ poche_url }}themes/{{theme}}/js/jquery.cookie.js"></script>
<script src="{{ poche_url }}themes/{{theme}}/js/init.js"></script>
<script src="{{ poche_url }}themes/_global/js/saveLink.js"></script>
<script src="{{ poche_url }}themes/_global/js/popupForm.js"></script>
<script src="{{ poche_url }}themes/_global/js/keyboard.js"></script>
<script src="{{ poche_url }}themes/{{theme}}/js/closeMessage.js"></script>

View File

@ -748,15 +748,6 @@ a.add-to-wallabag-link-after:after {
.icon-tags:before {
content: "\e936";
}
.icon-previous:before {
content: "\e606";
}
.icon-next:before {
content: "\e605";
}
.icon-archiveandnext:before {
content: "\e607";
}
/* .icon-image class, for image-based icons
@ -873,20 +864,6 @@ blockquote {
font-size: 1.5em;
}
.leftPosF {
position: fixed;
right: 24%;
bottom: 2em;
font-size: 1.5em;
}
.rightPosF {
position: fixed;
right: 16%;
bottom: 2em;
font-size: 1.5em;
}
#article_toolbar {
margin-bottom: 1em;
}
@ -984,12 +961,6 @@ pre code {
.topPosF {
right: 2.5em;
}
.leftPosF {
right: 4.5em;
}
.rightPosF {
right: 0.5em;
}
}
@media screen and (max-width: 700px) {
@ -1083,14 +1054,6 @@ pre code {
display: none;
}
#article_toolbar .leftPosF {
display: none;
}
#article_toolbar .rightPosF {
display: none;
}
#article {
width: 100%;
}

View File

@ -16,7 +16,7 @@
<div class="notags">{% trans "no tags" %}</div>
{% endif %}
<ul>
{% for tag in tags %}<li><span class="alreadytagged">{{ tag.value }}</span> <a href="./?action=remove_tag&amp;tag_id={{ tag.id }}&amp;id={{ entry_id }}">✘</a></li>{% endfor %}
{% for tag in tags %}<li>{{ tag.value }} <a href="./?action=remove_tag&amp;tag_id={{ tag.id }}&amp;id={{ entry_id }}">✘</a></li>{% endfor %}
</ul>
<form method="post" action="./?action=add_tag">
<input type="hidden" name="entry_id" value="{{ entry_id }}" />
@ -25,7 +25,5 @@
<p>{% trans "Start typing for auto complete." %}<br>
{% trans "You can enter multiple tags, separated by commas." %}</p>
</form>
All existing tags :
<ul>{% for eachtag in alltags %}<li class="suggestedtag" style="display: inline-block; margin:10px;">{{ eachtag.value }}</li>{% endfor %}</ul>
<a class="icon icon-reply return" href="./?view=view&id={{ entry_id }}">{% trans "return to article" %}</a>
{% endblock %}

Binary file not shown.

View File

@ -11,10 +11,6 @@
<glyph unicode="&#xe601;" d="M490.666 146.218c-74.070 0-143.7 28.842-196.096 81.196-52.352 52.394-81.236 122.028-81.236 196.14s28.884 143.744 81.236 196.14c16.682 16.682 43.648 16.682 60.332 0s16.682-43.648 0-60.332c-36.266-36.308-56.236-84.522-56.236-135.808s19.968-99.542 56.236-135.808c36.266-36.268 84.438-56.192 135.764-56.192s99.498 19.968 135.766 56.192c36.308 36.268 56.236 84.48 56.236 135.808s-19.968 99.542-56.236 135.808c-16.682 16.682-16.682 43.648 0 60.332s43.648 16.682 60.332 0c52.352-52.438 81.236-122.070 81.236-196.14s-28.884-143.744-81.236-196.14c-52.394-52.352-122.028-81.194-196.096-81.194zM490.666 469.334c-23.594 0-42.666 19.116-42.666 42.666v213.334c0 23.552 19.072 42.666 42.668 42.666s42.668-19.116 42.668-42.666v-213.334c0-23.552-19.072-42.666-42.668-42.666z" />
<glyph unicode="&#xe602;" d="M512 803.328l-273.664-273.664c-33.324-33.322-33.324-87.34 0-120.662s87.338-33.322 120.662 0l67.668 67.67v-308.992c0-47.104 38.188-85.332 85.334-85.332 47.104 0 85.332 38.23 85.332 85.332v308.992l67.668-67.67c16.682-16.682 38.486-25.004 60.332-25.004s43.648 8.32 60.332 25.004c33.322 33.322 33.322 87.34 0 120.662l-273.664 273.664z" />
<glyph unicode="&#xe603;" d="M887.757 752.282c0 58.88-88.678 65.382-88.678 65.382l-208.333 13.107c0 0-4.454 56.678-46.541 76.39-42.086 19.61-88.371 13.619-121.651 13.312-33.28-0.358-41.114-42.752-41.114-82.79 0-39.987 0.717-86.221 0.717-115.2 0-52.122-22.886-74.189-80.179-74.189h-118.118c-33.024 2.099-58.726-3.277-58.726-30.003 0-26.778 38.861-254.618 92.211-307.2 30.976-30.515 220.416-51.917 260.301-51.917s26.573 117.811 37.683 117.811c11.11 0 23.245-66.509 86.118-82.074 62.771-15.718 146.637-12.8 151.091-57.498 5.786-58.982 11.11-135.27-27.699-140.698l-87.859-3.482c-60.211 4.301-44.032 70.093-17.459 70.093s39.885 0.973 39.885 0.973l3.328 71.987c0 0-137.882 16.282-143.718-76.698-5.376-84.992 9.216-125.082 19.917-133.786 10.701-8.806 29.235-25.805 198.093-25.805 237.926 0 150.733 693.402 150.733 752.282zM790.528 444.416c-9.318-10.035-43.11 16.384-75.366 16.384-32.307 0-67.123-17.101-75.315-5.786-8.192 11.213 7.475 101.888 68.301 101.888s91.802-102.605 82.381-112.486zM297.165 759.501c0 11.725 2.97 152.781 2.97 152.781l-179.456-176.128c0 0 124.006 0 148.378 0 24.371 0.051 28.109 11.725 28.109 23.347z" />
<glyph unicode="&#xe604;" d="M1024 369.556l-512 397.426-512-397.428v162.038l512 397.426 512-397.428zM896 384v-384h-256v256h-256v-256h-256v384l384 288z" />
<glyph unicode="&#xe605;" d="M621.254 82.746l320 320c24.994 24.992 24.994 65.516 0 90.51l-320 320c-24.994 24.992-65.516 24.992-90.51 0-24.994-24.994-24.994-65.516 0-90.51l210.746-210.746h-613.49c-35.346 0-64-28.654-64-64s28.654-64 64-64h613.49l-210.746-210.746c-12.496-12.496-18.744-28.876-18.744-45.254s6.248-32.758 18.744-45.254c24.994-24.994 65.516-24.994 90.51 0z" />
<glyph unicode="&#xe606;" d="M402.746 82.746l-320 320c-24.994 24.992-24.994 65.516 0 90.51l320 320c24.994 24.992 65.516 24.992 90.51 0 24.994-24.994 24.994-65.516 0-90.51l-210.746-210.746h613.49c35.346 0 64-28.654 64-64s-28.654-64-64-64h-613.49l210.746-210.746c12.496-12.496 18.744-28.876 18.744-45.254s-6.248-32.758-18.744-45.254c-24.994-24.994-65.516-24.994-90.51 0z" />
<glyph unicode="&#xe607;" d="M262.14 960c-113.728-206.032-132.89-520.304 313.86-509.824v253.824l384-384-384-384v248.372c-534.96-13.942-594.572 472.214-313.86 775.628z" />
<glyph unicode="&#xe800;" d="M0 51.712v526.336q0 183.296 87.040 284.672t265.216 101.376h561.152q-5.12-5.12-53.248-54.272t-102.4-103.424-111.616-111.616-97.28-95.232-43.008-37.888q-15.36 0-15.36 16.384v159.744h-49.152q-60.416 0-96.256-6.144t-64.512-26.624-39.936-58.368-12.288-98.304v-268.288zM68.608-68.096q5.12 5.12 54.272 54.272t102.4 103.424 111.616 112.64 97.28 95.232 41.984 36.864q15.36 0 15.36-16.384v-159.744h49.152q118.784 0 165.888 36.864t46.080 152.576v268.288l229.376 228.352v-526.336q0-183.296-86.016-284.672t-266.24-101.376h-561.152z" horiz-adv-x="982" />
<glyph unicode="&#xe801;" d="M301.056 208.384q14.336 14.336 34.816 14.336t36.864-14.336q32.768-34.816 0-71.68l-43.008-40.96q-57.344-57.344-135.168-57.344-79.872 0-137.216 57.344t-57.344 135.168q0 79.872 57.344 137.216l151.552 151.552q71.68 69.632 147.456 78.848t131.072-44.032q16.384-16.384 16.384-36.864t-16.384-36.864q-36.864-32.768-71.68 0-51.2 49.152-135.168-34.816l-151.552-149.504q-26.624-26.624-26.624-65.536t26.624-63.488q26.624-26.624 64.512-26.624t64.512 26.624zM761.856 796.16q57.344-57.344 57.344-135.168 0-79.872-57.344-137.216l-161.792-161.792q-75.776-73.728-153.6-73.728-63.488 0-114.688 51.2-14.336 14.336-14.336 34.816t14.336 36.864q14.336 14.336 35.84 14.336t35.84-14.336q51.2-49.152 124.928 24.576l161.792 159.744q28.672 28.672 28.672 65.536 0 38.912-28.672 63.488-24.576 26.624-57.344 31.744t-61.44-21.504l-51.2-51.2q-16.384-14.336-36.864-14.336t-34.816 14.336q-34.816 34.816 0 71.68l51.2 51.2q55.296 55.296 130.048 52.224t132.096-62.464z" horiz-adv-x="820" />
<glyph unicode="&#xe802;" d="M877.568 192v-72.704q0-15.36-10.24-25.6t-26.624-11.264h-803.84q-15.36 0-25.6 11.264t-11.264 25.6v72.704q0 15.36 11.264 25.6t25.6 11.264h803.84q15.36 0 26.624-11.264t10.24-25.6zM877.568 484.864v-73.728q0-14.336-10.24-25.6t-26.624-10.24h-803.84q-15.36 0-25.6 10.24t-11.264 25.6v73.728q0 14.336 11.264 25.6t25.6 10.24h803.84q15.36 0 26.624-10.24t10.24-25.6zM877.568 776.704v-72.704q0-15.36-10.24-25.6t-26.624-11.264h-803.84q-15.36 0-25.6 11.264t-11.264 25.6v72.704q0 15.36 11.264 26.624t25.6 10.24h803.84q15.36 0 26.624-10.24t10.24-26.624z" horiz-adv-x="878" />

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Binary file not shown.

View File

@ -5,14 +5,11 @@
{% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %}
{% block content %}
{% include '_highlight.twig' %}
{% block toolbar %}
<div id="article_toolbar">
<ul class="links">
<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>
{% if navigate.next %}<li class="leftPosF"><a href="./?view=view&amp;id={{ navigate.nextid|e }}" class="top tool icon icon-previous"><span>{% trans "Next Article" %}</span></a></li>{% endif %}
<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>
<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>
{% if navigate.previous %}<li><a title="{% trans "Mark as read and go to next article" %}" class="tool icon icon-archiveandnext" href="./?action=archive_and_next&amp;id={{ entry.id|e }}" id="markAsReadAndNext"><span>{% trans "Toggle mark as read and go to next article" %}</span></a></li>{% endif %}
<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>
<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>
{% 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 %}
@ -28,11 +25,8 @@
{% if constant('MOBI') == 1 %}<li><a href="./?mobi&amp;method=id&amp;value={{ entry.id|e }}" title="Generate Mobi file">MOBI</a></li>{% endif %}
{% if constant('PDF') == 1 %}<li><a href="./?pdf&amp;method=id&amp;value={{ entry.id|e }}" title="Generate PDF file">PDF</a></li>{% endif %}
<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>
{% if navigate.previous %}<li class="rightPosF"><a href="./?view=view&amp;id={{ navigate.previousid|e }}" class="tool icon icon-next"><span>{% trans "Previous Article" %}</span></a></li>{% endif %}
</ul>
</div>
{% endblock %}
<div id="article">
<header class="mbm">
<h1>{{ entry.title|raw }}</h1>
@ -44,7 +38,6 @@
{{ content | raw }}
</article>
</div>
{{ block('toolbar') }}
<script src="{{ poche_url }}themes/_global/js/restoreScroll.js"></script>
<script type="text/javascript">
$(document).ready(function() {
@ -107,17 +100,5 @@
retrievePercent({{ entry.id|e }});
});
});
// Use left and right arrow to navigate on with keyboard
navigateKeyboard('?view=view&id={{ navigate.nextid|e }}','?view=view&id={{ navigate.previousid|e }}');
// swipe to right or left on mobile to navigate
$('article').on("swiperight", function(){
goLeft('?view=view&id={{ navigate.nextid|e }}');
});
$('article').on("swipeleft", function(){
goRight('?view=view&id={{ navigate.previousid|e }}');
});
</script>
{% endblock %}

View File

@ -29,10 +29,8 @@
<link rel="stylesheet" href="{{ poche_url }}themes/{{ theme }}/css/style-{{ theme }}.css" media="all" title="{{ theme }} theme">
<link rel="stylesheet" href="{{ poche_url }}themes/default/css/messages.css" media="all">
<link rel="stylesheet" href="{{ poche_url }}themes/default/css/print.css" media="print">
<script src="{{ poche_url }}themes/_global/js/jquery-2.1.3.min.js"></script>
<script src="{{ poche_url }}themes/_global/js/jquery.mobile.events.touch.min.js"></script>
<script src="{{ poche_url }}themes/_global/js/jquery-2.0.3.min.js"></script>
<script src="{{ poche_url }}themes/_global/js/autoClose.js"></script>
<script src="{{ poche_url }}themes/default/js/closeMessage.js"></script>
<script src="{{ poche_url }}themes/_global/js/saveLink.js"></script>
<script src="{{ poche_url }}themes/_global/js/keyboard.js"></script>
<script src="{{ poche_url }}themes/_global/js/popupForm.js"></script>

View File

@ -1,19 +1,7 @@
a.back span {
background-image: url('../img/default/home.png');
}
a.previous span {
background-image: url('../img/default/left.png');
}
a.next span {
background-image: url('../img/default/right.png');
}
a.archiveandnext span {
background-image: url('../img/default/forward.png');
}
a.top span {
background-image: url('../img/default/top.png');
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 B

View File

@ -5,12 +5,10 @@
{% include '_pocheit-form.twig' %}
<div id="article_toolbar">
<ul>
{% if navigate.next %}<li><a href="./?view=view&amp;id={{ navigate.nextid|e }}" class="tool previous"><span>{% trans "Next Article" %}</span></a></li>{% endif %}
<li><a href="./" title="{% trans "Return home" %}" class="tool back"><span>{% trans "Return home" %}</span></a></li>
<li><a href="#top" title="{% trans "Back to top" %}" class="tool top"><span>{% trans "Back to top" %}</span></a></li>
<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>
<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>
{% if navigate.next %}<li><a title="{% trans "Mark as read and go to next article" %}" class="tool archiveandnext" href="./?action=archive_and_next&amp;id={{ entry.id|e }}" id="markAsReadAndNext"><span>{% trans "Toggle mark as read and go to next article" %}</span></a></li>{% endif %}
<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>
<li><a title="{% trans "Delete" %}" class="tool delete" href="./?action=delete&amp;id={{ entry.id|e }}"><span>{% trans "Delete" %}</span></a></li>
{% 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 %}
@ -27,7 +25,6 @@
{% if constant('PDF') == 1 %}<li><a href="./?pdf&amp;method=id&amp;value={{ entry.id|e }}" title="Generate PDF file">PDF</a></li>{% endif %}
<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>
{% if constant('SHOW_READPERCENT') == 1 %}<li><div id="readLeftPercent">0%</div></li>{% endif %}
{% if navigate.previous %}<li><a href="./?view=view&amp;id={{ navigate.previousid|e }}" class="tool next"><span>{% trans "Previous Article" %}</span></a></li>{% endif %}
</ul>
</div>
<div id="article">
@ -125,17 +122,5 @@
$('#article_toolbar .tool.top').parent().hide();
}
});
// Use left and right arrow to navigate on with keyboard
navigateKeyboard('?view=view&id={{ navigate.nextid|e }}','?view=view&id={{ navigate.previousid|e }}');
// swipe to right or left on mobile to navigate
$('article').on("swiperight", function(){
goLeft('?view=view&id={{ navigate.nextid|e }}');
});
$('article').on("swipeleft", function(){
goRight('?view=view&id={{ navigate.previousid|e }}');
});
</script>
{% endblock %}