[DE PE SSE] Fix hide statusbar for customization in view tab

This commit is contained in:
JuliaSvinareva 2022-01-12 17:41:48 +03:00
parent c2d5af84c8
commit dde8ebb346
7 changed files with 31 additions and 11 deletions

View file

@ -72,12 +72,22 @@ define([
}, },
setConfig: function(config) { setConfig: function(config) {
var mode = config.mode;
this.toolbar = config.toolbar; this.toolbar = config.toolbar;
this.view = this.createView('ViewTab', { this.view = this.createView('ViewTab', {
toolbar: this.toolbar.toolbar, toolbar: this.toolbar.toolbar,
mode: config.mode, mode: mode,
compactToolbar: this.toolbar.toolbar.isCompactView compactToolbar: this.toolbar.toolbar.isCompactView
}); });
if (mode.canBrandingExt && mode.customization && mode.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar')) {
this.view.chStatusbar.$el.remove();
var slotChkRulers = this.view.chRulers.$el,
groupRulers = slotChkRulers.closest('.group'),
groupToolbar = this.view.chToolbar.$el.closest('.group');
groupToolbar.find('.elset')[1].append(slotChkRulers[0]);
groupRulers.remove();
this.view.cmpEl.find('.separator-rulers').remove();
}
this.addListeners({ this.addListeners({
'ViewTab': { 'ViewTab': {
'zoom:topage': _.bind(this.onBtnZoomTo, this, 'topage'), 'zoom:topage': _.bind(this.onBtnZoomTo, this, 'topage'),

View file

@ -202,14 +202,14 @@
</div> </div>
<div class="separator long"></div> <div class="separator long"></div>
<div class="group small"> <div class="group small">
<div class="elset">
<span class="btn-slot text" id="slot-chk-statusbar"></span>
</div>
<div class="elset"> <div class="elset">
<span class="btn-slot text" id="slot-chk-toolbar"></span> <span class="btn-slot text" id="slot-chk-toolbar"></span>
</div> </div>
<div class="elset">
<span class="btn-slot text" id="slot-chk-statusbar"></span>
</div> </div>
<div class="separator long"></div> </div>
<div class="separator long separator-rulers"></div>
<div class="group small"> <div class="group small">
<div class="elset"> <div class="elset">
<span class="btn-slot text" id="slot-chk-rulers"></span> <span class="btn-slot text" id="slot-chk-rulers"></span>

View file

@ -211,6 +211,8 @@ define([
dataHintOffset: 'small' dataHintOffset: 'small'
}); });
this.lockedControls.push(this.chRulers); this.lockedControls.push(this.chRulers);
this.cmpEl = $host;
}, },
render: function (el) { render: function (el) {

View file

@ -74,12 +74,16 @@ define([
}, },
setConfig: function(config) { setConfig: function(config) {
var mode = config.mode;
this.toolbar = config.toolbar; this.toolbar = config.toolbar;
this.view = this.createView('ViewTab', { this.view = this.createView('ViewTab', {
toolbar: this.toolbar.toolbar, toolbar: this.toolbar.toolbar,
mode: config.mode, mode: mode,
compactToolbar: this.toolbar.toolbar.isCompactView compactToolbar: this.toolbar.toolbar.isCompactView
}); });
if (mode.canBrandingExt && mode.customization && mode.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar')) {
this.view.chStatusbar.$el.remove();
}
this.addListeners({ this.addListeners({
'ViewTab': { 'ViewTab': {
'zoom:toslide': _.bind(this.onBtnZoomTo, this, 'toslide'), 'zoom:toslide': _.bind(this.onBtnZoomTo, this, 'toslide'),

View file

@ -211,10 +211,10 @@
<div class="separator long"></div> <div class="separator long"></div>
<div class="group small"> <div class="group small">
<div class="elset"> <div class="elset">
<span class="btn-slot text" id="slot-chk-statusbar"></span> <span class="btn-slot text" id="slot-chk-toolbar"></span>
</div> </div>
<div class="elset"> <div class="elset">
<span class="btn-slot text" id="slot-chk-toolbar"></span> <span class="btn-slot text" id="slot-chk-statusbar"></span>
</div> </div>
</div> </div>
</section> </section>

View file

@ -78,11 +78,15 @@ define([
setConfig: function(config) { setConfig: function(config) {
this.toolbar = config.toolbar; this.toolbar = config.toolbar;
var mode = config.mode;
this.view = this.createView('ViewTab', { this.view = this.createView('ViewTab', {
toolbar: this.toolbar.toolbar, toolbar: this.toolbar.toolbar,
mode: config.mode, mode: mode,
compactToolbar: this.toolbar.toolbar.isCompactView compactToolbar: this.toolbar.toolbar.isCompactView
}); });
if (mode.canBrandingExt && mode.customization && mode.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar')) {
this.view.chStatusbar.$el.remove();
}
this.addListeners({ this.addListeners({
'ViewTab': { 'ViewTab': {
'zoom:selected': _.bind(this.onSelectedZoomValue, this), 'zoom:selected': _.bind(this.onSelectedZoomValue, this),

View file

@ -294,10 +294,10 @@
<div class="separator long"></div> <div class="separator long"></div>
<div class="group small"> <div class="group small">
<div class="elset"> <div class="elset">
<span class="btn-slot text" id="slot-chk-statusbar"></span> <span class="btn-slot text" id="slot-chk-toolbar"></span>
</div> </div>
<div class="elset"> <div class="elset">
<span class="btn-slot text" id="slot-chk-toolbar"></span> <span class="btn-slot text" id="slot-chk-statusbar"></span>
</div> </div>
</div> </div>
</section> </section>