[DE PE SSE] Fix bug 54026

This commit is contained in:
JuliaSvinareva 2021-11-23 21:13:26 +03:00
parent 74d378b1d8
commit f453c6a090

View file

@ -120,7 +120,11 @@ Common.UI.HintManager = new(function() {
var _api; var _api;
var _setCurrentSection = function (btn) { var _setCurrentSection = function (btn, section) {
if (section) {
_currentSection = section;
return;
}
if (btn === 'esc') { if (btn === 'esc') {
if (_currentLevel === 0) { if (_currentLevel === 0) {
_currentSection = document; _currentSection = document;
@ -172,11 +176,15 @@ Common.UI.HintManager = new(function() {
clearInterval(_inputTimer); clearInterval(_inputTimer);
}; };
var _nextLevel = function() { var _nextLevel = function(level) {
_removeHints(); _removeHints();
_currentHints.length = 0; _currentHints.length = 0;
_currentControls.length = 0; _currentControls.length = 0;
if (level !== undefined) {
_currentLevel = level;
} else {
_currentLevel++; _currentLevel++;
}
}; };
var _prevLevel = function() { var _prevLevel = function() {
@ -476,8 +484,9 @@ Common.UI.HintManager = new(function() {
_resetToDefault(); _resetToDefault();
return; return;
} }
var needOpenPanel = (curr.attr('content-target') && !$('#' + curr.attr('content-target')).is(':visible')); var needOpenPanel = (curr.attr('content-target') && !$('#' + curr.attr('content-target')).is(':visible') ||
if (!curr.attr('content-target') || needOpenPanel) { // need to open panel (curr.parent().prop('id') === 'slot-btn-chat' && !$('#left-panel-chat').is(':visible')));
if ((!curr.attr('content-target') && curr.parent().prop('id') !== 'slot-btn-chat') || needOpenPanel) { // need to open panel
if (!($('#file-menu-panel').is(':visible') && (curr.parent().prop('id') === 'fm-btn-info' && $('#panel-info').is(':visible') || if (!($('#file-menu-panel').is(':visible') && (curr.parent().prop('id') === 'fm-btn-info' && $('#panel-info').is(':visible') ||
curr.parent().prop('id') === 'fm-btn-settings' && $('#panel-settings').is(':visible')))) { curr.parent().prop('id') === 'fm-btn-settings' && $('#panel-settings').is(':visible')))) {
if (curr.attr('for')) { // to trigger event in checkbox if (curr.attr('for')) { // to trigger event in checkbox
@ -503,8 +512,13 @@ Common.UI.HintManager = new(function() {
return; return;
} }
if (!_isComplete) { if (!_isComplete) {
if (curr.parent().prop('id') === 'slot-btn-chat') {
_nextLevel(1);
_setCurrentSection(undefined, $('#left-menu.hint-section'));
} else {
_nextLevel(); _nextLevel();
_setCurrentSection(curr); _setCurrentSection(curr);
}
_showHints(); _showHints();
if (_currentHints.length < 1) { if (_currentHints.length < 1) {
_resetToDefault(); _resetToDefault();