ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject [3/3] incubator-ponymail git commit: regen JS
Date Mon, 05 Sep 2016 09:14:07 GMT
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 <humbedooh@apache.org>
Authored: Mon Sep 5 11:13:49 2016 +0200
Committer: Daniel Gruno <humbedooh@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;


Mime
View raw message