diff --git a/apps/presentationeditor/main/app/view/HeaderFooterDialog.js b/apps/presentationeditor/main/app/view/HeaderFooterDialog.js index bb8575a7a..1f41f68c4 100644 --- a/apps/presentationeditor/main/app/view/HeaderFooterDialog.js +++ b/apps/presentationeditor/main/app/view/HeaderFooterDialog.js @@ -74,8 +74,8 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template', '', '
', '' ].join('') @@ -216,7 +216,7 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template', this.props.updateView(); }, - updateFormats: function(lang) { + updateFormats: function(lang, format) { var props = new AscCommonSlide.CAscDateTime(); props.put_Lang(lang); var data = props.get_DateTimeExamples(), @@ -230,7 +230,7 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template', } } this.cmbFormat.setData(arr); - var format = this.defaultFormats[lang]; + format = format || this.defaultFormats[lang]; this.cmbFormat.setValue(format ? format : arr[0].value); }, @@ -267,7 +267,7 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template', item.setDisabled(!val); }); - var format, + var format, fixed, datetime = slideprops.get_DateTime(), item = this.cmbLang.store.findWhere({value: datetime ? (datetime.get_Lang() || this.lang) : this.lang}); this._originalLang = item ? item.get('value') : 0x0409; @@ -276,10 +276,11 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template', if (val) { format = datetime.get_DateTime(); !format ? this.radioFixed.setValue(true) : this.radioUpdate.setValue(true); - !format && (this.inputFixed.setValue(datetime.get_CustomDateTime() || '')); + !format && (fixed = datetime.get_CustomDateTime() || ''); this.setDateTimeType(!format ? 'fixed' : 'update', null, true); } - this.updateFormats(this.cmbLang.getValue()); + this.updateFormats(this.cmbLang.getValue(), format); + this.inputFixed.setValue((fixed!==undefined) ? fixed : this.cmbFormat.getRawValue()); val = slideprops.get_ShowSlideNum(); this.chSlide.setValue(val, true); @@ -322,7 +323,7 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template', }, onPrimary: function() { - this._handleInput('ok'); + this._handleInput('all'); return false; },