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
37ce3fb7
Commit
37ce3fb7
authored
May 15, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a button to refresh a contact's vcard
parent
63ce5017
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
5 deletions
+23
-5
css/converse.css
css/converse.css
+3
-1
css/inverse.css
css/inverse.css
+3
-1
sass/_chatbox.scss
sass/_chatbox.scss
+2
-0
sass/_core.scss
sass/_core.scss
+1
-1
src/converse-chatview.js
src/converse-chatview.js
+12
-1
src/templates/user_details_modal.html
src/templates/user_details_modal.html
+2
-1
No files found.
css/converse.css
View file @
37ce3fb7
...
...
@@ -7005,7 +7005,7 @@ body.reset {
color
:
#fff
;
}
#conversejs
.btn
.fa
{
color
:
#fff
;
padding
-right
:
0.5em
;
}
margin
-right
:
0.5em
;
}
#conversejs
.no-text-select
{
-webkit-touch-callout
:
none
;
-webkit-user-select
:
none
;
...
...
@@ -7299,6 +7299,8 @@ body.reset {
#conversejs
.chat-head.chat-head-chatbox
{
background-color
:
#3AA569
;
}
#conversejs
.chat-head
.avatar
{
height
:
36px
;
width
:
36px
;
margin-right
:
0.5em
;
}
#conversejs
.chat-head
.chatbox-buttons
{
flex-direction
:
row-reverse
;
...
...
css/inverse.css
View file @
37ce3fb7
...
...
@@ -7005,7 +7005,7 @@ body.reset {
color
:
#fff
;
}
#conversejs
.btn
.fa
{
color
:
#fff
;
padding
-right
:
0.5em
;
}
margin
-right
:
0.5em
;
}
#conversejs
.no-text-select
{
-webkit-touch-callout
:
none
;
-webkit-user-select
:
none
;
...
...
@@ -7350,6 +7350,8 @@ body {
#conversejs
.chat-head.chat-head-chatbox
{
background-color
:
#3AA569
;
}
#conversejs
.chat-head
.avatar
{
height
:
36px
;
width
:
36px
;
margin-right
:
0.5em
;
}
#conversejs
.chat-head
.chatbox-buttons
{
flex-direction
:
row-reverse
;
...
...
sass/_chatbox.scss
View file @
37ce3fb7
...
...
@@ -48,6 +48,8 @@
}
.avatar
{
height
:
36px
;
width
:
36px
;
margin-right
:
0
.5em
;
}
...
...
sass/_core.scss
View file @
37ce3fb7
...
...
@@ -252,7 +252,7 @@ body.reset {
color
:
#fff
;
.fa
{
color
:
#fff
;
padding
-right
:
0
.5em
;
margin
-right
:
0
.5em
;
}
}
...
...
src/converse-chatview.js
View file @
37ce3fb7
...
...
@@ -237,7 +237,8 @@
_converse
.
UserDetailsModal
=
_converse
.
BootstrapModal
.
extend
({
events
:
{
'
click button.remove-contact
'
:
'
removeContact
'
'
click button.remove-contact
'
:
'
removeContact
'
,
'
click button.refresh-contact
'
:
'
refreshContact
'
},
initialize
()
{
...
...
@@ -260,6 +261,7 @@
'
label_jid
'
:
__
(
'
Jabber ID
'
),
'
label_nickname
'
:
__
(
'
Nickname
'
),
'
label_remove
'
:
__
(
'
Remove as contact
'
),
'
label_refresh
'
:
__
(
'
Refresh
'
),
'
label_role
'
:
__
(
'
Role
'
),
'
label_url
'
:
__
(
'
URL
'
)
}));
...
...
@@ -276,6 +278,15 @@
}
},
refreshContact
(
ev
)
{
if
(
ev
&&
ev
.
preventDefault
)
{
ev
.
preventDefault
();
}
const
refresh_icon
=
this
.
el
.
querySelector
(
'
.fa-refresh
'
);
u
.
addClass
(
'
fa-spin
'
,
refresh_icon
);
_converse
.
api
.
vcard
.
update
(
this
.
model
.
contact
.
vcard
,
true
)
.
then
(()
=>
u
.
removeClass
(
'
fa-spin
'
,
refresh_icon
))
.
catch
(
_
.
partial
(
_converse
.
log
,
_
,
Strophe
.
LogLevel
.
FATAL
));
},
removeContact
(
ev
)
{
if
(
ev
&&
ev
.
preventDefault
)
{
ev
.
preventDefault
();
}
if
(
!
_converse
.
allow_contact_removal
)
{
return
;
}
...
...
src/templates/user_details_modal.html
View file @
37ce3fb7
...
...
@@ -30,8 +30,9 @@
</div>
<div
class=
"modal-footer"
>
{[ if (o.allow_contact_removal
&&
o.is_roster_contact) { ]}
<button
type=
"button"
class=
"btn btn-danger remove-contact"
data-dismiss=
"modal"
><i
class=
"fa fa-trash"
>
</i>
{{{o.label_remove}}}
</button>
<button
type=
"button"
class=
"btn btn-danger remove-contact"
><i
class=
"fa fa-trash"
>
</i>
{{{o.label_remove}}}
</button>
{[ } ]}
<button
type=
"button"
class=
"btn btn-info refresh-contact"
><i
class=
"fa fa-refresh"
>
</i>
{{{o.label_refresh}}}
</button>
<button
type=
"button"
class=
"btn btn-secondary"
data-dismiss=
"modal"
>
{{{o.label_close}}}
</button>
</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