From 920d8a5b4f3f00461b7dd0e295247e3d2d0737ef Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 7 Dec 2021 01:13:24 +0300 Subject: [PATCH] [PE] Add more effect menu item --- .../main/app/controller/Animation.js | 10 +++++++++- apps/presentationeditor/main/app/view/Animation.js | 12 ++++++++++-- .../main/resources/less/animation.less | 3 +++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/apps/presentationeditor/main/app/controller/Animation.js b/apps/presentationeditor/main/app/controller/Animation.js index dfa5e5763..1045f2316 100644 --- a/apps/presentationeditor/main/app/controller/Animation.js +++ b/apps/presentationeditor/main/app/controller/Animation.js @@ -72,7 +72,8 @@ define([ 'animation:addanimation': _.bind(this.onAddAnimation, this), 'animation:startselect': _.bind(this.onStartSelect, this), 'animation:checkrewind': _.bind(this.onCheckRewindChange,this), - 'animation:repeat': _.bind(this.onRepeatChange, this) + 'animation:repeat': _.bind(this.onRepeatChange, this), + 'animation:additional': _.bind(this.onAnimationAdditional, this) }, 'Toolbar': { 'tab:active': _.bind(this.onActiveTab, this) @@ -136,6 +137,13 @@ define([ })).show(); }, + onAnimationAdditional: function() { + (new PE.Views.AnimationDialog({ + api : this.api, + activeEffect : this._state.Effect + })).show(); + }, + onAddAnimation: function(picker, record) { var type = record.get('value'); var group = _.findWhere(Common.define.effectData.getEffectGroupData(), {id: record.get('group')}).value; diff --git a/apps/presentationeditor/main/app/view/Animation.js b/apps/presentationeditor/main/app/view/Animation.js index 9095aa1a4..f1b95bf40 100644 --- a/apps/presentationeditor/main/app/view/Animation.js +++ b/apps/presentationeditor/main/app/view/Animation.js @@ -61,6 +61,9 @@ define([ me.listEffects.on('click', _.bind(function (combo, record) { me.fireEvent('animation:selecteffect', [combo, record]); }, me)); + me.listEffectsMore.on('click', _.bind(function () { + me.fireEvent('animation:additional'); + }, me)); } if (me.btnPreview) { @@ -132,6 +135,9 @@ define([ this._arrEffectOptions = []; var itemWidth = 87, itemHeight = 40; + this.listEffectsMore = new Common.UI.MenuItem({ + caption: this.textMoreEffects + }); this.listEffects = new Common.UI.ComboDataView({ cls: 'combo-transitions combo-animation', itemWidth: itemWidth, @@ -144,6 +150,7 @@ define([ ].join('')), groups: new Common.UI.DataViewGroupStore([{id: 'none', value: -10, caption: this.textNone}].concat(Common.define.effectData.getEffectGroupData())), store: new Common.UI.DataViewStore(this._arrEffectName), + additionalMenuItems: [{caption: '--'}, this.listEffectsMore], enableKeyEvents: true, //lock: [_set.slideDeleted, _set.noSlides, _set.disableOnStart, _set.transitLock], dataHint: '1', @@ -473,8 +480,9 @@ define([ textStartOnClick: 'On Click', textStartWithPrevious: 'With Previous', textStartAfterPrevious: 'After Previous', - textNone: 'None' + textNone: 'None', + textMoreEffects: 'Show More Effects' } }()), PE.Views.Animation || {})); - }); \ No newline at end of file +}); \ No newline at end of file diff --git a/apps/presentationeditor/main/resources/less/animation.less b/apps/presentationeditor/main/resources/less/animation.less index 26f54342b..2c4aff4ff 100644 --- a/apps/presentationeditor/main/resources/less/animation.less +++ b/apps/presentationeditor/main/resources/less/animation.less @@ -25,6 +25,9 @@ .menu-picker-container .dataview { padding: 10px 0 0 2px; } + .dropdown-menu { + padding-bottom: 5px; + } } .menu-animation .dataview {