Commit fe47773c authored by JC Brand's avatar JC Brand

Move ChatView into separate plugin.

parent a1b31cd1
......@@ -45,9 +45,10 @@ require.config({
// Converse
"converse-api": "src/converse-api",
"converse-chatview": "src/converse-chatview",
"converse-controlbox": "src/converse-controlbox",
"converse-core": "src/converse-core",
"converse-headline": "src/converse-notification",
"converse-headline": "src/converse-headline",
"converse-muc": "src/converse-muc",
"converse-notification": "src/converse-notification",
"converse-otr": "src/converse-otr",
......@@ -225,6 +226,7 @@ if (typeof define !== 'undefined') {
// file src/locales.js to include only those
// translations that you care about.
"converse-chatview", // Renders standalone chat boxes for single user chat
"converse-muc", // XEP-0045 Multi-user chat
"converse-otr", // Off-the-record encryption for one-on-one messages
"converse-controlbox", // The control box
......
This diff is collapsed.
......@@ -7,7 +7,12 @@
/*global define, Backbone */
(function (root, factory) {
define("converse-controlbox", ["converse-core", "converse-api"], factory);
define("converse-controlbox", [
"converse-core",
"converse-api",
// TODO: remove this dependency
"converse-chatview"
], factory);
}(this, function (converse, converse_api) {
"use strict";
// Strophe methods for building stanzas
......@@ -18,10 +23,9 @@
// Other necessary globals
var $ = converse_api.env.jQuery,
_ = converse_api.env._,
__ = utils.__.bind(converse),
moment = converse_api.env.moment;
// For translations
var __ = utils.__.bind(converse);
converse_api.plugins.add('controlbox', {
......
This diff is collapsed.
......@@ -7,18 +7,17 @@
/*global define */
(function (root, factory) {
define("converse-headline", ["converse-core", "converse-api"], factory);
define("converse-headline", [
"converse-core",
"converse-api",
// TODO: remove this dependency
"converse-chat"
], factory);
}(this, function (converse, converse_api) {
"use strict";
var $ = converse_api.env.jQuery,
utils = converse_api.env.utils,
Strophe = converse_api.env.Strophe,
_ = converse_api.env._;
// For translations
var __ = utils.__.bind(converse);
var ___ = utils.___;
var supports_html5_notification = "Notification" in window;
var utils = converse_api.env.utils,
_ = converse_api.env._,
__ = utils.__.bind(converse);
converse_api.plugins.add('headline', {
......
......@@ -13,6 +13,8 @@
define("converse-muc", [
"converse-core",
"converse-api",
// TODO remove next two dependencies
"converse-chatview",
"converse-controlbox"
], factory);
}(this, function (converse, converse_api) {
......@@ -202,15 +204,14 @@
*/
var converse = this.converse;
// Configuration values for this plugin
var settings = {
this.updateSettings({
allow_muc: true,
auto_join_on_invite: false, // Auto-join chatroom on invite
hide_muc_server: false,
muc_history_max_stanzas: undefined, // Takes an integer, limits the amount of messages to fetch from chat room's history
};
_.extend(converse.default_settings, settings);
_.extend(converse, settings);
_.extend(converse, _.pick(converse.user_settings, Object.keys(settings)));
show_toolbar: true,
});
converse.ChatRoomView = converse.ChatBoxView.extend({
/* Backbone View which renders a chat room, based upon the view
......
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