From c620453ebf49274cda581b390e999bb3aaaf121c Mon Sep 17 00:00:00 2001 From: hexeth <7627137+hexeth@users.noreply.github.com> Date: Fri, 18 Jan 2019 10:57:42 -0800 Subject: [PATCH] UL positioning --- cps/static/js/caliBlur.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cps/static/js/caliBlur.js b/cps/static/js/caliBlur.js index fce58b39..8528688f 100644 --- a/cps/static/js/caliBlur.js +++ b/cps/static/js/caliBlur.js @@ -226,6 +226,17 @@ return $(this).text().replace(/^\s+|^\t+|\t+|\s+$/g, ""); $( '.readinbrowser-drop' ).attr("style", "left: " + position + "px !important; right: auto; top: " + topPos + "px"); } } + + if ( $( '#sendbtn2' ).length > 0 ) { + position = $( '#sendbtn2' ).offset().left + if ( position + $( '.sendtokindle-drop' ).width() > $( window ).width() ) { + positionOff = position + $( '.sendtokindle-drop' ).width() - $( window ).width(); + ribPosition = position - positionOff - 5 + $( '.sendtokindle-drop' ).attr("style", "left: " + ribPosition + "px !important; right: auto; top: " + topPos + "px"); + } else { + $( '.sendtokindle-drop' ).attr("style", "left: " + position + "px !important; right: auto; top: " + topPos + "px"); + } + } if ( $( '.downloadBtn' ).length > 0 ) {