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
6c262f72
Commit
6c262f72
authored
Jun 14, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Various small changes to reduce (non-critical) errors during testing
parent
b0c20d54
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
3 deletions
+11
-3
spec/converse.js
spec/converse.js
+4
-1
src/converse-minimize.js
src/converse-minimize.js
+5
-1
src/converse-muc.js
src/converse-muc.js
+1
-1
tests/mock.js
tests/mock.js
+1
-0
No files found.
spec/converse.js
View file @
6c262f72
...
...
@@ -321,7 +321,10 @@
});
describe
(
"
The
\"
settings
\"
API
"
,
function
()
{
it
(
"
has methods 'get' and 'set' to set configuration settings
"
,
mock
.
initConverse
(
function
(
_converse
)
{
it
(
"
has methods 'get' and 'set' to set configuration settings
"
,
mock
.
initConverse
(
{
'
play_sounds
'
:
true
},
function
(
_converse
)
{
expect
(
_
.
keys
(
_converse
.
api
.
settings
)).
toEqual
([
"
get
"
,
"
set
"
]);
expect
(
_converse
.
api
.
settings
.
get
(
"
play_sounds
"
)).
toBe
(
true
);
_converse
.
api
.
settings
.
set
(
"
play_sounds
"
,
false
);
...
...
src/converse-minimize.js
View file @
6c262f72
...
...
@@ -150,7 +150,11 @@
var
_converse
=
this
.
__super__
.
_converse
;
if
(
ev
&&
ev
.
preventDefault
)
{
ev
.
preventDefault
();
}
// save the scroll position to restore it on maximize
this
.
model
.
save
({
'
scroll
'
:
this
.
$content
.
scrollTop
()});
if
(
this
.
model
.
collection
&&
this
.
model
.
collection
.
browserStorage
)
{
this
.
model
.
save
({
'
scroll
'
:
this
.
$content
.
scrollTop
()});
}
else
{
this
.
model
.
set
({
'
scroll
'
:
this
.
$content
.
scrollTop
()});
}
this
.
setChatState
(
_converse
.
INACTIVE
).
model
.
minimize
();
this
.
hide
();
_converse
.
emit
(
'
chatBoxMinimized
'
,
this
);
...
...
src/converse-muc.js
View file @
6c262f72
...
...
@@ -548,7 +548,7 @@
*
* This is instead done in `afterConnected` below.
*/
if
(
this
.
model
.
collection
.
browserStorage
)
{
if
(
this
.
model
.
collection
&&
this
.
model
.
collection
.
browserStorage
)
{
// Without a connection, we haven't yet initialized
// localstorage
this
.
model
.
save
();
...
...
tests/mock.js
View file @
6c262f72
...
...
@@ -90,6 +90,7 @@
var
converse
=
converse_api
.
initialize
(
_
.
extend
({
'
i18n
'
:
'
en
'
,
'
auto_subscribe
'
:
false
,
'
play_sounds
'
:
false
,
'
bosh_service_url
'
:
'
localhost
'
,
'
connection
'
:
connection
,
'
animate
'
:
false
,
...
...
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