Ediit onFocusObject

This commit is contained in:
OVSharova 2021-07-31 03:36:26 +03:00
parent 8f8d5e5a49
commit a7b08559a2
4 changed files with 32 additions and 15 deletions

View file

@ -205,7 +205,16 @@ define([
}, },
onFocusObject:function(selectedObjects){ onFocusObject:function(selectedObjects){
this.changeSettings(selectedObjects[0].get_ObjectValue()); for (var i=0; i<selectedObjects.length; i++) {
var eltype = selectedObjects[i].get_ObjectType();
if (eltype === undefined)
continue;
if (eltype == Asc.c_oAscTypeSelectElement.Slide) {
this.changeSettings(selectedObjects[i].get_ObjectValue());
}
}
}, },
changeSettings:function (props){ changeSettings:function (props){

View file

@ -151,7 +151,7 @@
<div class="separator long"></div> <div class="separator long"></div>
<div class="group small"> <div class="group small">
<div class="elset font-normal"> <div class="elset font-normal">
<label>Duration</label> <label id="transit-duration"></label>
<span id="transit-spin-duration" class="btn-slot text spinner"></span> <span id="transit-spin-duration" class="btn-slot text spinner"></span>
</div> </div>
<div class="elset"> <div class="elset">

View file

@ -1816,8 +1816,8 @@ define([
mniToggleCase: 'tOGGLE cASE', mniToggleCase: 'tOGGLE cASE',
strMenuNoFill: 'No Fill', strMenuNoFill: 'No Fill',
tipHighlightColor: 'Highlight color', tipHighlightColor: 'Highlight color',
txtScheme22: 'New Office' txtScheme22: 'New Office',
,textTabTransitions: 'Transitions' textTabTransitions: 'Transitions'
} }
}()), PE.Views.Toolbar || {})); }()), PE.Views.Toolbar || {}));
}); });

View file

@ -69,7 +69,7 @@ define([
me.fireEvent('transit:preview', [me.btnPreview]); me.fireEvent('transit:preview', [me.btnPreview]);
}, me)); }, me));
} }
if (me.btnParametrs) { if(me.btnParametrs) {
me.btnParametrs.on('click', function (e) { me.btnParametrs.on('click', function (e) {
me.fireEvent('transit:parametrs', ['current']); me.fireEvent('transit:parametrs', ['current']);
@ -137,6 +137,7 @@ define([
itemWidth: 87, itemWidth: 87,
itemHeight: 40, itemHeight: 40,
enableKeyEvents: true, enableKeyEvents: true,
//lock:[_set.slideDeleted],
beforeOpenHandler: function (e) { beforeOpenHandler: function (e) {
var cmp = this, var cmp = this,
menu = cmp.openButton.menu//, menu = cmp.openButton.menu//,
@ -225,6 +226,7 @@ define([
el: this.$el.find('#transit-checkbox-delay'), el: this.$el.find('#transit-checkbox-delay'),
labelText: this.strDelay labelText: this.strDelay
}); });
this.$el.find('#transit-duration').text(this.strDuration);
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this)); Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
}, },
@ -236,7 +238,7 @@ define([
createParametrsMenuItems: function() createParametrsMenuItems: function()
{ {
var arrEffectType = [ var arrEffectType =[
{caption: this.textSmoothly, value: Asc.c_oAscSlideTransitionParams.Fade_Smoothly}, {caption: this.textSmoothly, value: Asc.c_oAscSlideTransitionParams.Fade_Smoothly},
{caption: this.textBlack, value: Asc.c_oAscSlideTransitionParams.Fade_Through_Black}, {caption: this.textBlack, value: Asc.c_oAscSlideTransitionParams.Fade_Through_Black},
{caption: this.textLeft, value: Asc.c_oAscSlideTransitionParams.Param_Left}, {caption: this.textLeft, value: Asc.c_oAscSlideTransitionParams.Param_Left},
@ -245,13 +247,19 @@ define([
{caption: this.textBottom, value: Asc.c_oAscSlideTransitionParams.Param_Bottom}, {caption: this.textBottom, value: Asc.c_oAscSlideTransitionParams.Param_Bottom},
{caption: this.textTopLeft, value: Asc.c_oAscSlideTransitionParams.Param_TopLeft}, {caption: this.textTopLeft, value: Asc.c_oAscSlideTransitionParams.Param_TopLeft},
{caption: this.textTopRight, value: Asc.c_oAscSlideTransitionParams.Param_TopRight}, {caption: this.textTopRight, value: Asc.c_oAscSlideTransitionParams.Param_TopRight},
{caption: this.textBottomLeft, value: Asc.c_oAscSlideTransitionParams.Param_BottomLeft},
{caption: this.textBottomRight, value: Asc.c_oAscSlideTransitionParams.Param_BottomRight},
{caption: this.textVerticalIn, value: Asc.c_oAscSlideTransitionParams.Split_VerticalIn},
{caption: this.textVerticalOut, value: Asc.c_oAscSlideTransitionParams.Split_VerticalOut},
{caption: this.textHorizontalIn, value: Asc.c_oAscSlideTransitionParams.Split_HorizontalIn},
{caption: this.textHorizontalOut, value: Asc.c_oAscSlideTransitionParams.Split_HorizontalOut},
{caption: this.textClockwise, value: Asc.c_oAscSlideTransitionParams.Clock_Clockwise}, {caption: this.textClockwise, value: Asc.c_oAscSlideTransitionParams.Clock_Clockwise},
{caption: this.textCounterclockwise, value: Asc.c_oAscSlideTransitionParams.Clock_Counterclockwise}, {caption: this.textCounterclockwise, value: Asc.c_oAscSlideTransitionParams.Clock_Counterclockwise},
{caption: this.textWedge, value: Asc.c_oAscSlideTransitionParams.Clock_Wedge}, {caption: this.textWedge, value: Asc.c_oAscSlideTransitionParams.Clock_Wedge},
{caption: this.textZoomIn, value: Asc.c_oAscSlideTransitionParams.Zoom_In}, {caption: this.textZoomIn, value: Asc.c_oAscSlideTransitionParams.Zoom_In},
{caption: this.textZoomOut, value: Asc.c_oAscSlideTransitionParams.Zoom_Out}, {caption: this.textZoomOut, value: Asc.c_oAscSlideTransitionParams.Zoom_Out},
{caption: this.textZoomRotate, value: Asc.c_oAscSlideTransitionParams.Zoom_AndRotate} {caption: this.textZoomRotate, value: Asc.c_oAscSlideTransitionParams.Zoom_AndRotate}
]; ];
var itemsMenu=[]; var itemsMenu=[];
_.each(arrEffectType, function (item){ _.each(arrEffectType, function (item){
@ -260,8 +268,7 @@ define([
caption: item.caption, caption: item.caption,
value: item.value, value: item.value,
checkable: true, checkable: true,
toggleGroup: 'effects', toggleGroup: 'effects'
disabled:false
} }
); );
}); });
@ -289,6 +296,11 @@ define([
this.$el.find("#label-delay").innerText=this.strDelay; this.$el.find("#label-delay").innerText=this.strDelay;
return this.$el; return this.$el;
}, },
renderComponent: function (compid, obj)
{
var element=this.$el.find(compid);
element.parent().append(obj.el);
},
show: function () { show: function () {
Common.UI.BaseView.prototype.show.call(this); Common.UI.BaseView.prototype.show.call(this);
@ -299,11 +311,7 @@ define([
SetDisabled: function (state, langs) { SetDisabled: function (state, langs) {
}, },
renderComponent: function (compid, obj)
{
var element=this.$el.find(compid);
element.parent().append(obj.el);
},
setMenuParametrs:function (effect,value) setMenuParametrs:function (effect,value)
{ {
var minMax=[-1,-1]; var minMax=[-1,-1];
@ -362,7 +370,7 @@ define([
txtParametrs: 'Parametrs', txtParametrs: 'Parametrs',
txtApplyToAll: 'Apply to All Slides', txtApplyToAll: 'Apply to All Slides',
strDuration: 'Duration', strDuration: 'Duration',
strDelay: 'DelayDelayDelayDelay', strDelay: 'Delay',
strStartOnClick: 'Start On Click', strStartOnClick: 'Start On Click',
textNone: 'None', textNone: 'None',