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