Improve default UI for small or zoomed screens
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user