Bläddra i källkod

Rename `ChatBoxView.insertIntoPage` to `ChatBoxView.insertIntoDOM`

to ensure naming consistency, we have the same method on `ChatRoomView`.
JC Brand 9 år sedan
förälder
incheckning
9e8674ef55
4 ändrade filer med 7 tillägg och 4 borttagningar
  1. 3 0
      docs/CHANGES.md
  2. 2 2
      src/converse-chatview.js
  3. 1 1
      src/converse-controlbox.js
  4. 1 1
      src/converse-headline.js

+ 3 - 0
docs/CHANGES.md

@@ -4,6 +4,9 @@
 
 - Restrict occupants sidebar to 30% chatroom width. [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)
 

+ 2 - 2
src/converse-chatview.js

@@ -83,7 +83,7 @@
                     this.model.on('change:status', this.onStatusChanged, this);
                     this.model.on('showHelpMessages', this.showHelpMessages, 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.
                     // The code that gets executed because of that looks like this:
                     //      this.$el.on('scroll', '.chat-content', this.markScrolled.bind(this));
@@ -127,7 +127,7 @@
                     return this;
                 },
 
-                insertIntoPage: function () {
+                insertIntoDOM: function () {
                     /* This method gets overridden in src/converse-controlbox.js if
                      * the controlbox plugin is active.
                      */

+ 1 - 1
src/converse-controlbox.js

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

+ 1 - 1
src/converse-headline.js

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