start settings

This commit is contained in:
OVSharova 2021-07-22 02:09:53 +03:00
parent de564a6968
commit ea6479f18c
4 changed files with 73 additions and 16 deletions

View file

@ -96,10 +96,7 @@ define([
},
'Common.Views.ReviewChanges': {
'settings:apply': _.bind(this.applySettings, this)
}/*,
'Transitions': {
'settings:apply': _.bind(this.applySettings, this)
}*/
}
});
var me = this,

View file

@ -2400,12 +2400,12 @@ define([
me.toolbar.render(_.extend({compactview: compactview}, config));
/*var tab = {action: 'review', caption: me.toolbar.textTabCollaboration};
var tab = {action: 'review', caption: me.toolbar.textTabCollaboration};
var $panel = me.getApplication().getController('Common.Controllers.ReviewChanges').createToolbarPanel();
if ( $panel ) {
me.toolbar.addTab(tab, $panel, 3);
me.toolbar.setVisible('review', config.isEdit || config.canViewReview || config.canCoAuthoring && config.canComments);
}*/
}
var tab = {action: 'transit', caption: me.toolbar.textTabTransitions};
var $panel = me.getApplication().getController('Transitions').createToolbarPanel();
if ( $panel ) {

View file

@ -189,6 +189,68 @@ define([
this.api.SetSlideProps(props);
}
},
applySettings:functions(props){
var transition = props.get_transition();
/*if (transition) {
var value = transition.get_TransitionType();
var found = false;
if (this._state.Effect !== value) {
var item = this.cmbEffectName.store.findWhere({value: value});
if (item) {
found = true;
this.cmbEffectName.setValue(item.get('value'));
} else
this.cmbEffectName.setValue('');
this.fillEffectTypeCombo((found) ? value : undefined);
this.Effect = value;
this._state.Effect = value;
}
value = transition.get_TransitionOption();
if (this._state.EffectType !== value || found) {
found = false;
item = this.cmbEffectType.store.findWhere({value: value});
if (item) {
found = true;
this.cmbEffectType.setValue(item.get('value'));
} else
this.cmbEffectType.setValue('');
this._state.EffectType = value;
}
value = transition.get_TransitionDuration();
if ( Math.abs(this._state.Duration-value)>0.001 ||
(this._state.Duration===null || value===null)&&(this._state.Duration!==value) ||
(this._state.Duration===undefined || value===undefined)&&(this._state.Duration!==value) ) {
this.numDuration.setValue((value !== null && value !== undefined) ? value/1000. : '', true);
this._state.Duration=value;
}
value = transition.get_SlideAdvanceDuration();
if ( Math.abs(this._state.Delay-value)>0.001 ||
(this._state.Delay===null || value===null)&&(this._state.Delay!==value) ||
(this._state.Delay===undefined || value===undefined)&&(this._state.Delay!==value) ) {
this.numDelay.setValue((value !== null && value !== undefined) ? value/1000. : '', true);
this._state.Delay=value;
}
value = transition.get_SlideAdvanceOnMouseClick();
if ( this._state.OnMouseClick!==value ) {
this.chStartOnClick.setValue((value !== null && value !== undefined) ? value : 'indeterminate', true);
this._state.OnMouseClick=value;
}
value = transition.get_SlideAdvanceAfter();
if ( this._state.AdvanceAfter!==value ) {
this.chDelay.setValue((value !== null && value !== undefined) ? value : 'indeterminate', true);
this.numDelay.setDisabled(this.chDelay.getValue()!=='checked');
this._state.AdvanceAfter=value;
}
}*/
}
}, PE.Controllers.Transitions || {}));
});

View file

@ -114,6 +114,7 @@ define([
me.btnParametrs.menu.on('item:click', function (menu, item, e) {
me.fireEvent('transit:parametrs', [item]);
});
}
if(me.btnApplyToAll)
{
@ -374,7 +375,6 @@ define([
},
setMenuParametrs:function (effect)
{
var minMax=[0,0];
switch (effect) {
case Asc.c_oAscSlideTransitionTypes.Fade:
@ -402,19 +402,17 @@ define([
minMax=[17,17];
break;
}
var i
//this.btnParametrs.menu.clearAll();
_.each(this.btnParametrs.menu.items,function (element,index){
if((index<minMax[0])||(index>minMax[1]))
element.$el.css('display','none');
else
element.$el.css('display','');
element.$el.css('display',((index<minMax[0])||(index>minMax[1]))?'none':'');
});
if(effect!=Asc.c_oAscSlideTransitionTypes.None)
{
this.btnParametrs.menu.items[minMax[0]].$el.click();
}
},