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
bc872ee2
Commit
bc872ee2
authored
Jun 04, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix various failing tests and update Makefile
parent
596082ee
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
188 additions
and
81032 deletions
+188
-81032
.eslintrc.json
.eslintrc.json
+1
-0
Makefile
Makefile
+3
-22
dist/converse.js
dist/converse.js
+61
-80914
spec/chatbox.js
spec/chatbox.js
+3
-36
spec/http-file-upload.js
spec/http-file-upload.js
+2
-0
spec/messages.js
spec/messages.js
+8
-0
spec/otr.js
spec/otr.js
+83
-47
spec/register.js
spec/register.js
+18
-4
src/converse-chatview.js
src/converse-chatview.js
+1
-1
src/converse-muc-views.js
src/converse-muc-views.js
+1
-1
src/converse-notification.js
src/converse-notification.js
+1
-1
src/templates/alert_modal.html
src/templates/alert_modal.html
+1
-1
src/templates/field.html
src/templates/field.html
+1
-1
src/utils/core.js
src/utils/core.js
+1
-1
src/utils/form.js
src/utils/form.js
+2
-2
tests/runner.js
tests/runner.js
+1
-1
No files found.
.eslintrc.json
View file @
bc872ee2
...
...
@@ -9,6 +9,7 @@
"plugins"
:
[
"lodash"
],
"extends"
:
[
"eslint:recommended"
,
"plugin:lodash/canonical"
],
"globals"
:
{
"converse"
:
true
,
"window"
:
true
,
"sinon"
:
true
,
"define"
:
true
,
...
...
Makefile
View file @
bc872ee2
...
...
@@ -184,31 +184,12 @@ logo/conversejs-filled%.png:: logo/conversejs-filled.svg
$(OXIPNG)
$@
BUILDS
=
dist/converse.js
\
dist/converse.min.js
\
dist/converse-headless.js
\
dist/converse-headless.min.js
\
dist/converse-no-dependencies.min.js
\
dist/converse-no-dependencies.js
# dist/converse-esnext.js \
# dist/converse-esnext.min.js \
dist/converse.min.js
dist/converse.js
:
transpile src stamp-npm
$(RJS)
-o
src/build.js
include
=
converse
out
=
dist/converse.js
optimize
=
none
./node_modules/.bin/npx webpack
--mode
=
production
dist/converse.min.js
:
transpile src stamp-npm
$(RJS)
-o
src/build.js
include
=
converse
out
=
dist/converse.min.js
dist/converse-headless.js
:
transpile src stamp-npm
$(RJS)
-o
src/build.js paths.converse
=
src/headless
include
=
converse
out
=
dist/converse-headless.js
optimize
=
none
dist/converse-headless.min.js
:
transpile src stamp-npm
$(RJS)
-o
src/build.js paths.converse
=
src/headless
include
=
converse
out
=
dist/converse-headless.min.js
dist/converse-esnext.js
:
src stamp-npm
$(RJS)
-o
src/build-esnext.js
include
=
converse
out
=
dist/converse-esnext.js
optimize
=
none
dist/converse-esnext.min.js
:
src stamp-npm
$(RJS)
-o
src/build-esnext.js
include
=
converse
out
=
dist/converse-esnext.min.js
dist/converse-no-dependencies.js
:
transpile src stamp-npm
$(RJS)
-o
src/build-no-dependencies.js
optimize
=
none
out
=
dist/converse-no-dependencies.js
dist/converse-no-dependencies.min.js
:
transpile src stamp-npm
$(RJS)
-o
src/build-no-dependencies.js
out
=
dist/converse-no-dependencies.min.js
./node_modules/.bin/npx webpack
--mode
=
production
.PHONY
:
dist
dist
::
build
...
...
dist/converse.js
View file @
bc872ee2
This diff is collapsed.
Click to expand it.
spec/chatbox.js
View file @
bc872ee2
...
...
@@ -427,9 +427,9 @@
var
view
=
_converse
.
chatboxviews
.
get
(
contact_jid
);
expect
(
chatbox
).
toBeDefined
();
expect
(
view
).
toBeDefined
();
var
$toolbar
=
$
(
view
.
el
).
find
(
'
ul.chat-toolbar
'
);
expect
(
$toolbar
.
length
).
toBe
(
1
);
expect
(
$toolbar
.
children
(
'
li
'
).
length
).
toBe
(
2
);
var
toolbar
=
view
.
el
.
querySelector
(
'
ul.chat-toolbar
'
);
expect
(
_
.
isElement
(
toolbar
)).
toBe
(
true
);
expect
(
toolbar
.
querySelectorAll
(
'
:scope > li
'
).
length
).
toBe
(
1
);
done
();
}));
...
...
@@ -494,39 +494,6 @@
}).
catch
(
_
.
partial
(
_converse
.
log
,
_
,
Strophe
.
LogLevel
.
FATAL
));
}));
it
(
"
contains a button for starting an encrypted chat session
"
,
mock
.
initConverseWithPromises
(
null
,
[
'
rosterGroupsFetched
'
],
{},
function
(
done
,
_converse
)
{
var
timeout
=
true
,
$toolbar
,
view
;
test_utils
.
createContacts
(
_converse
,
'
current
'
);
test_utils
.
openControlBox
();
test_utils
.
waitUntil
(
function
()
{
return
$
(
_converse
.
rosterview
.
el
).
find
(
'
.roster-group
'
).
length
;
},
300
).
then
(
function
()
{
// TODO: More tests can be added here...
var
contact_jid
=
mock
.
cur_names
[
2
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
test_utils
.
openChatBoxFor
(
_converse
,
contact_jid
);
view
=
_converse
.
chatboxviews
.
get
(
contact_jid
);
$toolbar
=
$
(
view
.
el
).
find
(
'
ul.chat-toolbar
'
);
expect
(
$toolbar
.
find
(
'
.toggle-otr
'
).
length
).
toBe
(
1
);
// Register spies
spyOn
(
view
,
'
toggleOTRMenu
'
).
and
.
callThrough
();
view
.
delegateEvents
();
// We need to rebind all events otherwise our spy won't be called
timeout
=
false
;
$toolbar
[
0
].
querySelector
(
'
.toggle-otr
'
).
click
();
return
test_utils
.
waitUntil
(
function
()
{
return
view
.
el
.
querySelector
(
'
.otr-menu
'
).
offsetHeight
;
},
300
)
}).
then
(
function
()
{
expect
(
view
.
toggleOTRMenu
).
toHaveBeenCalled
();
done
();
});
}));
it
(
"
can contain a button for starting a call
"
,
mock
.
initConverseWithPromises
(
null
,
[
'
rosterGroupsFetched
'
],
{},
...
...
spec/http-file-upload.js
View file @
bc872ee2
...
...
@@ -365,6 +365,7 @@
}).
then
(
function
()
{
// Check that the image renders
expect
(
view
.
el
.
querySelector
(
'
.chat-msg .chat-msg-media
'
).
innerHTML
.
trim
()).
toEqual
(
'
<!-- src/templates/image.html -->
\n
'
+
'
<a href="http://localhost:8000/logo/conversejs-filled.svg" target="_blank" rel="noopener">
'
+
'
<img class="chat-image img-thumbnail" src="http://localhost:8000/logo/conversejs-filled.svg">
'
+
'
</a>
'
);
...
...
@@ -472,6 +473,7 @@
}).
then
(
function
()
{
// Check that the image renders
expect
(
view
.
el
.
querySelector
(
'
.chat-msg .chat-msg-media
'
).
innerHTML
.
trim
()).
toEqual
(
'
<!-- src/templates/image.html -->
\n
'
+
'
<a href="http://localhost:8000/logo/conversejs-filled.svg" target="_blank" rel="noopener">
'
+
'
<img class="chat-image img-thumbnail" src="http://localhost:8000/logo/conversejs-filled.svg"></a>
'
)
XMLHttpRequest
.
prototype
.
send
=
send_backup
;
...
...
spec/messages.js
View file @
bc872ee2
...
...
@@ -1087,6 +1087,7 @@
expect
(
view
.
model
.
sendMessage
).
toHaveBeenCalled
();
var
msg
=
$
(
view
.
el
).
find
(
'
.chat-content .chat-msg
'
).
last
().
find
(
'
.chat-msg-text
'
);
expect
(
msg
.
html
().
trim
()).
toEqual
(
'
<!-- src/templates/image.html -->
\n
'
+
'
<a href="
'
+
base_url
+
'
/logo/conversejs-filled.svg" target="_blank" rel="noopener"><img class="chat-image img-thumbnail"
'
+
'
src="
'
+
message
+
'
"></a>
'
);
message
+=
"
?param1=val1¶m2=val2
"
;
...
...
@@ -1098,6 +1099,7 @@
expect
(
view
.
model
.
sendMessage
).
toHaveBeenCalled
();
var
msg
=
$
(
view
.
el
).
find
(
'
.chat-content
'
).
find
(
'
.chat-msg
'
).
last
().
find
(
'
.chat-msg-text
'
);
expect
(
msg
.
html
().
trim
()).
toEqual
(
'
<!-- src/templates/image.html -->
\n
'
+
'
<a href="
'
+
base_url
+
'
/logo/conversejs-filled.svg?param1=val1&param2=val2" target="_blank" rel="noopener"><img
'
+
'
class="chat-image img-thumbnail" src="
'
+
message
.
replace
(
/&/g
,
'
&
'
)
+
'
"></a>
'
)
...
...
@@ -1340,6 +1342,7 @@
expect
(
msg
.
outerHTML
).
toEqual
(
'
<span class="chat-msg-text">Have you heard this funny audio?</span>
'
);
var
media
=
view
.
el
.
querySelector
(
'
.chat-msg .chat-msg-media
'
);
expect
(
media
.
innerHTML
.
replace
(
/
(\r\n
|
\n
|
\r)
/gm
,
""
)).
toEqual
(
'
<!-- src/templates/audio.html -->
'
+
'
<audio controls=""><source src="http://localhost/audio.mp3" type="audio/mpeg"></audio>
'
+
'
<a target="_blank" rel="noopener" href="http://localhost/audio.mp3">Download audio file</a>
'
);
...
...
@@ -1357,6 +1360,7 @@
expect
(
msg
.
innerHTML
).
toEqual
(
''
);
media
=
view
.
el
.
querySelector
(
'
.chat-msg:last-child .chat-msg-media
'
);
expect
(
media
.
innerHTML
.
replace
(
/
(\r\n
|
\n
|
\r)
/gm
,
""
)).
toEqual
(
'
<!-- src/templates/audio.html -->
'
+
'
<audio controls=""><source src="http://localhost/audio.mp3" type="audio/mpeg"></audio>
'
+
'
<a target="_blank" rel="noopener" href="http://localhost/audio.mp3">Download audio file</a>
'
);
done
();
...
...
@@ -1390,6 +1394,7 @@
expect
(
msg
.
outerHTML
).
toEqual
(
'
<span class="chat-msg-text">Have you seen this funny video?</span>
'
);
var
media
=
view
.
el
.
querySelector
(
'
.chat-msg .chat-msg-media
'
);
expect
(
media
.
innerHTML
.
replace
(
/
(\r\n
|
\n
|
\r)
/gm
,
""
)).
toEqual
(
'
<!-- src/templates/video.html -->
'
+
'
<video controls=""><source src="http://localhost/video.mp4" type="video/mp4"></video>
'
+
'
<a target="_blank" rel="noopener" href="http://localhost/video.mp4">Download video file</a>
'
);
...
...
@@ -1407,6 +1412,7 @@
expect
(
msg
.
innerHTML
).
toEqual
(
''
);
media
=
view
.
el
.
querySelector
(
'
.chat-msg:last-child .chat-msg-media
'
);
expect
(
media
.
innerHTML
.
replace
(
/
(\r\n
|
\n
|
\r)
/gm
,
""
)).
toEqual
(
'
<!-- src/templates/video.html -->
'
+
'
<video controls=""><source src="http://localhost/video.mp4" type="video/mp4"></video>
'
+
'
<a target="_blank" rel="noopener" href="http://localhost/video.mp4">Download video file</a>
'
);
done
();
...
...
@@ -1440,6 +1446,7 @@
expect
(
msg
.
outerHTML
).
toEqual
(
'
<span class="chat-msg-text">Have you downloaded this funny file?</span>
'
);
var
media
=
view
.
el
.
querySelector
(
'
.chat-msg .chat-msg-media
'
);
expect
(
media
.
innerHTML
.
replace
(
/
(\r\n
|
\n
|
\r)
/gm
,
""
)).
toEqual
(
'
<!-- src/templates/file.html -->
'
+
'
<a target="_blank" rel="noopener" href="http://localhost/funny.pdf">Download: "funny.pdf</a>
'
);
done
();
});
...
...
@@ -1474,6 +1481,7 @@
expect
(
msg
.
outerHTML
).
toEqual
(
'
<span class="chat-msg-text">Have you seen this funny image?</span>
'
);
var
media
=
view
.
el
.
querySelector
(
'
.chat-msg .chat-msg-media
'
);
expect
(
media
.
innerHTML
.
replace
(
/
(\r\n
|
\n
|
\r)
/gm
,
""
)).
toEqual
(
'
<!-- src/templates/image.html -->
'
+
'
<a href="http://localhost:8000/logo/conversejs-filled.svg" target="_blank" rel="noopener">
'
+
'
<img class="chat-image img-thumbnail" src="http://localhost:8000/logo/conversejs-filled.svg">
'
+
'
</a>
'
);
...
...
spec/otr.js
View file @
bc872ee2
...
...
@@ -6,67 +6,103 @@
var
$pres
=
converse
.
env
.
$pres
;
var
_
=
converse
.
env
.
_
;
describe
(
"
A chatbox
with an active OTR session
"
,
function
()
{
it
(
"
will not show the spoiler toolbar butt
on
"
,
describe
(
"
A chatbox
"
,
function
()
{
it
(
"
contains a button for starting an encrypted chat sessi
on
"
,
mock
.
initConverseWithPromises
(
null
,
[
'
rosterGroupsFetched
'
],
{},
function
(
done
,
_converse
)
{
var
timeout
=
true
,
$toolbar
,
view
;
test_utils
.
createContacts
(
_converse
,
'
current
'
);
var
contact_jid
=
mock
.
cur_names
[
0
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
// XXX: We need to send a presence from the contact, so that we
// have a resource, that resource is then queried to see
// whether Strophe.NS.SPOILER is supported, in which case
// the spoiler button will appear.
var
presence
=
$pres
({
'
from
'
:
contact_jid
+
'
/phone
'
,
'
to
'
:
'
dummy@localhost
'
test_utils
.
openControlBox
();
test_utils
.
waitUntil
(
function
()
{
return
$
(
_converse
.
rosterview
.
el
).
find
(
'
.roster-group
'
).
length
;
},
300
).
then
(
function
()
{
// TODO: More tests can be added here...
var
contact_jid
=
mock
.
cur_names
[
2
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
test_utils
.
openChatBoxFor
(
_converse
,
contact_jid
);
view
=
_converse
.
chatboxviews
.
get
(
contact_jid
);
$toolbar
=
$
(
view
.
el
).
find
(
'
ul.chat-toolbar
'
);
expect
(
$toolbar
.
find
(
'
.toggle-otr
'
).
length
).
toBe
(
1
);
// Register spies
spyOn
(
view
,
'
toggleOTRMenu
'
).
and
.
callThrough
();
view
.
delegateEvents
();
// We need to rebind all events otherwise our spy won't be called
timeout
=
false
;
$toolbar
[
0
].
querySelector
(
'
.toggle-otr
'
).
click
();
return
test_utils
.
waitUntil
(
function
()
{
return
view
.
el
.
querySelector
(
'
.otr-menu
'
).
offsetHeight
;
},
300
)
}).
then
(
function
()
{
expect
(
view
.
toggleOTRMenu
).
toHaveBeenCalled
();
done
();
});
_converse
.
connection
.
_dataRecv
(
test_utils
.
createRequest
(
presence
));
test_utils
.
openChatBoxFor
(
_converse
,
contact_jid
);
}));
test_utils
.
waitUntilDiscoConfirmed
(
_converse
,
contact_jid
+
'
/phone
'
,
[],
[
Strophe
.
NS
.
SPOILER
]).
then
(
function
()
{
var
spoiler_toggle
;
var
view
=
_converse
.
chatboxviews
.
get
(
contact_jid
);
spyOn
(
view
,
'
addSpoilerButton
'
).
and
.
callThrough
();
view
.
model
.
set
(
'
otr_status
'
,
1
);
describe
(
"
with an active OTR session
"
,
function
()
{
test_utils
.
waitUntil
(
function
()
{
return
_
.
isNull
(
view
.
el
.
querySelector
(
'
.toggle-compose-spoiler
'
));
}).
then
(
function
()
{
spoiler_toggle
=
view
.
el
.
querySelector
(
'
.toggle-compose-spoiler
'
);
expect
(
spoiler_toggle
).
toBe
(
null
);
it
(
"
will not show the spoiler toolbar button
"
,
mock
.
initConverseWithPromises
(
null
,
[
'
rosterGroupsFetched
'
],
{},
function
(
done
,
_converse
)
{
view
.
model
.
set
(
'
otr_status
'
,
3
);
test_utils
.
createContacts
(
_converse
,
'
current
'
);
var
contact_jid
=
mock
.
cur_names
[
0
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
// XXX: We need to send a presence from the contact, so that we
// have a resource, that resource is then queried to see
// whether Strophe.NS.SPOILER is supported, in which case
// the spoiler button will appear.
var
presence
=
$pres
({
'
from
'
:
contact_jid
+
'
/phone
'
,
'
to
'
:
'
dummy@localhost
'
});
_converse
.
connection
.
_dataRecv
(
test_utils
.
createRequest
(
presence
));
test_utils
.
openChatBoxFor
(
_converse
,
contact_jid
);
return
test_utils
.
waitUntil
(
function
()
{
return
!
_
.
isNull
(
view
.
el
.
querySelector
(
'
.toggle-compose-spoiler
'
));
});
}).
then
(
function
()
{
spoiler_toggle
=
view
.
el
.
querySelector
(
'
.toggle-compose-spoiler
'
);
expect
(
spoiler_toggle
).
not
.
toBe
(
null
);
test_utils
.
waitUntilDiscoConfirmed
(
_converse
,
contact_jid
+
'
/phone
'
,
[],
[
Strophe
.
NS
.
SPOILER
]).
then
(
function
()
{
var
spoiler_toggle
;
var
view
=
_converse
.
chatboxviews
.
get
(
contact_jid
);
spyOn
(
view
,
'
addSpoilerButton
'
).
and
.
callThrough
();
view
.
model
.
set
(
'
otr_status
'
,
1
);
view
.
model
.
set
(
'
otr_status
'
,
2
);
return
test_utils
.
waitUntil
(
function
()
{
test_utils
.
waitUntil
(
function
()
{
return
_
.
isNull
(
view
.
el
.
querySelector
(
'
.toggle-compose-spoiler
'
));
}).
then
(
function
()
{
spoiler_toggle
=
view
.
el
.
querySelector
(
'
.toggle-compose-spoiler
'
);
expect
(
spoiler_toggle
).
toBe
(
null
);
view
.
model
.
set
(
'
otr_status
'
,
3
);
return
test_utils
.
waitUntil
(
function
()
{
return
!
_
.
isNull
(
view
.
el
.
querySelector
(
'
.toggle-compose-spoiler
'
));
});
}).
then
(
function
()
{
spoiler_toggle
=
view
.
el
.
querySelector
(
'
.toggle-compose-spoiler
'
);
expect
(
spoiler_toggle
).
not
.
toBe
(
null
);
view
.
model
.
set
(
'
otr_status
'
,
2
);
return
test_utils
.
waitUntil
(
function
()
{
return
_
.
isNull
(
view
.
el
.
querySelector
(
'
.toggle-compose-spoiler
'
));
});
}).
then
(
function
()
{
spoiler_toggle
=
view
.
el
.
querySelector
(
'
.toggle-compose-spoiler
'
);
expect
(
spoiler_toggle
).
toBe
(
null
);
view
.
model
.
set
(
'
otr_status
'
,
4
);
return
test_utils
.
waitUntil
(
function
()
{
return
!
_
.
isNull
(
view
.
el
.
querySelector
(
'
.toggle-compose-spoiler
'
));
});
}).
then
(
function
()
{
spoiler_toggle
=
view
.
el
.
querySelector
(
'
.toggle-compose-spoiler
'
);
expect
(
spoiler_toggle
).
not
.
toBe
(
null
);
done
();
});
}).
then
(
function
()
{
spoiler_toggle
=
view
.
el
.
querySelector
(
'
.toggle-compose-spoiler
'
);
expect
(
spoiler_toggle
).
toBe
(
null
);
view
.
model
.
set
(
'
otr_status
'
,
4
);
return
test_utils
.
waitUntil
(
function
()
{
return
!
_
.
isNull
(
view
.
el
.
querySelector
(
'
.toggle-compose-spoiler
'
));
});
}).
then
(
function
()
{
spoiler_toggle
=
view
.
el
.
querySelector
(
'
.toggle-compose-spoiler
'
);
expect
(
spoiler_toggle
).
not
.
toBe
(
null
);
done
();
});
});
})
)
;
})
)
;
});
});
describe
(
"
The OTR module
"
,
function
()
{
...
...
spec/register.js
View file @
bc872ee2
...
...
@@ -264,10 +264,24 @@
registerview
.
el
.
querySelector
(
'
input[type=submit]
'
).
click
();
expect
(
_converse
.
connection
.
send
).
toHaveBeenCalled
();
var
$stanza
=
$
(
_converse
.
connection
.
send
.
calls
.
argsFor
(
0
)[
0
].
tree
());
expect
(
$stanza
.
children
(
'
query
'
).
children
().
length
).
toBe
(
1
);
expect
(
$stanza
.
children
(
'
query
'
).
children
().
children
().
length
).
toBe
(
3
);
expect
(
$stanza
.
children
(
'
query
'
).
children
().
children
()[
0
].
tagName
).
toBe
(
'
field
'
);
stanza
=
_converse
.
connection
.
send
.
calls
.
argsFor
(
0
)[
0
].
tree
();
expect
(
stanza
.
outerHTML
.
trim
().
replace
(
/
(\n
|
\s{2,})
/g
,
''
)).
toEqual
(
'
<iq type="set" id="
'
+
stanza
.
getAttribute
(
'
id
'
)
+
'
" xmlns="jabber:client">
'
+
'
<query xmlns="jabber:iq:register">
'
+
'
<x xmlns="jabber:x:data" type="submit">
'
+
'
<field xmlns="http://www.w3.org/1999/xhtml" var="username">
'
+
'
<value>testusername</value>
'
+
'
</field>
'
+
'
<field xmlns="http://www.w3.org/1999/xhtml" var="password">
'
+
'
<value>testpassword</value>
'
+
'
</field>
'
+
'
<field xmlns="http://www.w3.org/1999/xhtml" var="email">
'
+
'
<value>test@email.local</value>
'
+
'
</field>
'
+
'
</x>
'
+
'
</query>
'
+
'
</iq>
'
);
done
();
});
}));
...
...
src/converse-chatview.js
View file @
bc872ee2
...
...
@@ -658,7 +658,7 @@
tpl_help_message
({
'
isodate
'
:
moment
().
format
(),
'
type
'
:
type
,
'
message
'
:
filterXSS
(
msg
,
{
'
whiteList
'
:
{
'
strong
'
:
[]}})
'
message
'
:
xss
.
filterXSS
(
msg
,
{
'
whiteList
'
:
{
'
strong
'
:
[]}})
})
);
});
...
...
src/converse-muc-views.js
View file @
bc872ee2
...
...
@@ -365,7 +365,7 @@
'
open_title
'
:
__
(
'
Click to open this room
'
),
'
info_title
'
:
__
(
'
Show more information on this room
'
)
});
return
div
.
firstChild
;
return
div
.
first
Element
Child
;
},
removeSpinner
()
{
...
...
src/converse-notification.js
View file @
bc872ee2
...
...
@@ -31,7 +31,7 @@
// ^ a list of JIDs to ignore concerning chat state notifications
play_sounds
:
true
,
sounds_path
:
'
/sounds/
'
,
notification_icon
:
'
/logo/conversejs
128.pn
g
'
notification_icon
:
'
/logo/conversejs
-filled.sv
g
'
});
_converse
.
isOnlyChatStateNotification
=
(
msg
)
=>
...
...
src/templates/alert_modal.html
View file @
bc872ee2
...
...
@@ -7,7 +7,7 @@
<span
aria-hidden=
"true"
>
×
</span>
</button>
</div>
<div
class=
"modal-body"
>
{[o.messages.
e
ach(function (message) { ]}
<div
class=
"modal-body"
>
{[o.messages.
forE
ach(function (message) { ]}
<p>
{{{message}}}
</p>
{[ }) ]}
</div>
...
...
src/templates/field.html
View file @
bc872ee2
<field
var=
"{{{o.name}}}"
>
{[ if (
_.isArray(o.value)
) { ]}
{[ if (
o.value.constructor === Array
) { ]}
{[ o.value.forEach(function (arrayValue) { ]}
<value>
{{{arrayValue}}}
</value>
{[ }); ]}
{[ } else { ]}
<value>
{{{o.value}}}
</value>
...
...
src/utils/core.js
View file @
bc872ee2
...
...
@@ -565,7 +565,7 @@
*/
var
div
=
document
.
createElement
(
'
div
'
);
div
.
innerHTML
=
s
;
return
div
.
firstChild
;
return
div
.
first
Element
Child
;
};
u
.
getOuterWidth
=
function
(
el
,
include_margin
=
false
)
{
...
...
src/utils/form.js
View file @
bc872ee2
...
...
@@ -67,8 +67,8 @@
}
return
u
.
stringToNode
(
tpl_field
({
name
:
field
.
getAttribute
(
'
name
'
),
value
:
value
'
name
'
:
field
.
getAttribute
(
'
name
'
),
'
value
'
:
value
})
);
};
...
...
tests/runner.js
View file @
bc872ee2
...
...
@@ -193,7 +193,7 @@ var specs = [
"
spec/ping
"
,
"
spec/xmppstatus
"
,
"
spec/mam
"
,
"
spec/otr
"
,
//
"spec/otr",
"
spec/controlbox
"
,
"
spec/roster
"
,
"
spec/chatbox
"
,
...
...
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