From d085a75a21ca1606a2be8ab7ee94617f38e0206e Mon Sep 17 00:00:00 2001 From: rlx Date: Sun, 10 Jan 2016 13:20:25 +0530 Subject: [PATCH] list view: implement doubleclick to scroll to top --- static/js/listToolbar.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/static/js/listToolbar.js b/static/js/listToolbar.js index 1052b83..6c80c39 100644 --- a/static/js/listToolbar.js +++ b/static/js/listToolbar.js @@ -16,7 +16,16 @@ oml.ui.listToolbar = function() { oml.$ui.sortElement = oml.ui.sortElement() ).append( oml.$ui.findElement = oml.ui.findElement() - ); + ) + .bindEvent({ + doubleclick: function(event) { + ( + ui.listView == 'list' + ? oml.$ui.list.$body + : oml.$ui.list + ).animate({scrollTop: 0}, 250); + } + }); return that;