You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2016/09/05 09:14:05 UTC
[1/3] incubator-ponymail git commit: reword
Repository: incubator-ponymail
Updated Branches:
refs/heads/coffee-and-cake 6340e088e -> 97de334cc
reword
doesn't always have to be threads :)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/d725cd27
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/d725cd27
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/d725cd27
Branch: refs/heads/coffee-and-cake
Commit: d725cd272378c30b9269f4e8955370a9fb15305c
Parents: 6340e08
Author: Daniel Gruno <hu...@apache.org>
Authored: Mon Sep 5 10:57:52 2016 +0200
Committer: Daniel Gruno <hu...@apache.org>
Committed: Mon Sep 5 10:57:52 2016 +0200
----------------------------------------------------------------------
site/js/coffee/listview_basic.coffee | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/d725cd27/site/js/coffee/listview_basic.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/listview_basic.coffee b/site/js/coffee/listview_basic.coffee
index 3bf2274..1d84d06 100644
--- a/site/js/coffee/listview_basic.coffee
+++ b/site/js/coffee/listview_basic.coffee
@@ -78,7 +78,7 @@ class BasicListView
### Show how many threads out of how many we are showing ###
f = pos+1
l = Math.min(@listsize - pos, pos+rpp)
- dStat = new HTML('div', { style: {float: "left", width: "100%", fontSize: "80%", textAlign: "center"}}, "Showing threads #{f} through #{l} out of #{@listsize}")
+ dStat = new HTML('div', { style: {float: "left", width: "100%", fontSize: "80%", textAlign: "center"}}, "Showing items #{f} through #{l} out of #{@listsize}")
@lv.inject(dStat)
### First, build the prev/next buttons if needed ###
[3/3] incubator-ponymail git commit: regen JS
Posted by hu...@apache.org.
regen JS
Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/97de334c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/97de334c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/97de334c
Branch: refs/heads/coffee-and-cake
Commit: 97de334cc0bb73e9e0e5dee687485248ca5b2057
Parents: 202887a
Author: Daniel Gruno <hu...@apache.org>
Authored: Mon Sep 5 11:13:49 2016 +0200
Committer: Daniel Gruno <hu...@apache.org>
Committed: Mon Sep 5 11:13:49 2016 +0200
----------------------------------------------------------------------
site/js/ponymail-coffee.js | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/97de334c/site/js/ponymail-coffee.js
----------------------------------------------------------------------
diff --git a/site/js/ponymail-coffee.js b/site/js/ponymail-coffee.js
index 366db70..525ed91 100644
--- a/site/js/ponymail-coffee.js
+++ b/site/js/ponymail-coffee.js
@@ -1274,7 +1274,7 @@ BasicListView = (function() {
fontSize: "80%",
textAlign: "center"
}
- }, "Showing threads " + f + " through " + l + " out of " + this.listsize);
+ }, "Showing items " + f + " through " + l + " out of " + this.listsize);
this.lv.inject(dStat);
/* First, build the prev/next buttons if needed */
@@ -1533,7 +1533,8 @@ BasicListView = (function() {
/* swipe: go to next or previous page of emails, depending on mouse wheel direction */
BasicListView.prototype.swipe = function(e) {
- var direction, obj, scrollBar, style;
+ var direction, now, obj, scrollBar, style;
+ this.lastSwipe = this.lastSwipe || 0;
direction = "";
if (typeof e === 'string') {
direction = e;
@@ -1550,19 +1551,26 @@ BasicListView = (function() {
if (ponymail_email_open.length > 0 || scrollBar) {
return;
}
+
+ /* Make sure we don't swipe too fast! */
+ now = new Date().getTime();
+ if ((now - this.lastSwipe) < 100) {
+ return;
+ }
if (direction === 'down') {
/* Next page? */
if (this.listsize > (this.pos + this.rpp + 1)) {
- return this.scroll(this.rpp, this.pos + this.rpp);
+ this.scroll(this.rpp, this.pos + this.rpp);
}
} else if (direction === 'up') {
/* Previous page? */
if (this.pos > 0) {
- return this.scroll(this.rpp, Math.max(0, this.pos - this.rpp));
+ this.scroll(this.rpp, Math.max(0, this.pos - this.rpp));
}
}
+ return this.lastSwipe = now;
};
return BasicListView;
[2/3] incubator-ponymail git commit: don't swipe too fast
Posted by hu...@apache.org.
don't swipe too fast
scroll wheels without a click (or trackballs etc) might
swipe too fast, so add a delay to swiping.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/202887a8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/202887a8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/202887a8
Branch: refs/heads/coffee-and-cake
Commit: 202887a8974d8bdedcfdd6fb13fdbbe965b0a644
Parents: d725cd2
Author: Daniel Gruno <hu...@apache.org>
Authored: Mon Sep 5 11:13:44 2016 +0200
Committer: Daniel Gruno <hu...@apache.org>
Committed: Mon Sep 5 11:13:44 2016 +0200
----------------------------------------------------------------------
site/js/coffee/listview_basic.coffee | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/202887a8/site/js/coffee/listview_basic.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/listview_basic.coffee b/site/js/coffee/listview_basic.coffee
index 1d84d06..2e20235 100644
--- a/site/js/coffee/listview_basic.coffee
+++ b/site/js/coffee/listview_basic.coffee
@@ -244,6 +244,7 @@ class BasicListView
### swipe: go to next or previous page of emails, depending on mouse wheel direction ###
swipe: (e) ->
+ @lastSwipe = @lastSwipe || 0
direction = ""
if typeof e is 'string'
direction = e
@@ -259,6 +260,11 @@ class BasicListView
if ponymail_email_open.length > 0 or scrollBar
return
+ ### Make sure we don't swipe too fast! ###
+ now = new Date().getTime()
+ if (now - @lastSwipe) < 100
+ return
+
if direction == 'down'
### Next page? ###
if @listsize > (@pos+@rpp+1)
@@ -267,4 +273,4 @@ class BasicListView
### Previous page? ###
if @pos > 0
@scroll(@rpp, Math.max(0,@pos-@rpp))
-
\ No newline at end of file
+ @lastSwipe = now
\ No newline at end of file