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
5278e4fe
Commit
5278e4fe
authored
Feb 23, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add outline for a user profile modal
parent
66e6ae2e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
2 deletions
+37
-2
src/converse-profile.js
src/converse-profile.js
+22
-1
src/templates/profile_modal.html
src/templates/profile_modal.html
+12
-0
src/templates/profile_view.html
src/templates/profile_view.html
+3
-1
No files found.
src/converse-profile.js
View file @
5278e4fe
...
...
@@ -10,6 +10,7 @@
define
([
"
converse-core
"
,
"
bootstrap
"
,
"
tpl!chat_status_modal
"
,
"
tpl!profile_modal
"
,
"
tpl!profile_view
"
,
"
tpl!status_option
"
,
"
converse-vcard
"
,
...
...
@@ -19,6 +20,7 @@
converse
,
bootstrap
,
tpl_chat_status_modal
,
tpl_profile_modal
,
tpl_profile_view
,
tpl_status_option
)
{
...
...
@@ -40,6 +42,17 @@
{
__
}
=
_converse
;
_converse
.
ProfileModal
=
_converse
.
BootstrapModal
.
extend
({
toHTML
()
{
return
tpl_profile_modal
(
_
.
extend
(
this
.
model
.
toJSON
(),
{
'
heading_profile
'
:
__
(
'
Your profile
'
),
'
label_close
'
:
__
(
'
Close
'
)
}));
},
});
_converse
.
ChatStatusModal
=
_converse
.
BootstrapModal
.
extend
({
events
:
{
"
submit form#set-xmpp-status
"
:
"
onFormSubmitted
"
,
...
...
@@ -85,6 +98,7 @@
_converse
.
XMPPStatusView
=
Backbone
.
VDOMView
.
extend
({
tagName
:
"
div
"
,
events
:
{
"
click a.show-profile
"
:
"
showProfileModal
"
,
"
click a.change-status
"
:
"
showStatusChangeModal
"
,
"
click .dropdown dd ul li a
"
:
"
setStatus
"
,
"
click .logout
"
:
"
logOut
"
...
...
@@ -108,6 +122,13 @@
}));
},
showProfileModal
(
ev
)
{
if
(
_
.
isUndefined
(
this
.
profile_modal
))
{
this
.
profile_modal
=
new
_converse
.
ProfileModal
({
model
:
this
.
model
});
}
this
.
profile_modal
.
show
(
ev
);
},
showStatusChangeModal
(
ev
)
{
if
(
_
.
isUndefined
(
this
.
status_modal
))
{
this
.
status_modal
=
new
_converse
.
ChatStatusModal
({
model
:
this
.
model
});
...
...
src/templates/profile_modal.html
0 → 100644
View file @
5278e4fe
<div
class=
"modal fade"
id=
"user-profile-modal"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"user-profile-modal-label"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"user-profile-modal-label"
>
{{{o.heading_profile}}}
</h5>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"{{{o.label_close}}}"
><span
aria-hidden=
"true"
>
×
</span></button>
</div>
<div
class=
"modal-body"
>
</div>
</div>
</div>
</div>
src/templates/profile_view.html
View file @
5278e4fe
<div
class=
"userinfo"
>
<div
class=
"d-flex"
>
{[ if (o.image) { ]}
<a
class=
"show-profile"
href=
"#"
>
<img
alt=
"User Avatar"
class=
"avatar align-self-center"
height=
"40px"
width=
"40px"
src=
"data:{{{o.image_type}}};base64,{{{o.image}}}"
/>
</a>
{[ } ]}
<span
class=
"username w-100 align-self-center"
>
{{{o.fullname}}}
</span>
<!-- <a class="chatbox-btn fa fa-vcard align-self-center" title="{{{o.title_your_profile}}}" data-toggle="modal" data-target="#userProfileModal"></a> -->
...
...
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