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
90e4d6cb
Commit
90e4d6cb
authored
Mar 09, 2015
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new configuration setting "allow_contact_removal".
parent
2888bc59
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
1 deletion
+20
-1
converse.js
converse.js
+4
-1
docs/CHANGES.rst
docs/CHANGES.rst
+6
-0
docs/source/configuration.rst
docs/source/configuration.rst
+8
-0
src/templates/roster_item.html
src/templates/roster_item.html
+2
-0
No files found.
converse.js
View file @
90e4d6cb
...
...
@@ -244,6 +244,7 @@
// Default configuration values
// ----------------------------
this
.
default_settings
=
{
allow_contact_removal
:
true
,
allow_contact_requests
:
true
,
allow_dragresize
:
true
,
allow_logout
:
true
,
...
...
@@ -3572,7 +3573,8 @@
_
.
extend
(
item
.
toJSON
(),
{
'
desc_status
'
:
STATUSES
[
chat_status
||
'
offline
'
],
'
desc_chat
'
:
__
(
'
Click to chat with this contact
'
),
'
desc_remove
'
:
__
(
'
Click to remove this contact
'
)
'
desc_remove
'
:
__
(
'
Click to remove this contact
'
),
'
allow_contact_removal
'
:
converse
.
allow_contact_removal
})
));
}
...
...
@@ -3586,6 +3588,7 @@
removeContact
:
function
(
ev
)
{
if
(
ev
&&
ev
.
preventDefault
)
{
ev
.
preventDefault
();
}
if
(
!
converse
.
allow_contact_removal
)
{
return
;
}
var
result
=
confirm
(
__
(
"
Are you sure you want to remove this contact?
"
));
if
(
result
===
true
)
{
var
bare_jid
=
this
.
model
.
get
(
'
jid
'
);
...
...
docs/CHANGES.rst
View file @
90e4d6cb
Changelog
=========
0.9.1 (Unreleased)
------------------
* Set the JID input field in the login form to ``type=email``. [chatme]
* New configuration setting ``allow_contact_removal``. [jcbrand]
0.9.0 (2015-03-06)
------------------
...
...
docs/source/configuration.rst
View file @
90e4d6cb
...
...
@@ -28,6 +28,14 @@ JS file so that it will include the new settings. Please refer to the
Configuration variables
=======================
allow_contact_removal
---------------------
Default: ``true``
Allow the user to remove roster contacts by clicking on the delete icon
(i.e. traschcan) next to a contact's name in the roster.
allow_contact_requests
----------------------
...
...
src/templates/roster_item.html
View file @
90e4d6cb
<a
class=
"open-chat"
title=
"Name: {{fullname}}
JID: {{jid}}
{{desc_chat}}"
href=
"#"
><span
class=
"icon-{{chat_status}}"
title=
"{{desc_status}}"
></span>
{{fullname}}
</a>
{[ if (allow_contact_removal) { ]}
<a
class=
"remove-xmpp-contact icon-remove"
title=
"{{desc_remove}}"
href=
"#"
></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