Refactoring: rename timing to transition
# Conflicts: # apps/presentationeditor/main/app/view/SlideSettings.js # apps/presentationeditor/mobile/app/controller/Toolbar.js # apps/presentationeditor/mobile/app/controller/edit/EditContainer.js # apps/presentationeditor/mobile/app/controller/edit/EditSlide.js
This commit is contained in:
parent
47f7ac9a83
commit
a97c7fc4da
|
@ -133,8 +133,8 @@ define([
|
|||
if (settingsType==Common.Utils.documentSettingsType.Slide) {
|
||||
this._settings[settingsType].locked = value.get_LockDelete();
|
||||
this._settings[settingsType].lockedBackground = value.get_LockBackground();
|
||||
this._settings[settingsType].lockedEffects = value.get_LockTranzition();
|
||||
this._settings[settingsType].lockedTiming = value.get_LockTiming();
|
||||
this._settings[settingsType].lockedEffects = value.get_LockTransition();
|
||||
this._settings[settingsType].lockedTransition = value.get_LockTransition();
|
||||
this._settings[settingsType].lockedHeader = !!value.get_LockHeader && value.get_LockHeader();
|
||||
} else {
|
||||
this._settings[settingsType].locked = value.get_Locked();
|
||||
|
@ -179,7 +179,7 @@ define([
|
|||
if (pnl.locked!==undefined)
|
||||
this.rightmenu.slideSettings.SetSlideDisabled(this._state.no_slides || pnl.lockedBackground || pnl.locked,
|
||||
this._state.no_slides || pnl.lockedEffects || pnl.locked,
|
||||
this._state.no_slides || pnl.lockedTiming || pnl.locked,
|
||||
this._state.no_slides || pnl.lockedTransition || pnl.locked,
|
||||
this._state.no_slides || pnl.lockedHeader || pnl.locked);
|
||||
} else
|
||||
pnl.panel.setLocked(pnl.locked);
|
||||
|
|
|
@ -885,9 +885,9 @@ define([
|
|||
for (var i=0; i<selectedElements.length; i++) {
|
||||
if (Asc.c_oAscTypeSelectElement.Slide == selectedElements[i].get_ObjectType()) {
|
||||
var elValue = selectedElements[i].get_ObjectValue(),
|
||||
timing = elValue.get_timing();
|
||||
if (timing)
|
||||
loop = timing.get_ShowLoop();
|
||||
transition = elValue.get_transition();
|
||||
if (transition)
|
||||
loop = transition.get_ShowLoop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -897,9 +897,9 @@ define([
|
|||
loop = dlg.getSettings();
|
||||
if (me.api) {
|
||||
var props = new Asc.CAscSlideProps();
|
||||
var timing = new Asc.CAscSlideTiming();
|
||||
timing.put_ShowLoop(loop);
|
||||
props.put_timing(timing);
|
||||
var transition = new Asc.CAscSlideTransition();
|
||||
transition.put_ShowLoop(loop);
|
||||
props.put_transition(transition);
|
||||
me.api.SetSlideProps(props);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ define([
|
|||
this._stateDisabled = {
|
||||
background: true,
|
||||
effects: true,
|
||||
timing: true,
|
||||
transition: false,
|
||||
header: true
|
||||
};
|
||||
|
||||
|
@ -260,7 +260,7 @@ define([
|
|||
disabled: true
|
||||
});
|
||||
this.btnApplyToAll.on('click', _.bind(function(btn){
|
||||
if (this.api) this.api.SlideTimingApplyToAll();
|
||||
if (this.api) this.api.SlideTransitionApplyToAll();
|
||||
this.fireEvent('editcomplete', this);
|
||||
}, this));
|
||||
|
||||
|
@ -1053,10 +1053,10 @@ define([
|
|||
this.Effect = type;
|
||||
if (this.api && !this._noApply) {
|
||||
var props = new Asc.CAscSlideProps();
|
||||
var timing = new Asc.CAscSlideTiming();
|
||||
timing.put_TransitionType(type);
|
||||
timing.put_TransitionOption(this.EffectType);
|
||||
props.put_timing(timing);
|
||||
var transition = new Asc.CAscSlideTransition();
|
||||
transition.put_TransitionType(type);
|
||||
transition.put_TransitionOption(this.EffectType);
|
||||
props.put_transition(transition);
|
||||
this.api.SetSlideProps(props);
|
||||
}
|
||||
this.fireEvent('editcomplete', this);
|
||||
|
@ -1066,10 +1066,10 @@ define([
|
|||
this.EffectType = record.value;
|
||||
if (this.api && !this._noApply) {
|
||||
var props = new Asc.CAscSlideProps();
|
||||
var timing = new Asc.CAscSlideTiming();
|
||||
timing.put_TransitionType(this.Effect);
|
||||
timing.put_TransitionOption(this.EffectType);
|
||||
props.put_timing(timing);
|
||||
var transition = new Asc.CAscSlideTransition();
|
||||
transition.put_TransitionType(this.Effect);
|
||||
transition.put_TransitionOption(this.EffectType);
|
||||
props.put_transition(transition);
|
||||
this.api.SetSlideProps(props);
|
||||
}
|
||||
this.fireEvent('editcomplete', this);
|
||||
|
@ -1078,9 +1078,9 @@ define([
|
|||
onDurationChange: function(field, newValue, oldValue, eOpts){
|
||||
if (this.api && !this._noApply) {
|
||||
var props = new Asc.CAscSlideProps();
|
||||
var timing = new Asc.CAscSlideTiming();
|
||||
timing.put_TransitionDuration(field.getNumberValue()*1000);
|
||||
props.put_timing(timing);
|
||||
var transition = new Asc.CAscSlideTransition();
|
||||
transition.put_TransitionDuration(field.getNumberValue()*1000);
|
||||
props.put_transition(transition);
|
||||
this.api.SetSlideProps(props);
|
||||
}
|
||||
},
|
||||
|
@ -1088,9 +1088,9 @@ define([
|
|||
onDelayChange: function(field, newValue, oldValue, eOpts){
|
||||
if (this.api && !this._noApply) {
|
||||
var props = new Asc.CAscSlideProps();
|
||||
var timing = new Asc.CAscSlideTiming();
|
||||
timing.put_SlideAdvanceDuration(field.getNumberValue()*1000);
|
||||
props.put_timing(timing);
|
||||
var transition = new Asc.CAscSlideTransition();
|
||||
transition.put_SlideAdvanceDuration(field.getNumberValue()*1000);
|
||||
props.put_transition(transition);
|
||||
this.api.SetSlideProps(props);
|
||||
}
|
||||
},
|
||||
|
@ -1098,9 +1098,9 @@ define([
|
|||
onStartOnClickChange: function(field, newValue, oldValue, eOpts){
|
||||
if (this.api && !this._noApply) {
|
||||
var props = new Asc.CAscSlideProps();
|
||||
var timing = new Asc.CAscSlideTiming();
|
||||
timing.put_SlideAdvanceOnMouseClick(field.getValue()=='checked');
|
||||
props.put_timing(timing);
|
||||
var transition = new Asc.CAscSlideTransition();
|
||||
transition.put_SlideAdvanceOnMouseClick(field.getValue()=='checked');
|
||||
props.put_transition(transition);
|
||||
this.api.SetSlideProps(props);
|
||||
}
|
||||
this.fireEvent('editcomplete', this);
|
||||
|
@ -1110,9 +1110,9 @@ define([
|
|||
this.numDelay.setDisabled(field.getValue()!=='checked');
|
||||
if (this.api && !this._noApply) {
|
||||
var props = new Asc.CAscSlideProps();
|
||||
var timing = new Asc.CAscSlideTiming();
|
||||
timing.put_SlideAdvanceAfter(field.getValue()=='checked');
|
||||
props.put_timing(timing);
|
||||
var transition = new Asc.CAscSlideTransition();
|
||||
transition.put_SlideAdvanceAfter(field.getValue()=='checked');
|
||||
props.put_transition(transition);
|
||||
this.api.SetSlideProps(props);
|
||||
}
|
||||
this.fireEvent('editcomplete', this);
|
||||
|
@ -1175,6 +1175,7 @@ define([
|
|||
ChangeSettings: function(props) {
|
||||
if (this._initSettings)
|
||||
this.createDelayedElements();
|
||||
this.SetSlideDisabled(this._locked.background, this._locked.effects, this._locked.transition, this._locked.header);
|
||||
|
||||
if (props)
|
||||
{
|
||||
|
@ -1358,9 +1359,9 @@ define([
|
|||
this._state.SlideColor = this.SlideColor.Color;
|
||||
}
|
||||
|
||||
var timing = props.get_timing();
|
||||
if (timing) {
|
||||
var value = timing.get_TransitionType();
|
||||
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});
|
||||
|
@ -1375,7 +1376,7 @@ define([
|
|||
this._state.Effect = value;
|
||||
}
|
||||
|
||||
value = timing.get_TransitionOption();
|
||||
value = transition.get_TransitionOption();
|
||||
if (this._state.EffectType !== value || found) {
|
||||
found = false;
|
||||
item = this.cmbEffectType.store.findWhere({value: value});
|
||||
|
@ -1388,7 +1389,7 @@ define([
|
|||
this._state.EffectType = value;
|
||||
}
|
||||
|
||||
value = timing.get_TransitionDuration();
|
||||
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) ) {
|
||||
|
@ -1396,7 +1397,7 @@ define([
|
|||
this._state.Duration=value;
|
||||
}
|
||||
|
||||
value = timing.get_SlideAdvanceDuration();
|
||||
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) ) {
|
||||
|
@ -1404,12 +1405,12 @@ define([
|
|||
this._state.Delay=value;
|
||||
}
|
||||
|
||||
value = timing.get_SlideAdvanceOnMouseClick();
|
||||
value = transition.get_SlideAdvanceOnMouseClick();
|
||||
if ( this._state.OnMouseClick!==value ) {
|
||||
this.chStartOnClick.setValue((value !== null && value !== undefined) ? value : 'indeterminate', true);
|
||||
this._state.OnMouseClick=value;
|
||||
}
|
||||
value = timing.get_SlideAdvanceAfter();
|
||||
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');
|
||||
|
@ -1503,7 +1504,16 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
SetSlideDisabled: function(background, effects, timing, header) {
|
||||
setLocked: function (background, effects, transition, header) {
|
||||
this._locked = {
|
||||
background: background, effects: effects, transition: transition, header: header
|
||||
};
|
||||
},
|
||||
|
||||
SetSlideDisabled: function(background, effects, transition, header) {
|
||||
this._locked = {
|
||||
background: background, effects: effects, transition: transition, header: header
|
||||
};
|
||||
if (this._initSettings) return;
|
||||
|
||||
if (background !== this._stateDisabled.background) {
|
||||
|
@ -1521,12 +1531,12 @@ define([
|
|||
this.btnPreview.setDisabled(length<1 || effects);
|
||||
this._stateDisabled.effects = effects;
|
||||
}
|
||||
if (timing !== this._stateDisabled.timing) {
|
||||
this.chStartOnClick.setDisabled(timing);
|
||||
this.chDelay.setDisabled(timing);
|
||||
this.numDelay.setDisabled(timing || this.chDelay.getValue()!=='checked');
|
||||
this.btnApplyToAll.setDisabled(timing);
|
||||
this._stateDisabled.timing = timing;
|
||||
if (transition !== this._stateDisabled.transition) {
|
||||
this.chStartOnClick.setDisabled(transition);
|
||||
this.chDelay.setDisabled(transition);
|
||||
this.numDelay.setDisabled(transition || this.chDelay.getValue()!=='checked');
|
||||
this.btnApplyToAll.setDisabled(transition);
|
||||
this._stateDisabled.transition = transition;
|
||||
}
|
||||
if (header !== this._stateDisabled.header) {
|
||||
this.chSlideNum.setDisabled(header);
|
||||
|
|
Loading…
Reference in a new issue