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
f55b5937
Commit
f55b5937
authored
Mar 13, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the new plugin helper method updateSettings
parent
fe47773c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
24 deletions
+13
-24
src/converse-controlbox.js
src/converse-controlbox.js
+3
-5
src/converse-notification.js
src/converse-notification.js
+4
-6
src/converse-ping.js
src/converse-ping.js
+3
-6
src/converse-register.js
src/converse-register.js
+3
-7
No files found.
src/converse-controlbox.js
View file @
f55b5937
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
define
(
"
converse-controlbox
"
,
[
define
(
"
converse-controlbox
"
,
[
"
converse-core
"
,
"
converse-core
"
,
"
converse-api
"
,
"
converse-api
"
,
"
converse-rosterview
"
,
// TODO: remove this dependency
// TODO: remove this dependency
"
converse-chatview
"
"
converse-chatview
"
],
factory
);
],
factory
);
...
@@ -172,12 +173,9 @@
...
@@ -172,12 +173,9 @@
* loaded by converse.js's plugin machinery.
* loaded by converse.js's plugin machinery.
*/
*/
var
converse
=
this
.
converse
;
var
converse
=
this
.
converse
;
var
settings
=
{
this
.
updateSettings
(
{
show_controlbox_by_default
:
false
,
show_controlbox_by_default
:
false
,
};
});
_
.
extend
(
converse
.
default_settings
,
settings
);
_
.
extend
(
converse
,
settings
);
_
.
extend
(
converse
,
_
.
pick
(
converse
.
user_settings
,
Object
.
keys
(
settings
)));
var
STATUSES
=
{
var
STATUSES
=
{
'
dnd
'
:
__
(
'
This contact is busy
'
),
'
dnd
'
:
__
(
'
This contact is busy
'
),
...
...
src/converse-notification.js
View file @
f55b5937
...
@@ -28,16 +28,14 @@
...
@@ -28,16 +28,14 @@
* loaded by converse.js's plugin machinery.
* loaded by converse.js's plugin machinery.
*/
*/
var
converse
=
this
.
converse
;
var
converse
=
this
.
converse
;
// Configuration values for this plugin
var
settings
=
{
this
.
updateSettings
(
{
show_desktop_notifications
:
true
,
show_desktop_notifications
:
true
,
play_sounds
:
false
,
play_sounds
:
false
,
sounds_path
:
'
/sounds/
'
,
sounds_path
:
'
/sounds/
'
,
notification_icon
:
'
/logo/conversejs.png
'
notification_icon
:
'
/logo/conversejs.png
'
};
});
_
.
extend
(
converse
.
default_settings
,
settings
);
_
.
extend
(
converse
,
settings
);
_
.
extend
(
converse
,
_
.
pick
(
converse
.
user_settings
,
Object
.
keys
(
settings
)));
converse
.
isOnlyChatStateNotification
=
function
(
$msg
)
{
converse
.
isOnlyChatStateNotification
=
function
(
$msg
)
{
// See XEP-0085 Chat State Notification
// See XEP-0085 Chat State Notification
...
...
src/converse-ping.js
View file @
f55b5937
...
@@ -46,13 +46,10 @@
...
@@ -46,13 +46,10 @@
* loaded by converse.js's plugin machinery.
* loaded by converse.js's plugin machinery.
*/
*/
var
converse
=
this
.
converse
;
var
converse
=
this
.
converse
;
// Configuration values for this plugin
var
settings
=
{
this
.
updateSettings
(
{
ping_interval
:
180
//in seconds
ping_interval
:
180
//in seconds
};
});
_
.
extend
(
converse
.
default_settings
,
settings
);
_
.
extend
(
converse
,
settings
);
_
.
extend
(
converse
,
_
.
pick
(
converse
.
user_settings
,
Object
.
keys
(
settings
)));
converse
.
ping
=
function
(
jid
,
success
,
error
,
timeout
)
{
converse
.
ping
=
function
(
jid
,
success
,
error
,
timeout
)
{
// XXX: We could first check here if the server advertised that
// XXX: We could first check here if the server advertised that
...
...
src/converse-register.js
View file @
f55b5937
...
@@ -80,16 +80,12 @@
...
@@ -80,16 +80,12 @@
* loaded by converse.js's plugin machinery.
* loaded by converse.js's plugin machinery.
*/
*/
var
converse
=
this
.
converse
;
var
converse
=
this
.
converse
;
// For translations
// Configuration values for this plugin
this
.
updateSettings
({
var
settings
=
{
allow_registration
:
true
,
allow_registration
:
true
,
domain_placeholder
:
__
(
"
e.g. conversejs.org
"
),
// Placeholder text shown in the domain input on the registration form
domain_placeholder
:
__
(
"
e.g. conversejs.org
"
),
// Placeholder text shown in the domain input on the registration form
providers_link
:
'
https://xmpp.net/directory.php
'
,
// Link to XMPP providers shown on registration page
providers_link
:
'
https://xmpp.net/directory.php
'
,
// Link to XMPP providers shown on registration page
};
});
_
.
extend
(
converse
.
default_settings
,
settings
);
_
.
extend
(
converse
,
settings
);
_
.
extend
(
converse
,
_
.
pick
(
converse
.
user_settings
,
Object
.
keys
(
settings
)));
converse
.
RegisterPanel
=
Backbone
.
View
.
extend
({
converse
.
RegisterPanel
=
Backbone
.
View
.
extend
({
...
...
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