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
a1b31cd1
Commit
a1b31cd1
authored
Mar 09, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial work on adding support for headline messages.
parent
86a1b662
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
2 deletions
+40
-2
converse.js
converse.js
+2
-0
src/converse-core.js
src/converse-core.js
+2
-1
src/converse-headline.js
src/converse-headline.js
+33
-0
src/templates/chatbox.html
src/templates/chatbox.html
+3
-1
No files found.
converse.js
View file @
a1b31cd1
...
@@ -47,6 +47,7 @@ require.config({
...
@@ -47,6 +47,7 @@ require.config({
"
converse-api
"
:
"
src/converse-api
"
,
"
converse-api
"
:
"
src/converse-api
"
,
"
converse-controlbox
"
:
"
src/converse-controlbox
"
,
"
converse-controlbox
"
:
"
src/converse-controlbox
"
,
"
converse-core
"
:
"
src/converse-core
"
,
"
converse-core
"
:
"
src/converse-core
"
,
"
converse-headline
"
:
"
src/converse-notification
"
,
"
converse-muc
"
:
"
src/converse-muc
"
,
"
converse-muc
"
:
"
src/converse-muc
"
,
"
converse-notification
"
:
"
src/converse-notification
"
,
"
converse-notification
"
:
"
src/converse-notification
"
,
"
converse-otr
"
:
"
src/converse-otr
"
,
"
converse-otr
"
:
"
src/converse-otr
"
,
...
@@ -230,6 +231,7 @@ if (typeof define !== 'undefined') {
...
@@ -230,6 +231,7 @@ if (typeof define !== 'undefined') {
"
converse-register
"
,
// XEP-0077 In-band registration
"
converse-register
"
,
// XEP-0077 In-band registration
"
converse-ping
"
,
// XEP-0199 XMPP Ping
"
converse-ping
"
,
// XEP-0199 XMPP Ping
"
converse-notification
"
,
// HTML5 Notifications
"
converse-notification
"
,
// HTML5 Notifications
"
converse-headline
"
,
// Support for headline messages
/* END: Removable components */
/* END: Removable components */
],
function
(
converse_api
)
{
],
function
(
converse_api
)
{
...
...
src/converse-core.js
View file @
a1b31cd1
...
@@ -1468,9 +1468,10 @@
...
@@ -1468,9 +1468,10 @@
.
html
(
converse
.
templates
.
chatbox
(
.
html
(
converse
.
templates
.
chatbox
(
_
.
extend
(
this
.
model
.
toJSON
(),
{
_
.
extend
(
this
.
model
.
toJSON
(),
{
show_toolbar
:
converse
.
show_toolbar
,
show_toolbar
:
converse
.
show_toolbar
,
show_textarea
:
true
,
title
:
this
.
model
.
get
(
'
fullname
'
),
info_close
:
__
(
'
Close this chat box
'
),
info_close
:
__
(
'
Close this chat box
'
),
info_minimize
:
__
(
'
Minimize this chat box
'
),
info_minimize
:
__
(
'
Minimize this chat box
'
),
info_view
:
__
(
'
View more information on this person
'
),
label_personal_message
:
__
(
'
Personal message
'
)
label_personal_message
:
__
(
'
Personal message
'
)
}
}
)
)
...
...
src/converse-headline.js
0 → 100644
View file @
a1b31cd1
// Converse.js (A browser based XMPP chat client)
// http://conversejs.org
//
// Copyright (c) 2012-2016, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
/*global define */
(
function
(
root
,
factory
)
{
define
(
"
converse-headline
"
,
[
"
converse-core
"
,
"
converse-api
"
],
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
;
converse_api
.
plugins
.
add
(
'
headline
'
,
{
initialize
:
function
()
{
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
// TODO
}
});
}));
src/templates/chatbox.html
View file @
a1b31cd1
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
{[ if (url) { ]}
{[ if (url) { ]}
<a
href=
"{{url}}"
target=
"_blank"
class=
"user"
>
<a
href=
"{{url}}"
target=
"_blank"
class=
"user"
>
{[ } ]}
{[ } ]}
{{
fullnam
e }}
{{
titl
e }}
{[ if (url) { ]}
{[ if (url) { ]}
</a>
</a>
{[ } ]}
{[ } ]}
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
</div>
</div>
<div
class=
"chat-body"
>
<div
class=
"chat-body"
>
<div
class=
"chat-content"
></div>
<div
class=
"chat-content"
></div>
{[ if (show_textarea) { ]}
<form
class=
"sendXMPPMessage"
action=
""
method=
"post"
>
<form
class=
"sendXMPPMessage"
action=
""
method=
"post"
>
{[ if (show_toolbar) { ]}
{[ if (show_toolbar) { ]}
<ul
class=
"chat-toolbar no-text-select"
></ul>
<ul
class=
"chat-toolbar no-text-select"
></ul>
...
@@ -27,5 +28,6 @@
...
@@ -27,5 +28,6 @@
class=
"chat-textarea"
class=
"chat-textarea"
placeholder=
"{{label_personal_message}}"
/>
placeholder=
"{{label_personal_message}}"
/>
</form>
</form>
{[ } ]}
</div>
</div>
</div>
</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