From 405a3886b400fd438878a574eae9e84d8c7112dd Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 8 Feb 2017 23:13:51 +0300 Subject: [PATCH] more fixes and tweaking... Signed-off-by: Alex A. Naanou --- ui (gen4)/lib/widget/browse.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ui (gen4)/lib/widget/browse.js b/ui (gen4)/lib/widget/browse.js index adce4772..1bc43cfa 100755 --- a/ui (gen4)/lib/widget/browse.js +++ b/ui (gen4)/lib/widget/browse.js @@ -763,10 +763,11 @@ function(list, options){ : options.to_top_button, function(p, e){ var d = move(p, -dialog.__list[id].length) - d - && e.prevAll().eq(Math.abs(d+1)).before(e) - // XXX hackish... + d != null + //&& e.prevAll().eq(Math.abs(d+1)).before(e) + && e.prevAll().last().before(e) && dialog + // XXX hackish... .updateItemNumbers() .trigger('to_top_button', p, e) }], @@ -777,10 +778,11 @@ function(list, options){ : options.to_bottom_button, function(p, e){ var d = move(p, dialog.__list[id].length) - d - && e.nextAll().eq(Math.abs(d-1)).after(e) - // XXX hackish... + d != null + //&& e.nextAll().eq(Math.abs(d-1)).after(e) + && e.nextAll().last().after(e) && dialog + // XXX hackish... .updateItemNumbers() .trigger('to_bottom_button', p, e) }],