Improve default UI for small or zoomed screens

This commit is contained in:
yflory
2018-10-29 11:48:22 +01:00
parent 9d6c9dcf5e
commit db25d914ab
3 changed files with 28 additions and 6 deletions

View File

@@ -1122,14 +1122,30 @@ define([
common.setAttribute(['hideHelp', type], true);
};
$(closeButton).click(function () { toggleHelp(true); });
var showMore = function () {
$(text).addClass("cp-help-small");
var $dot = $('<span>').text('...').appendTo($(text).find('h1'));
$(text).click(function () {
$(text).removeClass('cp-help-small');
$(text).off('click');
$dot.remove();
});
};
$(closeButton).click(function (e) {
e.stopPropagation();
toggleHelp(true);
});
$toolbarButton.click(function () {
toggleHelp();
});
common.getAttribute(['hideHelp', type], function (err, val) {
if ($(window).height() < 800 && $(window).width() < 800) { return void toggleHelp(true); }
if (val === true) { toggleHelp(true); }
//if ($(window).height() < 800 || $(window).width() < 800) { return void toggleHelp(true); }
if (val === true) { return void toggleHelp(true); }
if (!val && ($(window).height() < 800 || $(window).width() < 800)) {
return void showMore();
}
});
return {

View File

@@ -481,7 +481,7 @@ Messenger, MessengerUI, Messages) {
});
show();
Common.getAttribute(['toolbar', 'chat-drawer'], function (err, val) {
if (val === false || ($(window).height() < 800 && $(window).width() < 800)) {
if (val === false || ($(window).height() < 800 || $(window).width() < 800)) {
return void hide();
}
show();