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
81f4d19a
Commit
81f4d19a
authored
Oct 20, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add option to set the XHR user search URL. Fixes #51
parent
25dc4a27
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
32 deletions
+82
-32
converse.js
converse.js
+7
-3
docs/source/index.rst
docs/source/index.rst
+75
-29
No files found.
converse.js
View file @
81f4d19a
...
...
@@ -74,7 +74,9 @@
this
.
show_toolbar
=
true
;
this
.
testing
=
false
;
// Exposes sensitive data for testing. Never set to true in production systems!
this
.
xhr_custom_status
=
false
;
this
.
xhr_custom_status_url
=
''
;
this
.
xhr_user_search
=
false
;
this
.
xhr_user_search_url
=
''
;
// Allow only whitelisted configuration attributes to be overwritten
_
.
extend
(
this
,
_
.
pick
(
settings
,
[
...
...
@@ -100,7 +102,9 @@
'
sid
'
,
'
testing
'
,
'
xhr_custom_status
'
,
'
xhr_user_search
'
'
xhr_custom_status_url
'
,
'
xhr_user_search
'
,
'
xhr_user_search_url
'
]));
// Translation machinery
...
...
@@ -1330,7 +1334,7 @@
searchContacts
:
function
(
ev
)
{
ev
.
preventDefault
();
$
.
getJSON
(
portal_url
+
"
/search-users
?q=
"
+
$
(
ev
.
target
).
find
(
'
input.username
'
).
val
(),
function
(
data
)
{
$
.
getJSON
(
xhr_user_search_url
+
"
?q=
"
+
$
(
ev
.
target
).
find
(
'
input.username
'
).
val
(),
function
(
data
)
{
var
$ul
=
$
(
'
.search-xmpp ul
'
);
$ul
.
find
(
'
li.found-user
'
).
remove
();
$ul
.
find
(
'
li.chat-info
'
).
remove
();
...
...
@@ -3007,7 +3011,7 @@
this
.
save
({
'
status_message
'
:
status_message
});
if
(
this
.
xhr_custom_status
)
{
$
.
ajax
({
url
:
'
set-custom-status
'
,
url
:
this
.
xhr_custom_status_url
,
type
:
'
POST
'
,
data
:
{
'
msg
'
:
status_message
}
});
...
...
docs/source/index.rst
View file @
81f4d19a
This diff is collapsed.
Click to expand it.
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