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
0d542cee
Commit
0d542cee
authored
Nov 24, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New config settings ``allow_bookmarks``
parent
a4eb622a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
8 deletions
+32
-8
docs/CHANGES.md
docs/CHANGES.md
+3
-2
docs/source/configuration.rst
docs/source/configuration.rst
+8
-0
src/converse-bookmarks.js
src/converse-bookmarks.js
+21
-6
No files found.
docs/CHANGES.md
View file @
0d542cee
...
...
@@ -2,9 +2,10 @@
## 2.0.2 (Unreleased)
-
#721 keepalive not working with anonymous authentication [jcbrand]
-
#723 Bugfix: Arrays in configuration settings were ignored. [jcbrand]
-
#734 Bugfix.
`converse.rooms.open`
ignored the
`muc_nickname_from_jid`
setting. [jcbrand]
-
Enable new rooms to be configured automatically, with a default config, via
`rooms.open`
.
For details, refer to the
[
relevant documentation
](
https://conversejs.org/docs/html/developer_api.html#the-rooms-grouping
)
[
jcbrand
]
-
#723 Bugfix: Arrays in configuration settings were ignored. [jcbrand]
-
Bugfix: Chatboxes aren't closed when logging out. [jcbrand]
-
Bugfix: Trying to save data on the
`ControlBox`
model before
`ChatBoxes`
collection has its
`browserStorage`
configured.
...
...
@@ -16,7 +17,7 @@
Instead,
`converse.initialize`
returns a promise which will resolve once
initialization is complete. [jcbrand]
-
New event
[
'reconnecting'
](
https://conversejs.org/docs/html/development.html#reconnecting
)
[
jcbrand
]
-
#723, #734: Bugfix.
`converse.rooms.open`
ignored the
`muc_nickname_from_jid`
setting.
[jcbrand]
-
New configuration setting
[
allow_bookmarks
](
https://conversejs.org/docs/html/configuration.html#allow_bookmarks
)
[
jcbrand
]
## 2.0.1 (2016-11-07)
-
#203 New configuration setting
[
muc_domain
](
https://conversejs.org/docs/html/configuration.html#muc_domain
)
[
jcbrand
]
...
...
docs/source/configuration.rst
View file @
0d542cee
...
...
@@ -114,6 +114,14 @@ Here's an example of converse.js being initialized with these three options:
allow_logout: false
});
allow_bookmarks
---------------
* Default: ``true``
Enables/disables chatroom bookmarks functionality.
This setting is only applicable if the ``converse-bookmarks`` plugin is loaded.
allow_chat_pending_contacts
---------------------------
...
...
src/converse-bookmarks.js
View file @
0d542cee
...
...
@@ -71,11 +71,13 @@
render
:
function
(
options
)
{
this
.
__super__
.
render
.
apply
(
this
,
arguments
);
if
(
converse
.
allow_bookmarks
)
{
var
label_bookmark
=
_
(
'
Bookmark this room
'
);
var
button
=
'
<a class="chatbox-btn toggle-bookmark icon-pushpin
'
+
(
this
.
model
.
get
(
'
bookmarked
'
)
?
'
button-on"
'
:
'
"
'
)
+
'
title="
'
+
label_bookmark
+
'
"></a>
'
;
this
.
$el
.
find
(
'
.chat-head-chatroom .icon-wrench
'
).
before
(
button
);
}
return
this
;
},
...
...
@@ -84,7 +86,7 @@
* for this room, and if so use it.
* Otherwise delegate to the super method.
*/
if
(
_
.
isUndefined
(
converse
.
bookmarks
))
{
if
(
_
.
isUndefined
(
converse
.
bookmarks
)
||
!
converse
.
allow_bookmarks
)
{
return
this
.
__super__
.
checkForReservedNick
.
apply
(
this
,
arguments
);
}
var
model
=
converse
.
bookmarks
.
findWhere
({
'
jid
'
:
this
.
model
.
get
(
'
jid
'
)});
...
...
@@ -172,6 +174,13 @@
* loaded by converse.js's plugin machinery.
*/
var
converse
=
this
.
converse
;
// Configuration values for this plugin
// ====================================
// Refer to docs/source/configuration.rst for explanations of these
// configuration settings.
this
.
updateSettings
({
allow_bookmarks
:
true
});
converse
.
Bookmark
=
Backbone
.
Model
;
...
...
@@ -410,6 +419,9 @@
});
var
initBookmarks
=
function
()
{
if
(
!
converse
.
allow_bookmarks
)
{
return
;
}
converse
.
bookmarks
=
new
converse
.
Bookmarks
();
converse
.
bookmarks
.
fetchBookmarks
().
always
(
function
()
{
converse
.
bookmarksview
=
new
converse
.
BookmarksView
(
...
...
@@ -420,6 +432,9 @@
converse
.
on
(
'
chatBoxesFetched
'
,
initBookmarks
);
var
afterReconnection
=
function
()
{
if
(
!
converse
.
allow_bookmarks
)
{
return
;
}
if
(
_
.
isUndefined
(
converse
.
bookmarksview
))
{
initBookmarks
();
}
else
{
...
...
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