parent
84a10d77d9
commit
a9bb99a1a7
11
dist/converse.js
vendored
11
dist/converse.js
vendored
@ -74587,7 +74587,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|||||||
|
|
||||||
initialize() {
|
initialize() {
|
||||||
this.model.vcard.on('change', this.render, this);
|
this.model.vcard.on('change', this.render, this);
|
||||||
this.model.on('change:correcting', this.render, this);
|
this.model.on('change:correcting', this.onMessageCorrection, this);
|
||||||
this.model.on('change:message', this.render, this);
|
this.model.on('change:message', this.render, this);
|
||||||
this.model.on('change:progress', this.renderFileUploadProgresBar, this);
|
this.model.on('change:progress', this.renderFileUploadProgresBar, this);
|
||||||
this.model.on('change:type', this.render, this);
|
this.model.on('change:type', this.render, this);
|
||||||
@ -74617,6 +74617,15 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|||||||
return this.el;
|
return this.el;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onMessageCorrection() {
|
||||||
|
this.render();
|
||||||
|
|
||||||
|
if (!this.model.get('correcting') && this.model.changed.message) {
|
||||||
|
this.el.addEventListener('animationend', () => u.removeClass('onload', this.el));
|
||||||
|
u.addClass('onload', this.el);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
replaceElement(msg) {
|
replaceElement(msg) {
|
||||||
if (!_.isNil(this.el.parentElement)) {
|
if (!_.isNil(this.el.parentElement)) {
|
||||||
this.el.parentElement.replaceChild(msg, this.el);
|
this.el.parentElement.replaceChild(msg, this.el);
|
||||||
|
@ -91,7 +91,7 @@
|
|||||||
|
|
||||||
initialize () {
|
initialize () {
|
||||||
this.model.vcard.on('change', this.render, this);
|
this.model.vcard.on('change', this.render, this);
|
||||||
this.model.on('change:correcting', this.render, this);
|
this.model.on('change:correcting', this.onMessageCorrection, this);
|
||||||
this.model.on('change:message', this.render, this);
|
this.model.on('change:message', this.render, this);
|
||||||
this.model.on('change:progress', this.renderFileUploadProgresBar, this);
|
this.model.on('change:progress', this.renderFileUploadProgresBar, this);
|
||||||
this.model.on('change:type', this.render, this);
|
this.model.on('change:type', this.render, this);
|
||||||
@ -118,6 +118,14 @@
|
|||||||
return this.el;
|
return this.el;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onMessageCorrection () {
|
||||||
|
this.render();
|
||||||
|
if (!this.model.get('correcting') && this.model.changed.message) {
|
||||||
|
this.el.addEventListener('animationend', () => u.removeClass('onload', this.el));
|
||||||
|
u.addClass('onload', this.el);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
replaceElement (msg) {
|
replaceElement (msg) {
|
||||||
if (!_.isNil(this.el.parentElement)) {
|
if (!_.isNil(this.el.parentElement)) {
|
||||||
this.el.parentElement.replaceChild(msg, this.el);
|
this.el.parentElement.replaceChild(msg, this.el);
|
||||||
|
Loading…
Reference in New Issue
Block a user