Commit 66242fc2 authored by JC Brand's avatar JC Brand

Remove the controlbox as a dependency of converse-muc.

parent 1b8ab4c4
...@@ -14,9 +14,7 @@ ...@@ -14,9 +14,7 @@
"converse-core", "converse-core",
"converse-api", "converse-api",
"typeahead", "typeahead",
"converse-chatview", "converse-chatview"
// XXX: should we remove this dependency?
"converse-controlbox"
], factory); ], factory);
}(this, function (converse, converse_api) { }(this, function (converse, converse_api) {
"use strict"; "use strict";
...@@ -204,7 +202,12 @@ ...@@ -204,7 +202,12 @@
}, },
insertIntoDOM: function () { insertIntoDOM: function () {
this.$el.insertAfter(converse.chatboxviews.get("controlbox").$el); var $cbox = converse.chatboxviews.get("controlbox").$el;
if ($cbox.length) {
this.$el.insertAfter($cbox);
} else {
$('#conversejs').prepend(this.$el);
}
return this; return this;
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment