diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js
index 868de93f4..ef1f13ca2 100644
--- a/www/common/common-ui-elements.js
+++ b/www/common/common-ui-elements.js
@@ -2141,8 +2141,17 @@ define([
var show = function () {
var wh = $(window).height();
- var topPos = $container[0].getBoundingClientRect().bottom;
- $innerblock.css('max-height', Math.floor(wh - topPos - 1)+'px');
+ var button = $button[0].getBoundingClientRect();
+ var topPos = button.bottom;
+ $innerblock.css('bottom', '');
+ if (config.noscroll) {
+ var h = $innerblock.outerHeight();
+ if ((topPos + h) > wh) {
+ $innerblock.css('bottom', button.height+'px');
+ }
+ } else {
+ $innerblock.css('max-height', Math.floor(wh - topPos - 1)+'px');
+ }
$innerblock.show();
$innerblock.find('.cp-dropdown-element-active').removeClass('cp-dropdown-element-active');
if (config.isSelect && value) {
diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js
index 6d9eccfaa..45b7c51f3 100644
--- a/www/common/drive-ui.js
+++ b/www/common/drive-ui.js
@@ -2748,21 +2748,22 @@ define([
var options = [{
tag: 'a',
attributes: {'class': 'cp-app-drive-element-type'},
- content: Messages.fm_type
+ content: '' + Messages.fm_type
},{
tag: 'a',
attributes: {'class': 'cp-app-drive-element-atime'},
- content: Messages.fm_lastAccess
+ content: '' + Messages.fm_lastAccess
},{
tag: 'a',
attributes: {'class': 'cp-app-drive-element-ctime'},
- content: Messages.fm_creation
+ content: '' + Messages.fm_creation
}];
var dropdownConfig = {
text: '', // Button initial text
options: options, // Entries displayed in the menu
container: $fhSort,
left: true,
+ noscroll: true,
common: common
};
var $sortBlock = UIElements.createDropdown(dropdownConfig);
@@ -2805,7 +2806,7 @@ define([
if (APP.store[SORT_FILE_BY] === '') { classSorted = 'cp-app-drive-sort-filename'; }
else if (APP.store[SORT_FILE_BY]) { classSorted = 'cp-app-drive-element-' + APP.store[SORT_FILE_BY]; }
if (classSorted) {
- $list.find('.' + classSorted).addClass('cp-app-drive-sort-active').prepend($icon);
+ $list.find('.' + classSorted).addClass('cp-app-drive-sort-active').prepend($icon).find('i').hide();
}
};
var getFileListHeader = function (clickable) {