For Bug 50113

This commit is contained in:
Julia Radzhabova 2021-04-29 15:41:04 +03:00
parent a12aca655e
commit 09a27c30b8
6 changed files with 41 additions and 13 deletions

View file

@ -769,6 +769,9 @@ define([
'-o-transform': 'scale(1)',
'opacity': '1'
});
setTimeout(function () {
me.fireEvent('animate:after', me);
}, 210);
}, 1);
setTimeout(function () {
@ -779,6 +782,9 @@ define([
this.$window.css({opacity: 1});
this.$window.addClass('notransform');
this.fireEvent('show', this);
setTimeout(function () {
me.fireEvent('animate:after', me);
}, 10);
}
Common.NotificationCenter.trigger('window:show', this);

View file

@ -86,6 +86,8 @@ define([
var $window = this.getChild();
$window.find('.dlg-btn').on('click', _.bind(this.onDlgBtnClick, this));
this.on('animate:after', _.bind(this.onAnimateAfter, this));
this.btnsCategory = [];
_.each($window.find('.btn-category'), function(item, index) {
var btnEl = $(item);
@ -173,6 +175,10 @@ define([
if (this.storageName)
Common.localStorage.setItem(this.storageName, this.getActiveCategory());
Common.UI.Window.prototype.close.call(this, suppressevent);
},
onAnimateAfter: function() {
}
}, Common.Views.AdvancedSettingsWindow || {}));
});

View file

@ -305,6 +305,8 @@ define([
this.window = this.getChild();
this.window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
this.on('animate:after', _.bind(this.onAnimateAfter, this));
this.updateMetricUnit();
},
@ -316,6 +318,12 @@ define([
return this.spnTop;
},
onAnimateAfter: function() {
if (this.api && this.properties) {
this.api.SetDrawImagePreviewMargins('page-margins-preview', this.properties);
}
},
_handleInput: function(state) {
if (this.options.handler) {
if (state == 'ok') {
@ -374,10 +382,6 @@ define([
this.cmbGutterPosition.setValue(0);
}
this.cmbGutterPosition.setDisabled(mirrorMargins);
if (this.api) {
this.api.SetDrawImagePreviewMargins('page-margins-preview', this.properties);
}
}
},

View file

@ -687,7 +687,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
];
},
onCategoryClick: function(btn, index) {
onCategoryClick: function(btn, index, cmp, e) {
Common.Views.AdvancedSettingsWindow.prototype.onCategoryClick.call(this, btn, index);
var me = this;
@ -698,8 +698,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
break;
case 3:
me.numSpacing.focus();
var properties = (me._originalProps) ? me._originalProps : new Asc.asc_CParagraphProperty();
me.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', properties);
if (e && (e instanceof jQuery.Event))
me.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', me._originalProps || new Asc.asc_CParagraphProperty());
break;
case 4:
me.numDefaultTab.focus();
@ -711,6 +711,10 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
}, 10);
},
onAnimateAfter: function() {
(this.getActiveCategory()==3) && this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', this._originalProps || new Asc.asc_CParagraphProperty());
},
getSettings: function() {
if ( this.ChangedBorders === null ) {
this._changedProps.put_Borders(this.Borders);

View file

@ -414,7 +414,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
];
},
onCategoryClick: function(btn, index) {
onCategoryClick: function(btn, index, cmp, e) {
Common.Views.AdvancedSettingsWindow.prototype.onCategoryClick.call(this, btn, index);
var me = this;
@ -425,6 +425,8 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
break;
case 1:
me.numSpacing.focus();
if (e && (e instanceof jQuery.Event))
me.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', me._originalProps || new Asc.asc_CParagraphProperty());
break;
case 2:
me.numDefaultTab.focus();
@ -433,6 +435,10 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
}, 10);
},
onAnimateAfter: function() {
(this.getActiveCategory()==1) && this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', this._originalProps || new Asc.asc_CParagraphProperty());
},
getSettings: function() {
if ( this._tabListChanged ) {
if (this._changedProps.get_Tabs()===null || this._changedProps.get_Tabs()===undefined)
@ -494,8 +500,6 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
this.numSpacing.setValue((props.get_TextSpacing() !== null && props.get_TextSpacing() !== undefined) ? Common.Utils.Metric.fnRecalcFromMM(props.get_TextSpacing()) : '', true);
this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', this._originalProps);
// Tabs
this.numDefaultTab.setValue((props.get_DefaultTab() !== null && props.get_DefaultTab() !== undefined) ? Common.Utils.Metric.fnRecalcFromMM(parseFloat(props.get_DefaultTab().toFixed(1))) : '', true);

View file

@ -412,7 +412,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.
];
},
onCategoryClick: function(btn, index) {
onCategoryClick: function(btn, index, cmp, e) {
Common.Views.AdvancedSettingsWindow.prototype.onCategoryClick.call(this, btn, index);
var me = this;
@ -423,6 +423,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.
break;
case 1:
me.numSpacing.focus();
if (e && (e instanceof jQuery.Event))
me.api.asc_setDrawImagePlaceParagraph('paragraphadv-font-img', me._originalProps || new Asc.asc_CParagraphProperty());
break;
case 2:
me.numDefaultTab.focus();
@ -431,6 +433,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.
}, 10);
},
onAnimateAfter: function() {
(this.getActiveCategory()==1) && this.api.asc_setDrawImagePlaceParagraph('paragraphadv-font-img', this._originalProps || new Asc.asc_CParagraphProperty());
},
getSettings: function() {
if ( this._tabListChanged ) {
if (this._changedProps.asc_getTabs()===null || this._changedProps.asc_getTabs()===undefined)
@ -489,8 +495,6 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.
this.numSpacing.setValue((props.asc_getTextSpacing() !== null && props.asc_getTextSpacing() !== undefined) ? Common.Utils.Metric.fnRecalcFromMM(props.asc_getTextSpacing()) : '', true);
this.api.asc_setDrawImagePlaceParagraph('paragraphadv-font-img', this._originalProps);
// Tabs
this.numDefaultTab.setValue((props.asc_getDefaultTab() !== null && props.asc_getDefaultTab() !== undefined) ? Common.Utils.Metric.fnRecalcFromMM(parseFloat(props.asc_getDefaultTab().toFixed(1))) : '', true);