diff --git a/apps/presentationeditor/main/app/controller/Animation.js b/apps/presentationeditor/main/app/controller/Animation.js
index 3fbe620f2..4cc2d6a55 100644
--- a/apps/presentationeditor/main/app/controller/Animation.js
+++ b/apps/presentationeditor/main/app/controller/Animation.js
@@ -184,7 +184,7 @@ define([
addNewEffect: function (type, group, groupName, replace) {
if (this._state.Effect == type && this._state.EffectGroup == group && replace) return;
var parameter = this.view.setMenuParameters(type, groupName, undefined);
- this.api.asc_AddAnimation(group, type, (parameter != undefined)?parameter:0, replace);
+ this.api.asc_AddAnimation(group, type, (parameter != undefined)?parameter:0, replace, !Common.Utils.InternalSettings.get("pe-animation-no-preview"));
this._state.EffectGroup = group;
this._state.Effect = type;
},
diff --git a/apps/presentationeditor/main/app/view/AnimationDialog.js b/apps/presentationeditor/main/app/view/AnimationDialog.js
index f0f039167..f00add7d5 100644
--- a/apps/presentationeditor/main/app/view/AnimationDialog.js
+++ b/apps/presentationeditor/main/app/view/AnimationDialog.js
@@ -119,14 +119,16 @@ define([
this.lstEffectList = new Common.UI.ListView({
el : $('#animation-list'),
itemTemplate: _.template('
<%= displayValue %>
'),
- scroll : true
+ scrollAlwaysVisible: true,
+ tabindex: 1
});
this.lstEffectList.on('item:select', _.bind(this.onEffectListItem,this));
this.chPreview = new Common.UI.CheckBox({
el : $('#animation-setpreview'),
- labelText : this.textPreviewEffect
- });
+ labelText : this.textPreviewEffect,
+ value: !Common.Utils.InternalSettings.get("pe-animation-no-preview")
+ }).on('change', _.bind(this.onPreviewChange, this));
this.cmbGroup.setValue(this._state.activeGroupValue);
this.fillLevel();
@@ -134,6 +136,14 @@ define([
this.$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
},
+ getFocusedComponents: function() {
+ return [ this.cmbGroup, this.cmbLevel, this.lstEffectList, this.chPreview];
+ },
+
+ getDefaultFocusableComponent: function () {
+ return this.lstEffectList;
+ },
+
onGroupSelect: function (combo, record) {
this._state.activeGroup = record.id;
this._state.activeGroupValue = record.value;
@@ -164,6 +174,7 @@ define([
if(!item)
item = this.lstEffectList.store.at(0);
this.lstEffectList.selectRecord(item);
+ this.lstEffectList.scrollToRecord(item, true);
this._state.activeEffect = item.get('value');
},
@@ -173,6 +184,10 @@ define([
}
},
+ onPreviewChange: function (field, newValue, oldValue, eOpts) {
+ Common.Utils.InternalSettings.set("pe-animation-no-preview", field.getValue()!=='checked');
+ },
+
onBtnClick: function (event)
{
this._handleInput(event.currentTarget.attributes['result'].value);