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
f84c443b
Commit
f84c443b
authored
Dec 23, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove jQuery from converse-muc.js
parent
0eee4458
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
99 additions
and
85 deletions
+99
-85
spec/chatroom.js
spec/chatroom.js
+11
-0
src/converse-muc.js
src/converse-muc.js
+85
-82
src/utils.js
src/utils.js
+3
-3
No files found.
spec/chatroom.js
View file @
f84c443b
...
...
@@ -2417,6 +2417,13 @@
expect
(
view
.
renderPasswordForm
).
toHaveBeenCalled
();
expect
(
$chat_body
.
find
(
'
form.chatroom-form
'
).
length
).
toBe
(
1
);
expect
(
$chat_body
.
find
(
'
legend
'
).
text
()).
toBe
(
'
This chatroom requires a password
'
);
// Let's submit the form
spyOn
(
view
,
'
join
'
);
var
input_el
=
view
.
el
.
querySelector
(
'
[name="password"]
'
);
input_el
.
value
=
'
secret
'
;
view
.
el
.
querySelector
(
'
input[type=submit]
'
).
click
();
expect
(
view
.
join
).
toHaveBeenCalledWith
(
undefined
,
"
secret
"
);
done
();
}));
...
...
@@ -2480,6 +2487,10 @@
spyOn
(
view
,
'
showErrorMessage
'
).
and
.
callThrough
();
view
.
onChatRoomPresence
(
presence
);
expect
(
view
.
$el
.
find
(
'
.chatroom-body form.chatroom-form label:first
'
).
text
()).
toBe
(
'
Please choose your nickname
'
);
var
$input
=
view
.
$el
.
find
(
'
.chatroom-body form.chatroom-form input:first
'
);
$input
.
val
(
'
nicky
'
);
view
.
el
.
querySelector
(
'
input[type=submit]
'
).
click
();
done
();
}));
...
...
src/converse-muc.js
View file @
f84c443b
This diff is collapsed.
Click to expand it.
src/utils.js
View file @
f84c443b
...
...
@@ -241,11 +241,11 @@
logger
.
warn
(
err
);
return
reject
(
new
Error
(
err
));
}
else
if
(
_
.
includes
(
el
.
classList
,
'
collapsed
'
))
{
return
resolve
();
return
resolve
(
el
);
}
else
if
(
window
.
converse_disable_effects
)
{
// Effects are disabled (for tests)
el
.
classList
.
add
(
'
collapsed
'
);
el
.
style
.
height
=
""
;
return
resolve
();
return
resolve
(
el
);
}
const
marker
=
el
.
getAttribute
(
'
data-slider-marker
'
);
if
(
marker
)
{
...
...
@@ -270,7 +270,7 @@
el
.
removeAttribute
(
'
data-slider-marker
'
);
el
.
classList
.
add
(
'
collapsed
'
);
el
.
style
.
height
=
""
;
resolve
();
resolve
(
el
);
}
}
el
.
setAttribute
(
...
...
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