more fixes
This commit is contained in:
parent
c1a3d905ce
commit
d603cd2e74
4 changed files with 36 additions and 21 deletions
|
@ -202,6 +202,14 @@ canvas {
|
|||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#full footer.bar {
|
||||
margin: 10px -10px 0 -10px;
|
||||
}
|
||||
|
||||
#full footer.bar a.next {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.info {
|
||||
border: 3px solid black;
|
||||
background: white;
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
|
||||
<section id="full">
|
||||
<header class="bar">
|
||||
<a class="button" href="#list">Back</a>
|
||||
<a class="button" href="#list">List</a>
|
||||
<a id="setunread" class="button" href="#unread">Set unread</a>
|
||||
<canvas></canvas>
|
||||
</header>
|
||||
|
@ -89,6 +89,10 @@
|
|||
<p>Swipe with your finger right and left to navigate to next and previous article.</p>
|
||||
</div>
|
||||
<article>
|
||||
<footer class="bar">
|
||||
<a class="button previous" href="#previous">Previous</a>
|
||||
<a class="button next" href="#next">Next</a>
|
||||
</footer>
|
||||
</section>
|
||||
|
||||
<script src="js/application.js"></script>
|
||||
|
|
39
js/App.js
39
js/App.js
|
@ -7,24 +7,6 @@ function App() {
|
|||
if(!color) color = "red";
|
||||
this.setColor(color);
|
||||
|
||||
var _this = this;
|
||||
|
||||
jester($("#full")).flick(function(touches, direction) {
|
||||
if(direction == "left") _this.showNext();
|
||||
else _this.showPrevious();
|
||||
});
|
||||
|
||||
// FIXME move that code somewhere else
|
||||
$(".info.swipe").ontouchend = function(e) {
|
||||
localStorage.info_swipe = true;
|
||||
$(".info.swipe").addClass("hidden");
|
||||
};
|
||||
|
||||
if(localStorage.info_swipe) {
|
||||
$(".info.swipe").addClass("hidden");
|
||||
}
|
||||
|
||||
|
||||
var request = window.navigator.mozApps.getSelf();
|
||||
request.onsuccess = function() {
|
||||
$("#version").innerHTML = request.result.manifest.version;
|
||||
|
@ -69,6 +51,10 @@ App.prototype.after_login = function() {
|
|||
$$(".info").forEach(function(o) {
|
||||
o.removeClass("hidden");
|
||||
});
|
||||
} else if(url == "#next") {
|
||||
_this.showNext();
|
||||
} else if(url == "#previous") {
|
||||
_this.showPrevious();
|
||||
}
|
||||
|
||||
// this is here so you can tap on a button more then once
|
||||
|
@ -76,6 +62,23 @@ App.prototype.after_login = function() {
|
|||
window.location.hash = "#";
|
||||
}
|
||||
|
||||
// FIXME move that code somewhere else
|
||||
$(".info.swipe").ontouchend = function(e) {
|
||||
localStorage.info_swipe = true;
|
||||
$(".info.swipe").addClass("hidden");
|
||||
};
|
||||
|
||||
if(localStorage.info_swipe) {
|
||||
$(".info.swipe").addClass("hidden");
|
||||
}
|
||||
|
||||
// set up swiping
|
||||
jester($("#full")).flick(function(touches, direction) {
|
||||
if(direction == "left") _this.showNext();
|
||||
else _this.showPrevious();
|
||||
});
|
||||
|
||||
|
||||
this.changeToPage("#list");
|
||||
|
||||
this.ttrss = new TinyTinyRSS(this, localStorage.server_url, localStorage.session_id);
|
||||
|
|
|
@ -254,7 +254,7 @@
|
|||
opts.swipeDistance = opts.swipeDistance || 200;
|
||||
|
||||
opts.flickTime = opts.flickTime || 300;
|
||||
opts.flickDistance = opts.flickDistance || 200;
|
||||
opts.flickDistance = opts.flickDistance || 100;
|
||||
|
||||
opts.deadX = opts.deadX || 0;
|
||||
opts.deadY = opts.deadY || 0;
|
||||
|
|
Reference in a new issue