Create tab Transitions in applyLayout

This commit is contained in:
OVSharova 2021-07-27 20:51:37 +03:00
parent 9cd64f4d33
commit 3e9f3b0b3a
3 changed files with 10 additions and 10 deletions

View file

@ -2386,12 +2386,10 @@ define([
this.toolbar.createDelayedElements(); this.toolbar.createDelayedElements();
this.attachUIEvents(this.toolbar); this.attachUIEvents(this.toolbar);
}, },
setTrantitTab:function (){ setTrantitTab:function (el){
var tab = {action: 'transit', caption: this.toolbar.textTabTransitions};
var $panel = this.getApplication().getController('Transitions').createToolbarPanel(); var $panel = this.getApplication().getController('Transitions').createToolbarPanel();
if ( $panel ) { if ( $panel ) {
this.toolbar.addTab(tab, $panel, 3); el.find('#transitions-panel').replaceWith($panel);
this.toolbar.setVisible('transit', true);
} }
}, },
onAppShowed: function (config) { onAppShowed: function (config) {

View file

@ -142,7 +142,7 @@
<span class="btn-slot text x-huge" id="slot-btn-insvideo"></span> <span class="btn-slot text x-huge" id="slot-btn-insvideo"></span>
</div> </div>
</section> </section>
<!-- <section id="transitions-panel" class="panel" data-tab="transit"> </section>--> <section id="transitions-panel" class="panel" data-tab="transit"> </section>
</section> </section>
</section> </section>
</div> </div>

View file

@ -129,7 +129,8 @@ define([
tabs: [ tabs: [
{caption: me.textTabFile, action: 'file', extcls: 'canedit', haspanel:false}, {caption: me.textTabFile, action: 'file', extcls: 'canedit', haspanel:false},
{caption: me.textTabHome, action: 'home', extcls: 'canedit'}, {caption: me.textTabHome, action: 'home', extcls: 'canedit'},
{caption: me.textTabInsert, action: 'ins', extcls: 'canedit'} {caption: me.textTabInsert, action: 'ins', extcls: 'canedit'},
{caption: me.textTabTransitions, action: 'transit', extcls: 'canedit'}
] ]
} }
); );
@ -1002,11 +1003,12 @@ define([
Common.UI.Mixtbar.prototype.onResize.apply(me, arguments); Common.UI.Mixtbar.prototype.onResize.apply(me, arguments);
} }
}); });
//_.bind(function (element){
//},me);
if ( mode.isEdit ) { if ( mode.isEdit ) {
me.setTab('home'); me.setTab('home');
me.processPanelVisible(); me.processPanelVisible();
this.fireEvent('transit:settab',[this]);
} }
if ( me.isCompactView ) if ( me.isCompactView )
@ -1036,7 +1038,7 @@ define([
var _injectComponent = function (id, cmp) { var _injectComponent = function (id, cmp) {
Common.Utils.injectComponent($host.find(id), cmp); Common.Utils.injectComponent($host.find(id), cmp);
}; };
this.fireEvent('transit:settab',[$host]);
_injectComponent('#slot-field-fontname', this.cmbFontName); _injectComponent('#slot-field-fontname', this.cmbFontName);
_injectComponent('#slot-field-fontsize', this.cmbFontSize); _injectComponent('#slot-field-fontsize', this.cmbFontSize);
_injectComponent('#slot-btn-changeslide', this.btnChangeSlide); _injectComponent('#slot-btn-changeslide', this.btnChangeSlide);