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;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#full footer.bar {
|
||||||
|
margin: 10px -10px 0 -10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#full footer.bar a.next {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
border: 3px solid black;
|
border: 3px solid black;
|
||||||
background: white;
|
background: white;
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
|
|
||||||
<section id="full">
|
<section id="full">
|
||||||
<header class="bar">
|
<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>
|
<a id="setunread" class="button" href="#unread">Set unread</a>
|
||||||
<canvas></canvas>
|
<canvas></canvas>
|
||||||
</header>
|
</header>
|
||||||
|
@ -89,6 +89,10 @@
|
||||||
<p>Swipe with your finger right and left to navigate to next and previous article.</p>
|
<p>Swipe with your finger right and left to navigate to next and previous article.</p>
|
||||||
</div>
|
</div>
|
||||||
<article>
|
<article>
|
||||||
|
<footer class="bar">
|
||||||
|
<a class="button previous" href="#previous">Previous</a>
|
||||||
|
<a class="button next" href="#next">Next</a>
|
||||||
|
</footer>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<script src="js/application.js"></script>
|
<script src="js/application.js"></script>
|
||||||
|
|
39
js/App.js
39
js/App.js
|
@ -7,24 +7,6 @@ function App() {
|
||||||
if(!color) color = "red";
|
if(!color) color = "red";
|
||||||
this.setColor(color);
|
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();
|
var request = window.navigator.mozApps.getSelf();
|
||||||
request.onsuccess = function() {
|
request.onsuccess = function() {
|
||||||
$("#version").innerHTML = request.result.manifest.version;
|
$("#version").innerHTML = request.result.manifest.version;
|
||||||
|
@ -69,6 +51,10 @@ App.prototype.after_login = function() {
|
||||||
$$(".info").forEach(function(o) {
|
$$(".info").forEach(function(o) {
|
||||||
o.removeClass("hidden");
|
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
|
// 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 = "#";
|
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.changeToPage("#list");
|
||||||
|
|
||||||
this.ttrss = new TinyTinyRSS(this, localStorage.server_url, localStorage.session_id);
|
this.ttrss = new TinyTinyRSS(this, localStorage.server_url, localStorage.session_id);
|
||||||
|
|
|
@ -254,7 +254,7 @@
|
||||||
opts.swipeDistance = opts.swipeDistance || 200;
|
opts.swipeDistance = opts.swipeDistance || 200;
|
||||||
|
|
||||||
opts.flickTime = opts.flickTime || 300;
|
opts.flickTime = opts.flickTime || 300;
|
||||||
opts.flickDistance = opts.flickDistance || 200;
|
opts.flickDistance = opts.flickDistance || 100;
|
||||||
|
|
||||||
opts.deadX = opts.deadX || 0;
|
opts.deadX = opts.deadX || 0;
|
||||||
opts.deadY = opts.deadY || 0;
|
opts.deadY = opts.deadY || 0;
|
||||||
|
|
Reference in a new issue