mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 09:34:29 +08:00
[PE] Header/Footer: set focus to input fields
This commit is contained in:
@ -196,6 +196,7 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
|
||||
},
|
||||
|
||||
setType: function(type, field, newValue) {
|
||||
var me = this;
|
||||
newValue = (newValue=='checked');
|
||||
if (type == 'date') {
|
||||
_.each(this.dateControls, function(item) {
|
||||
@ -208,6 +209,9 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
|
||||
} else if (type == 'footer') {
|
||||
this.inputFooter.setDisabled(!newValue);
|
||||
this.props.put_ShowFooter(newValue);
|
||||
newValue && setTimeout(function(){
|
||||
me.inputFooter.cmpEl.find('input').focus();
|
||||
},50);
|
||||
}
|
||||
this.props.updateView();
|
||||
},
|
||||
@ -232,9 +236,14 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
|
||||
|
||||
setDateTimeType: function(type, field, newValue) {
|
||||
if (newValue) {
|
||||
var me = this;
|
||||
this.cmbLang.setDisabled(type == 'fixed');
|
||||
this.cmbFormat.setDisabled(type == 'fixed');
|
||||
this.inputFixed.setDisabled(type == 'update');
|
||||
(type == 'fixed') && setTimeout(function(){
|
||||
me.inputFixed.cmpEl.find('input').focus();
|
||||
},50);
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user