(enabled)
| 980 | }; |
| 981 | |
| 982 | let _syncStatusBarEnabled = function (enabled) { |
| 983 | statusBarEnabled = enabled !== false; |
| 984 | |
| 985 | if (!statusBarEnabled) { |
| 986 | $('.boxOpt').hide(); |
| 987 | let selected = $('#jfContent .item.x-selected').first(); |
| 988 | if (selected.length) { |
| 989 | _toogleStatusBar(selected, true); |
| 990 | } else { |
| 991 | jfStatusBar && jfStatusBar.hide(); |
| 992 | $('body').addClass('hide-status-bar'); |
| 993 | } |
| 994 | return; |
| 995 | } |
| 996 | |
| 997 | let selected = $('#jfContent .item.x-selected').first(); |
| 998 | if (!selected.length) { |
| 999 | selected = $('#jfContent .item').first(); |
| 1000 | } |
| 1001 | if (!selected.length) { |
| 1002 | return; |
| 1003 | } |
| 1004 | |
| 1005 | _selectJsonElement(selected, {scroll: false}); |
| 1006 | }; |
| 1007 | |
| 1008 | let _getSelectedJsonElement = function () { |
| 1009 | let selected = $('#jfContent .item.x-selected').first(); |
no test coverage detected