Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
b6501bcf
Commit
b6501bcf
authored
Feb 15, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Render .row inside #conversejs element
parent
54019985
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
src/converse-chatboxes.js
src/converse-chatboxes.js
+21
-2
src/templates/chatboxes.html
src/templates/chatboxes.html
+1
-0
No files found.
src/converse-chatboxes.js
View file @
b6501bcf
...
@@ -7,11 +7,17 @@
...
@@ -7,11 +7,17 @@
/*global define */
/*global define */
(
function
(
root
,
factory
)
{
(
function
(
root
,
factory
)
{
define
([
"
converse-core
"
,
"
backbone.overview
"
],
factory
);
define
([
}(
this
,
function
(
converse
)
{
"
converse-core
"
,
"
tpl!chatboxes
"
,
"
backbone.overview
"
],
factory
);
}(
this
,
function
(
converse
,
tpl_chatboxes
)
{
"
use strict
"
;
"
use strict
"
;
const
{
Backbone
,
Promise
,
Strophe
,
b64_sha1
,
moment
,
utils
,
_
}
=
converse
.
env
;
const
{
Backbone
,
Promise
,
Strophe
,
b64_sha1
,
moment
,
utils
,
_
}
=
converse
.
env
;
converse
.
plugins
.
add
(
'
converse-chatboxes
'
,
{
converse
.
plugins
.
add
(
'
converse-chatboxes
'
,
{
overrides
:
{
overrides
:
{
...
@@ -411,6 +417,12 @@
...
@@ -411,6 +417,12 @@
initialize
()
{
initialize
()
{
this
.
model
.
on
(
"
add
"
,
this
.
onChatBoxAdded
,
this
);
this
.
model
.
on
(
"
add
"
,
this
.
onChatBoxAdded
,
this
);
this
.
model
.
on
(
"
destroy
"
,
this
.
removeChat
,
this
);
this
.
model
.
on
(
"
destroy
"
,
this
.
removeChat
,
this
);
this
.
render
();
},
render
()
{
this
.
el
.
innerHTML
=
tpl_chatboxes
();
this
.
row_el
=
this
.
el
.
querySelector
(
'
.row
'
);
},
},
_ensureElement
()
{
_ensureElement
()
{
...
@@ -440,6 +452,13 @@
...
@@ -440,6 +452,13 @@
}
}
},
},
insertRowColumn
(
el
)
{
/* Add a new DOM element (likely a chat box) into the
* the row managed by this overview.
*/
this
.
row_el
.
insertAdjacentElement
(
'
afterBegin
'
,
el
);
},
onChatBoxAdded
(
item
)
{
onChatBoxAdded
(
item
)
{
// Views aren't created here, since the core code doesn't
// Views aren't created here, since the core code doesn't
// contain any views. Instead, they're created in overrides in
// contain any views. Instead, they're created in overrides in
...
...
src/templates/chatboxes.html
0 → 100644
View file @
b6501bcf
<div
class=
"row no-gutters"
></div>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment