Merge pull request #3071 from ONLYOFFICE/fix/for-hotfix

Fix/for hotfix
This commit is contained in:
Julia Radzhabova
2024-06-24 13:41:24 +03:00
committed by GitHub
19 changed files with 210 additions and 82 deletions

View File

@ -871,6 +871,7 @@ define([
this.submitedTooltip && this.submitedTooltip.hide();
this.view.btnSubmit.setDisabled(true);
this.view.btnSubmit.cmpEl.css("pointer-events", "none");
this.disableFillingForms(true);
break;
case LoadingDocument:
text = this.textLoadingDocument + ' ';
@ -923,7 +924,8 @@ define([
this.submitedTooltip.show();
this.api.asc_setRestriction(Asc.c_oAscRestrictionType.View);
this.onApiServerDisconnect(true);
}
} else
this.disableFillingForms(false);
}
if ( type == Asc.c_oAscAsyncActionType.BlockInteraction &&
!((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['LoadFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges'] || id == Asc.c_oAscAsyncAction['DownloadAs']) && Common.Utils.ModalWindow.isVisible()) ) {
@ -1974,6 +1976,14 @@ define([
}
},
disableFillingForms: function(state) {
this._isDisabled = state;
this.view && this.view.btnClear && this.view.btnClear.setDisabled(state);
this.view && this.view.btnUndo && this.view.btnUndo.setDisabled(state || !this.api.asc_getCanUndo());
this.view && this.view.btnRedo && this.view.btnRedo.setDisabled(state || !this.api.asc_getCanRedo());
this.api.asc_setRestriction(state || !this.appOptions.canFillForms ? Asc.c_oAscRestrictionType.View : Asc.c_oAscRestrictionType.OnlyForms);
},
onApiServerDisconnect: function(enableDownload) {
this._state.isDisconnected = true;
this._isDisabled = true;

View File

@ -457,6 +457,7 @@ define([
onLongActionBegin: function(type, id) {
if (id==Asc.c_oAscAsyncAction['Submit'] && this.view.btnSubmit) {
Common.NotificationCenter.trigger('doc:mode-apply', 'view', true, true);
this._submitFail = false;
this.submitedTooltip && this.submitedTooltip.hide();
Common.Utils.lockControls(Common.enumLock.submit, true, {array: [this.view.btnSubmit]})
@ -482,8 +483,8 @@ define([
}, this);
}
this.submitedTooltip.show();
Common.NotificationCenter.trigger('doc:mode-apply', 'view', true, true);
}
} else
Common.NotificationCenter.trigger('doc:mode-apply', 'view-form', true, true);
}
},

View File

@ -1974,7 +1974,7 @@ define([
'<div ' +
'style="margin-bottom:<%= offsetY %>px;' +
'margin-right:<%= offsetX %>px;' +
'box-shadow: <%= offsetX %>px <%= offsetY %>px 0px <%= spread %>px <% if(Common.Utils.isIE) {%>rgba(0,0,0,0.4)<%} else {%>var(--text-tertiary)<%}%>;"' +
'box-shadow: <% if(Common.Utils.isIE) {%>rgba(0,0,0,0.4)<%} else {%>var(--text-tertiary)<%}%> <%= offsetX %>px <%= offsetY %>px 0px <%= spread %>px ;"' +
'>' +
'</div>' +
'</div>')

View File

@ -314,11 +314,15 @@
visible = true;
isForm && document.body.classList.add('pdf-form');
(compact || view || notoolbar) && document.querySelector('.brendpanel > :nth-child(2)').remove();
if (compact || view || notoolbar) {
let child = document.querySelector('.brendpanel > :nth-child(2)');
child && child.parentNode && child.parentNode.removeChild(child);
}
if (compact || view) {
if (notoolbar) {
document.querySelector('.brendpanel > :nth-child(1)').remove();
let child = document.querySelector('.brendpanel > :nth-child(1)');
child && child.parentNode && child.parentNode.removeChild(child);
visible = false;
} else
document.querySelector('.brendpanel > :nth-child(1)').style.height = '32px';
@ -327,12 +331,14 @@
}
if (compact) {
document.querySelectorAll('.not-compact').forEach(function(item){
item.remove();
});
document.querySelectorAll('.compact').forEach(function(item){
item.style.display = 'inline-block';
});
var elements = document.querySelectorAll('.not-compact');
for (let i = 0; i < elements.length; i++) {
elements[i].parentNode.removeChild(elements[i]);
}
elements = document.querySelectorAll('.compact');
for (let i = 0; i < elements.length; i++) {
elements[i].style.display = 'inline-block';
}
if (document.body.classList.contains('rtl'))
document.querySelector('.fat').style.right = '592px';
else

View File

@ -277,11 +277,15 @@
visible = true;
isForm && document.body.classList.add('pdf-form');
(compact || view || notoolbar) && document.querySelector('.brendpanel > :nth-child(2)').remove();
if (compact || view || notoolbar) {
let child = document.querySelector('.brendpanel > :nth-child(2)');
child && child.parentNode && child.parentNode.removeChild(child);
}
if (compact || view) {
if (notoolbar) {
document.querySelector('.brendpanel > :nth-child(1)').remove();
let child = document.querySelector('.brendpanel > :nth-child(1)');
child && child.parentNode && child.parentNode.removeChild(child);
visible = false;
} else
document.querySelector('.brendpanel > :nth-child(1)').style.height = '32px';
@ -290,12 +294,14 @@
}
if (compact) {
document.querySelectorAll('.not-compact').forEach(function(item){
item.remove();
});
document.querySelectorAll('.compact').forEach(function(item){
item.style.display = 'inline-block';
});
var elements = document.querySelectorAll('.not-compact');
for (let i = 0; i < elements.length; i++) {
elements[i].parentNode.removeChild(elements[i]);
}
elements = document.querySelectorAll('.compact');
for (let i = 0; i < elements.length; i++) {
elements[i].style.display = 'inline-block';
}
if (document.body.classList.contains('rtl'))
document.querySelector('.fat').style.right = '592px';
else

View File

@ -81,7 +81,10 @@ define([
'DocumentHolder': {
'createdelayedelements': this.createDelayedElements,
'equation:callback': this.equationCallback
}
},
'FileMenu': {
'settings:apply': _.bind(this.applySettings, this)
},
});
var me = this;
@ -2811,7 +2814,7 @@ define([
}
this.lastAnnotBarBounds = bounds;
if (bounds[3] < 0 || bounds[1] > this._Height) {
if (bounds[3] < 0 || bounds[1] > this._Height || !Common.Utils.InternalSettings.get('pdfe-settings-annot-bar')) {
this.onHideAnnotBar();
return;
}
@ -2901,6 +2904,10 @@ define([
editComplete: function() {
this.documentHolder && this.documentHolder.fireEvent('editcomplete', this.documentHolder);
},
applySettings: function() {
!Common.Utils.InternalSettings.get('pdfe-settings-annot-bar') && this.onHideAnnotBar();
}
});
});

View File

@ -1015,6 +1015,8 @@ define([
value = Common.localStorage.getBool("pdfe-settings-show-alt-hints", Common.Utils.isMac ? false : true);
Common.Utils.InternalSettings.set("pdfe-settings-show-alt-hints", value);
value = Common.localStorage.getBool("pdfe-settings-annot-bar", true);
Common.Utils.InternalSettings.set("pdfe-settings-annot-bar", value);
/** coauthoring begin **/
me.onPdfModeCoAuthApply();

View File

@ -1306,7 +1306,7 @@ define([
(new Promise(function(accept) {
accept();
})).then(function () {
var hand = (config.isEdit && !config.isPDFEdit || config.isRestrictedEdit);
var hand = !config.isEdit;
me.toolbar && me.toolbar.btnHandTool && me.toolbar[hand ? 'btnHandTool' : 'btnSelectTool'].toggle(true, true);
me.api && me.api.asc_setViewerTargetType(hand ? 'hand' : 'select');
if (config.isRestrictedEdit && me.toolbar && me.toolbar.btnSubmit && me.api && !me.api.asc_IsAllRequiredFormsFilled()) {

View File

@ -40,7 +40,8 @@
*/
define([
'common/main/lib/view/DocumentAccessDialog'
'common/main/lib/view/DocumentAccessDialog',
'common/main/lib/view/CustomizeQuickAccessDialog'
], function () {
'use strict';
@ -346,6 +347,9 @@ define([
'<tr>',
'<td colspan="2"><div id="fms-chb-use-alt-key"></div></td>',
'</tr>',
'<tr class="edit">',
'<td colspan="2"><div id="fms-chb-annotation-bar"></div></td>',
'</tr>',
'<tr class="ui-rtl">',
'<td colspan="2"><div id="fms-chb-rtl-ui" style="display: inline-block;"></div><span class="beta-hint">Beta</span></td>',
'</tr>',
@ -355,13 +359,16 @@ define([
'<label class="comment-text"><%= scope.txtQuickPrintTip %></label></span></div>',
'</td>',
'</tr>',*/
'<tr class="edit quick-access">',
'<td colspan="2"><button type="button" class="btn btn-text-default" id="fms-btn-customize-quick-access" style="width:auto;display:inline-block;padding-right:10px;padding-left:10px;" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.txtCustomizeQuickAccess %></button></div></td>',
'</tr>',
'<tr class="themes">',
'<td><label><%= scope.strTheme %></label></td>',
'<td>',
'<div><div id="fms-cmb-theme"></div>',
'<div id="fms-chb-dark-mode"></div></div></td>',
'</tr>',
'<tr class="edit">',
'<tr class="edit-pdf">',
'<td><label><%= scope.strUnit %></label></td>',
'<td><span id="fms-cmb-unit"></span></td>',
'</tr>',
@ -410,6 +417,14 @@ define([
});
(Common.Utils.isIE || Common.Utils.isMac && Common.Utils.isGecko) && this.chUseAltKey.$el.parent().parent().hide();
this.chUseAnnotateBar = new Common.UI.CheckBox({
el: $markup.findById('#fms-chb-annotation-bar'),
labelText: this.txtUseAnnotateBar,
dataHint: '2',
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.chScreenReader = new Common.UI.CheckBox({
el: $markup.findById('#fms-chb-scrn-reader'),
labelText: this.txtScreenReader,
@ -590,6 +605,11 @@ define([
dataHintOffset: 'big'
});
this.btnCustomizeQuickAccess = new Common.UI.Button({
el: $markup.findById('#fms-btn-customize-quick-access')
});
this.btnCustomizeQuickAccess.on('click', _.bind(this.customizeQuickAccess, this));
this.cmbTheme = new Common.UI.ComboBox({
el : $markup.findById('#fms-cmb-theme'),
style : 'width: 160px;',
@ -690,7 +710,8 @@ define([
var fast_coauth = Common.Utils.InternalSettings.get("pdfe-settings-coauthmode"),
canPDFSave = (mode.isPDFAnnotate || mode.isPDFEdit) && mode.canSaveToFile && !mode.isOffline;
$('tr.edit', this.el)[mode.isPDFEdit?'show':'hide']();
$('tr.edit', this.el)[mode.isEdit?'show':'hide']();
$('tr.edit-pdf', this.el)[mode.isPDFEdit?'show':'hide']();
$('tr.autosave', this.el)[mode.isEdit && canPDFSave && (mode.canChangeCoAuthoring || !fast_coauth) ? 'show' : 'hide']();
$('tr.forcesave', this.el)[mode.canForcesave && canPDFSave ? 'show' : 'hide']();
$('tr.editsave',this.el)[(mode.isEdit || mode.canForcesave) && canPDFSave ? 'show' : 'hide']();
@ -709,6 +730,10 @@ define([
if ( !Common.UI.Themes.available() ) {
$('tr.themes, tr.themes + tr.divider', this.el).hide();
}
if (mode.compactHeader) {
$('tr.quick-access', this.el).hide();
}
},
setApi: function(o) {
@ -719,6 +744,7 @@ define([
updateSettings: function() {
this.chUseAltKey.setValue(Common.Utils.InternalSettings.get("pdfe-settings-show-alt-hints"));
this.chScreenReader.setValue(Common.Utils.InternalSettings.get("app-settings-screen-reader"));
this.chUseAnnotateBar.setValue(Common.Utils.InternalSettings.get("pdfe-settings-annot-bar"));
var value = Common.Utils.InternalSettings.get("pdfe-settings-zoom");
value = (value!==null) ? parseInt(value) : (this.mode.customization && this.mode.customization.zoom ? parseInt(this.mode.customization.zoom) : 100);
@ -788,6 +814,8 @@ define([
Common.localStorage.setItem("pdfe-settings-zoom", this.cmbZoom.getValue());
Common.Utils.InternalSettings.set("pdfe-settings-zoom", Common.localStorage.getItem("pdfe-settings-zoom"));
Common.localStorage.setItem("app-settings-screen-reader", this.chScreenReader.isChecked() ? 1 : 0);
Common.localStorage.setItem("pdfe-settings-annot-bar", this.chUseAnnotateBar.isChecked() ? 1 : 0);
Common.Utils.InternalSettings.set("pdfe-settings-annot-bar", Common.localStorage.getBool("pdfe-settings-annot-bar"));
/** coauthoring begin **/
Common.Utils.InternalSettings.set("pdfe-settings-livecomment", this.chLiveComment.isChecked());
@ -854,6 +882,23 @@ define([
this._fontRender = combo.getValue();
},
customizeQuickAccess: function () {
if (this.dlgQuickAccess && this.dlgQuickAccess.isVisible()) return;
this.dlgQuickAccess = new Common.Views.CustomizeQuickAccessDialog({
showSave: this.mode.showSaveButton,
showPrint: this.mode.canPrint && this.mode.twoLevelHeader,
showQuickPrint: this.mode.canQuickPrint && this.mode.twoLevelHeader,
props: {
save: Common.localStorage.getBool('pdfe-quick-access-save', true),
print: Common.localStorage.getBool('pdfe-quick-access-print', true),
quickPrint: Common.localStorage.getBool('pdfe-quick-access-quick-print', true),
undo: Common.localStorage.getBool('pdfe-quick-access-undo', true),
redo: Common.localStorage.getBool('pdfe-quick-access-redo', true)
}
});
this.dlgQuickAccess.show();
},
strZoom: 'Default Zoom Value',
strShowChanges: 'Real-time Collaboration Changes',
txtAll: 'View All',
@ -897,7 +942,9 @@ define([
strUnit: 'Unit of Measurement',
txtInch: 'Inch',
txtCm: 'Centimeter',
txtPt: 'Point'
txtPt: 'Point',
txtUseAnnotateBar: 'Use the mini toolbar when selecting text',
txtCustomizeQuickAccess: 'Customize quick access'
}, PDFE.Views.FileMenuPanels.Settings || {}));

View File

@ -1835,7 +1835,7 @@ define([
'<div ' +
'style="margin-bottom:<%= offsetY %>px;' +
'margin-right:<%= offsetX %>px;' +
'box-shadow: <%= offsetX %>px <%= offsetY %>px 0px <%= spread %>px <% if(Common.Utils.isIE) {%>rgba(0,0,0,0.4)<%} else {%>var(--text-tertiary)<%}%>;"' +
'box-shadow: <% if(Common.Utils.isIE) {%>rgba(0,0,0,0.4)<%} else {%>var(--text-tertiary)<%}%> <%= offsetX %>px <%= offsetY %>px 0px <%= spread %>px ;"' +
'>' +
'</div>' +
'</div>')

View File

@ -298,11 +298,15 @@
view = params["mode"] == 'view',
visible = true;
(compact || view || notoolbar) && document.querySelector('.brendpanel > :nth-child(2)').remove();
if (compact || view || notoolbar) {
let child = document.querySelector('.brendpanel > :nth-child(2)');
child && child.parentNode && child.parentNode.removeChild(child);
}
if (compact || view) {
if (notoolbar) {
document.querySelector('.brendpanel > :nth-child(1)').remove();
let child = document.querySelector('.brendpanel > :nth-child(1)');
child && child.parentNode && child.parentNode.removeChild(child);
visible = false;
} else
document.querySelector('.brendpanel > :nth-child(1)').style.height = '32px';
@ -311,12 +315,14 @@
}
if (compact) {
document.querySelectorAll('.not-compact').forEach(function(item){
item.remove();
});
document.querySelectorAll('.compact').forEach(function(item){
item.style.display = 'inline-block';
});
var elements = document.querySelectorAll('.not-compact');
for (let i = 0; i < elements.length; i++) {
elements[i].parentNode.removeChild(elements[i]);
}
elements = document.querySelectorAll('.compact');
for (let i = 0; i < elements.length; i++) {
elements[i].style.display = 'inline-block';
}
}
visible && (document.querySelector('.brendpanel').style.display = 'block');

View File

@ -262,11 +262,15 @@
view = params["mode"] == 'view',
visible = true;
(compact || view || notoolbar) && document.querySelector('.brendpanel > :nth-child(2)').remove();
if (compact || view || notoolbar) {
let child = document.querySelector('.brendpanel > :nth-child(2)');
child && child.parentNode && child.parentNode.removeChild(child);
}
if (compact || view) {
if (notoolbar) {
document.querySelector('.brendpanel > :nth-child(1)').remove();
let child = document.querySelector('.brendpanel > :nth-child(1)');
child && child.parentNode && child.parentNode.removeChild(child);
visible = false;
} else
document.querySelector('.brendpanel > :nth-child(1)').style.height = '32px';
@ -275,12 +279,14 @@
}
if (compact) {
document.querySelectorAll('.not-compact').forEach(function(item){
item.remove();
});
document.querySelectorAll('.compact').forEach(function(item){
item.style.display = 'inline-block';
});
var elements = document.querySelectorAll('.not-compact');
for (let i = 0; i < elements.length; i++) {
elements[i].parentNode.removeChild(elements[i]);
}
elements = document.querySelectorAll('.compact');
for (let i = 0; i < elements.length; i++) {
elements[i].style.display = 'inline-block';
}
}
visible && (document.querySelector('.brendpanel').style.display = 'block');

View File

@ -330,6 +330,13 @@
"Common.Views.UserNameDialog.textDontShow": "Don't ask me again",
"Common.Views.UserNameDialog.textLabel": "Label:",
"Common.Views.UserNameDialog.textLabelError": "Label must not be empty.",
"Common.Views.CustomizeQuickAccessDialog.textMsg": "Check the commands that will be displayed on the Quick Access Toolbar",
"Common.Views.CustomizeQuickAccessDialog.textPrint": "Print",
"Common.Views.CustomizeQuickAccessDialog.textQuickPrint": "Quick Print",
"Common.Views.CustomizeQuickAccessDialog.textRedo": "Redo",
"Common.Views.CustomizeQuickAccessDialog.textSave": "Save",
"Common.Views.CustomizeQuickAccessDialog.textTitle": "Customize quick access",
"Common.Views.CustomizeQuickAccessDialog.textUndo": "Undo",
"PDFE.Controllers.InsTab.textAccent": "Accents",
"PDFE.Controllers.InsTab.textBracket": "Brackets",
"PDFE.Controllers.InsTab.textFraction": "Fractions",
@ -1322,6 +1329,8 @@
"PDFE.Views.FileMenuPanels.Settings.txtUseOptionKey": "Use Option key to navigate the user interface using the keyboard",
"PDFE.Views.FileMenuPanels.Settings.txtWin": "as Windows",
"PDFE.Views.FileMenuPanels.Settings.txtWorkspace": "Workspace",
"PDFE.Views.FileMenuPanels.Settings.txtUseAnnotateBar": "Use the mini toolbar when selecting text",
"PDFE.Views.FileMenuPanels.txtCustomizeQuickAccess": "Customize quick access",
"PDFE.Views.FileMenuPanels.ViewSaveAs.textDownloadAs": "Download as",
"PDFE.Views.FileMenuPanels.ViewSaveCopy.textSaveCopyAs": "Save Copy as",
"PDFE.Views.HyperlinkSettingsDialog.strDisplay": "Display",

View File

@ -1835,7 +1835,7 @@ define([
'<div ' +
'style="margin-bottom:<%= offsetY %>px;' +
'margin-right:<%= offsetX %>px;' +
'box-shadow: <%= offsetX %>px <%= offsetY %>px 0px <%= spread %>px <% if(Common.Utils.isIE) {%>rgba(0,0,0,0.4)<%} else {%>var(--text-tertiary)<%}%>;"' +
'box-shadow: <% if(Common.Utils.isIE) {%>rgba(0,0,0,0.4)<%} else {%>var(--text-tertiary)<%}%> <%= offsetX %>px <%= offsetY %>px 0px <%= spread %>px ;"' +
'>' +
'</div>' +
'</div>')

View File

@ -311,11 +311,15 @@
view = params["mode"] == 'view',
visible = true;
(compact || view || notoolbar) && document.querySelector('.brendpanel > :nth-child(2)').remove();
if (compact || view || notoolbar) {
let child = document.querySelector('.brendpanel > :nth-child(2)');
child && child.parentNode && child.parentNode.removeChild(child);
}
if (compact || view) {
if (notoolbar) {
document.querySelector('.brendpanel > :nth-child(1)').remove();
let child = document.querySelector('.brendpanel > :nth-child(1)');
child && child.parentNode && child.parentNode.removeChild(child);
visible = false;
} else
document.querySelector('.brendpanel > :nth-child(1)').style.height = '32px';
@ -324,12 +328,14 @@
}
if (compact) {
document.querySelectorAll('.not-compact').forEach(function(item){
item.remove();
});
document.querySelectorAll('.compact').forEach(function(item){
item.style.display = 'inline-block';
});
var elements = document.querySelectorAll('.not-compact');
for (let i = 0; i < elements.length; i++) {
elements[i].parentNode.removeChild(elements[i]);
}
elements = document.querySelectorAll('.compact');
for (let i = 0; i < elements.length; i++) {
elements[i].style.display = 'inline-block';
}
if (document.body.classList.contains('rtl'))
document.querySelector('.fat').style.right = '865px';
else

View File

@ -304,11 +304,15 @@
view = params["mode"] == 'view',
visible = true;
(compact || view || notoolbar) && document.querySelector('.brendpanel > :nth-child(2)').remove();
if (compact || view || notoolbar) {
let child = document.querySelector('.brendpanel > :nth-child(2)');
child && child.parentNode && child.parentNode.removeChild(child);
}
if (compact || view) {
if (notoolbar) {
document.querySelector('.brendpanel > :nth-child(1)').remove();
let child = document.querySelector('.brendpanel > :nth-child(1)');
child && child.parentNode && child.parentNode.removeChild(child);
visible = false;
} else
document.querySelector('.brendpanel > :nth-child(1)').style.height = '32px';
@ -317,12 +321,14 @@
}
if (compact) {
document.querySelectorAll('.not-compact').forEach(function(item){
item.remove();
});
document.querySelectorAll('.compact').forEach(function(item){
item.style.display = 'inline-block';
});
var elements = document.querySelectorAll('.not-compact');
for (let i = 0; i < elements.length; i++) {
elements[i].parentNode.removeChild(elements[i]);
}
elements = document.querySelectorAll('.compact');
for (let i = 0; i < elements.length; i++) {
elements[i].style.display = 'inline-block';
}
if (document.body.classList.contains('rtl'))
document.querySelector('.fat').style.right = '865px';
else

View File

@ -1851,7 +1851,7 @@ define([
'<div ' +
'style="margin-bottom:<%= offsetY %>px;' +
'margin-right:<%= offsetX %>px;' +
'box-shadow: <%= offsetX %>px <%= offsetY %>px 0px <%= spread %>px <% if(Common.Utils.isIE) {%>rgba(0,0,0,0.4)<%} else {%>var(--text-tertiary)<%}%>;"' +
'box-shadow: <% if(Common.Utils.isIE) {%>rgba(0,0,0,0.4)<%} else {%>var(--text-tertiary)<%}%> <%= offsetX %>px <%= offsetY %>px 0px <%= spread %>px ;"' +
'>' +
'</div>' +
'</div>')

View File

@ -330,15 +330,21 @@
visible = true;
if (internal) {
document.querySelector('.brendpanel').remove();
document.querySelector('.sktoolbar').remove();
let child = document.querySelector('.brendpanel');
child && child.parentNode && child.parentNode.removeChild(child);
child = document.querySelector('.sktoolbar');
child && child.parentNode && child.parentNode.removeChild(child);
}
(compact || view || notoolbar) && document.querySelector('.brendpanel > :nth-child(2)').remove();
if (compact || view || notoolbar) {
let child = document.querySelector('.brendpanel > :nth-child(2)');
child && child.parentNode && child.parentNode.removeChild(child);
}
if (compact || view) {
if (notoolbar) {
document.querySelector('.brendpanel > :nth-child(1)').remove();
let child = document.querySelector('.brendpanel > :nth-child(1)');
child && child.parentNode && child.parentNode.removeChild(child);
visible = false;
} else
document.querySelector('.brendpanel > :nth-child(1)').style.height = '32px';
@ -347,12 +353,14 @@
}
if (compact) {
document.querySelectorAll('.not-compact').forEach(function(item){
item.remove();
});
document.querySelectorAll('.compact').forEach(function(item){
item.style.display = 'inline-block';
});
var elements = document.querySelectorAll('.not-compact');
for (let i = 0; i < elements.length; i++) {
elements[i].parentNode.removeChild(elements[i]);
}
elements = document.querySelectorAll('.compact');
for (let i = 0; i < elements.length; i++) {
elements[i].style.display = 'inline-block';
}
if (document.body.classList.contains('rtl'))
document.querySelector('.fat').style.right = '923px';
else

View File

@ -316,15 +316,21 @@
visible = true;
if (internal) {
document.querySelector('.brendpanel').remove();
document.querySelector('.sktoolbar').remove();
let child = document.querySelector('.brendpanel');
child && child.parentNode && child.parentNode.removeChild(child);
child = document.querySelector('.sktoolbar');
child && child.parentNode && child.parentNode.removeChild(child);
}
(compact || view || notoolbar) && document.querySelector('.brendpanel > :nth-child(2)').remove();
if (compact || view || notoolbar) {
let child = document.querySelector('.brendpanel > :nth-child(2)');
child && child.parentNode && child.parentNode.removeChild(child);
}
if (compact || view) {
if (notoolbar) {
document.querySelector('.brendpanel > :nth-child(1)').remove();
let child = document.querySelector('.brendpanel > :nth-child(1)');
child && child.parentNode && child.parentNode.removeChild(child);
visible = false;
} else
document.querySelector('.brendpanel > :nth-child(1)').style.height = '32px';
@ -333,12 +339,14 @@
}
if (compact) {
document.querySelectorAll('.not-compact').forEach(function(item){
item.remove();
});
document.querySelectorAll('.compact').forEach(function(item){
item.style.display = 'inline-block';
});
var elements = document.querySelectorAll('.not-compact');
for (let i = 0; i < elements.length; i++) {
elements[i].parentNode.removeChild(elements[i]);
}
elements = document.querySelectorAll('.compact');
for (let i = 0; i < elements.length; i++) {
elements[i].style.display = 'inline-block';
}
if (document.body.classList.contains('rtl'))
document.querySelector('.fat').style.right = '923px';
else