diff --git a/customize.dist/loading.js b/customize.dist/loading.js index 765ec56f9..11a82f770 100644 --- a/customize.dist/loading.js +++ b/customize.dist/loading.js @@ -184,7 +184,7 @@ define([], function () { box-sizing: border-box; width: 80px; height: 80px; - border: 11px solid lightgrey; + border: 11px solid white; border-radius: 50%; border-top-color: transparent; animation: spin infinite 3s; diff --git a/customize.dist/src/less2/include/contextmenu.less b/customize.dist/src/less2/include/contextmenu.less index e4d1318ec..023053438 100644 --- a/customize.dist/src/less2/include/contextmenu.less +++ b/customize.dist/src/less2/include/contextmenu.less @@ -29,10 +29,6 @@ .dropdown-menu { top: -0.7rem; left: 100%; - &.left { - left: 0%; - transform: translate(-100%); - } } } a { diff --git a/www/drive/inner.js b/www/drive/inner.js index ac63b1a33..be0a60f36 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -498,10 +498,16 @@ define([ var $el = $(el); var $a = $el.children().filter("a"); var $sub = $el.find(".dropdown-menu").first(); + var left, bottomOffset; var timeoutId; var showSubmenu = function () { clearTimeout(timeoutId); - $sub.toggleClass("left", $el.offset().left + $el.outerWidth() + $sub.outerWidth() > $(window).width()); + left = $el.offset().left + $el.outerWidth() + $sub.outerWidth() > $(window).width(); + bottomOffset = $el.offset().top + $el.outerHeight() + $sub.outerHeight() - $(window).height(); + $sub.css("left", left ? "0%": "100%"); + $sub.css("transform", "translate(" + + (left ? "-100%" : "0") + + "," + (bottomOffset > 0 ? -(bottomOffset - $el.outerHeight()) : 0) + "px)"); $el.siblings().find(".dropdown-menu").hide(); $sub.show(); };