Roo.EventManager.onWindowResize(this.resize, this, true);
if (this.editableTitle) {
this.headerEditEl = this.headerEl.select('.form-control',true).first();
- this.headerEl.on('click', this.showHeaderInput, this);
+ this.headerEl.on('click', function() { this.toggleHeaderInput(true) } , this);
+ this.headerEditEl.on('keyup', function(e) {
+ if(e.isNavKeyPress()){
+ this.toggleHeaderInput(false)
+ }
+ }, this);
+ this.headerEditEl.on('blur', function(e) {
+ this.toggleHeaderInput(false)
+ });
}
},
*/
setTitle: function(str) {
this.titleEl.dom.innerHTML = str;
+ this.title = str;
},
/**
* Set the body of the Dialog
}
if (is_edit) {
- this.headerEditEl.setValue(this.title);
+ this.headerEditEl.dom.value = this.title;
this.headerEditEl.removeClass('d-none');
+ this.headerEditEl.dom.focus();
this.titleEl.addClass('d-none');
+
this.is_header_editing = true;
return
}
// flip back to not editing.
- this.title = this.headerEditEl.getValue(this.title);
+ this.title = this.headerEditEl.dom.value;
this.headerEditEl.addClass('d-none');
this.titleEl.removeClass('d-none');
this.titleEl.dom.innerHTML = String.format('{0}', this.title);