Rename ChatBoxView.insertIntoPage to ChatBoxView.insertIntoDOM

to ensure naming consistency, we have the same method on `ChatRoomView`.
This commit is contained in:
JC Brand 2016-06-22 15:54:22 +02:00
parent 081d377881
commit 9e8674ef55
4 changed files with 7 additions and 4 deletions

View File

@ -4,6 +4,9 @@
- Restrict occupants sidebar to 30% chatroom width. [jcbrand] - Restrict occupants sidebar to 30% chatroom width. [jcbrand]
- Made requesting contacts more visible, by placing them at the top of the roster. [jcbrand] - Made requesting contacts more visible, by placing them at the top of the roster. [jcbrand]
- `insertIntoPage` method of `ChatBoxView` has been renamed to `insertIntoDOM`,
to make it the same as the method of `ChatRoomView`. [jcbrand]
## 1.0.3 (2016-06-20) ## 1.0.3 (2016-06-20)

View File

@ -83,7 +83,7 @@
this.model.on('change:status', this.onStatusChanged, this); this.model.on('change:status', this.onStatusChanged, this);
this.model.on('showHelpMessages', this.showHelpMessages, this); this.model.on('showHelpMessages', this.showHelpMessages, this);
this.model.on('sendMessage', this.sendMessage, this); this.model.on('sendMessage', this.sendMessage, this);
this.render().fetchMessages().insertIntoPage().hide(); this.render().fetchMessages().insertIntoDOM().hide();
// XXX: adding the event below to the events map above doesn't work. // XXX: adding the event below to the events map above doesn't work.
// The code that gets executed because of that looks like this: // The code that gets executed because of that looks like this:
// this.$el.on('scroll', '.chat-content', this.markScrolled.bind(this)); // this.$el.on('scroll', '.chat-content', this.markScrolled.bind(this));
@ -127,7 +127,7 @@
return this; return this;
}, },
insertIntoPage: function () { insertIntoDOM: function () {
/* This method gets overridden in src/converse-controlbox.js if /* This method gets overridden in src/converse-controlbox.js if
* the controlbox plugin is active. * the controlbox plugin is active.
*/ */

View File

@ -152,7 +152,7 @@
ChatBoxView: { ChatBoxView: {
insertIntoPage: function () { insertIntoDOM: function () {
this.$el.insertAfter(converse.chatboxviews.get("controlbox").$el); this.$el.insertAfter(converse.chatboxviews.get("controlbox").$el);
return this; return this;
} }

View File

@ -85,7 +85,7 @@
this.model.on('show', this.show, this); this.model.on('show', this.show, this);
this.model.on('destroy', this.hide, this); this.model.on('destroy', this.hide, this);
this.model.on('change:minimized', this.onMinimizedChanged, this); this.model.on('change:minimized', this.onMinimizedChanged, this);
this.render().fetchMessages().insertIntoPage().hide(); this.render().fetchMessages().insertIntoDOM().hide();
converse.emit('chatBoxInitialized', this); converse.emit('chatBoxInitialized', this);
}, },