Remove the controlbox as a dependency of converse-muc.

This commit is contained in:
JC Brand 2016-06-03 18:47:23 +02:00
parent 1b8ab4c4ec
commit 66242fc2f2

View File

@ -14,9 +14,7 @@
"converse-core",
"converse-api",
"typeahead",
"converse-chatview",
// XXX: should we remove this dependency?
"converse-controlbox"
"converse-chatview"
], factory);
}(this, function (converse, converse_api) {
"use strict";
@ -204,7 +202,12 @@
},
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;
},