Commit b6b00887 authored by JC Brand's avatar JC Brand

Export BootstrapModal

parent c9f29f76
......@@ -6,8 +6,9 @@
import "converse-chatboxviews";
import "converse-message-view";
import "converse-modal";
import { debounce, get, isString } from "lodash";
import { BootstrapModal } from "./converse-modal.js";
import { Overview } from "skeletor.js/src/overview";
import { debounce, get, isString } from "lodash";
import { html, render } from "lit-html";
import converse from "@converse/headless/converse-core";
import log from "@converse/headless/log";
......@@ -72,7 +73,7 @@ converse.plugins.add('converse-chatview', {
});
_converse.UserDetailsModal = _converse.BootstrapModal.extend({
_converse.UserDetailsModal = BootstrapModal.extend({
id: "user-details-modal",
events: {
......@@ -81,7 +82,7 @@ converse.plugins.add('converse-chatview', {
},
initialize () {
_converse.BootstrapModal.prototype.initialize.apply(this, arguments);
BootstrapModal.prototype.initialize.apply(this, arguments);
this.model.rosterContactAdded.then(() => this.registerContactEventHandlers());
this.listenTo(this.model, 'change', this.render);
this.registerContactEventHandlers();
......
......@@ -7,7 +7,9 @@ import "./utils/html";
import "@converse/headless/converse-emoji";
import URI from "urijs";
import converse from "@converse/headless/converse-core";
import { BootstrapModal } from "./converse-modal.js";
import { debounce } from 'lodash'
import { render } from "lit-html";
import filesize from "filesize";
import log from "@converse/headless/log";
import tpl_csn from "templates/csn.html";
......@@ -69,7 +71,7 @@ converse.plugins.add('converse-message-view', {
'allow_message_retraction': 'all'
});
_converse.MessageVersionsModal = _converse.BootstrapModal.extend({
_converse.MessageVersionsModal = BootstrapModal.extend({
id: "message-versions-modal",
toHTML () {
return tpl_message_versions_modal(this.model.toJSON());
......
This diff is collapsed.
......@@ -9,6 +9,7 @@ import "@converse/headless/utils/muc";
import { Model } from 'skeletor.js/src/model.js';
import { View } from 'skeletor.js/src/view.js';
import { get, head, isString, isUndefined } from "lodash";
import { BootstrapModal } from "./converse-modal.js";
import { render } from "lit-html";
import { __ } from '@converse/headless/i18n';
import converse from "@converse/headless/converse-core";
......@@ -223,12 +224,12 @@ converse.plugins.add('converse-muc-views', {
}
_converse.ModeratorToolsModal = _converse.BootstrapModal.extend({
_converse.ModeratorToolsModal = BootstrapModal.extend({
id: "converse-modtools-modal",
initialize (attrs) {
this.chatroomview = attrs.chatroomview;
_converse.BootstrapModal.prototype.initialize.apply(this, arguments);
BootstrapModal.prototype.initialize.apply(this, arguments);
this.listenTo(this.model, 'change:role', () => {
this.users_with_role = this.getUsersWithRole();
......@@ -412,7 +413,7 @@ converse.plugins.add('converse-muc-views', {
});
_converse.ListChatRoomsModal = _converse.BootstrapModal.extend({
_converse.ListChatRoomsModal = BootstrapModal.extend({
id: "list-chatrooms-modal",
events: {
......@@ -424,7 +425,7 @@ converse.plugins.add('converse-muc-views', {
},
initialize () {
_converse.BootstrapModal.prototype.initialize.apply(this, arguments);
BootstrapModal.prototype.initialize.apply(this, arguments);
if (_converse.muc_domain && !this.model.get('muc_domain')) {
this.model.save('muc_domain', _converse.muc_domain);
}
......@@ -544,7 +545,7 @@ converse.plugins.add('converse-muc-views', {
});
_converse.AddChatRoomModal = _converse.BootstrapModal.extend({
_converse.AddChatRoomModal = BootstrapModal.extend({
id: 'add-chatroom-modal',
events: {
......@@ -554,7 +555,7 @@ converse.plugins.add('converse-muc-views', {
},
initialize () {
_converse.BootstrapModal.prototype.initialize.apply(this, arguments);
BootstrapModal.prototype.initialize.apply(this, arguments);
this.listenTo(this.model, 'change:muc_domain', this.render);
this.muc_roomid_policy_error_msg = null;
},
......@@ -637,11 +638,11 @@ converse.plugins.add('converse-muc-views', {
});
_converse.RoomDetailsModal = _converse.BootstrapModal.extend({
_converse.RoomDetailsModal = BootstrapModal.extend({
id: "room-details-modal",
initialize () {
_converse.BootstrapModal.prototype.initialize.apply(this, arguments);
BootstrapModal.prototype.initialize.apply(this, arguments);
this.listenTo(this.model, 'change', this.render);
this.listenTo(this.model.features, 'change', this.render);
this.listenTo(this.model.occupants, 'add', this.render);
......@@ -2224,11 +2225,11 @@ converse.plugins.add('converse-muc-views', {
});
_converse.MUCInviteModal = _converse.BootstrapModal.extend({
_converse.MUCInviteModal = BootstrapModal.extend({
id: "muc-invite-modal",
initialize () {
_converse.BootstrapModal.prototype.initialize.apply(this, arguments);
BootstrapModal.prototype.initialize.apply(this, arguments);
this.listenTo(this.model, 'change', this.render);
this.initInviteWidget();
},
......
......@@ -6,6 +6,7 @@
import "@converse/headless/converse-status";
import "@converse/headless/converse-vcard";
import "converse-modal";
import { BootstrapModal } from "./converse-modal.js";
import bootstrap from "bootstrap.native";
import converse from "@converse/headless/converse-core";
import log from "@converse/headless/log";
......@@ -34,7 +35,7 @@ converse.plugins.add('converse-profile', {
});
_converse.ProfileModal = _converse.BootstrapModal.extend({
_converse.ProfileModal = BootstrapModal.extend({
id: "user-profile-modal",
events: {
'change input[type="file"': "updateFilePreview",
......@@ -44,7 +45,7 @@ converse.plugins.add('converse-profile', {
initialize () {
this.listenTo(this.model, 'change', this.render);
_converse.BootstrapModal.prototype.initialize.apply(this, arguments);
BootstrapModal.prototype.initialize.apply(this, arguments);
/**
* Triggered when the _converse.ProfileModal has been created and initialized.
* @event _converse#profileModalInitialized
......@@ -128,7 +129,7 @@ converse.plugins.add('converse-profile', {
});
_converse.ChatStatusModal = _converse.BootstrapModal.extend({
_converse.ChatStatusModal = BootstrapModal.extend({
id: "modal-status-change",
events: {
"submit form#set-xmpp-status": "onFormSubmitted",
......@@ -180,7 +181,7 @@ converse.plugins.add('converse-profile', {
}
});
_converse.ClientInfoModal = _converse.BootstrapModal.extend({
_converse.ClientInfoModal = BootstrapModal.extend({
id: "converse-client-info-modal",
toHTML () {
......
......@@ -7,6 +7,7 @@ import "@converse/headless/converse-chatboxes";
import "@converse/headless/converse-roster";
import "converse-modal";
import { compact, debounce, has, isString, uniq, without } from "lodash";
import { BootstrapModal } from "./converse-modal.js";
import { View } from 'skeletor.js/src/view.js';
import { Model } from 'skeletor.js/src/model.js';
import { OrderedListView } from "skeletor.js/src/overview";
......@@ -56,14 +57,14 @@ converse.plugins.add('converse-rosterview', {
};
_converse.AddContactModal = _converse.BootstrapModal.extend({
_converse.AddContactModal = BootstrapModal.extend({
id: "add-contact-modal",
events: {
'submit form': 'addContactFromForm'
},
initialize () {
_converse.BootstrapModal.prototype.initialize.apply(this, arguments);
BootstrapModal.prototype.initialize.apply(this, arguments);
this.listenTo(this.model, 'change', this.render);
},
......
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