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
5836e9d8
Commit
5836e9d8
authored
Oct 05, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Formatting
parent
d426d797
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
30 deletions
+19
-30
src/converse-bookmarks.js
src/converse-bookmarks.js
+13
-21
src/converse-muc-views.js
src/converse-muc-views.js
+6
-9
No files found.
src/converse-bookmarks.js
View file @
5836e9d8
...
...
@@ -138,33 +138,25 @@
{
__
}
=
_converse
,
body
=
this
.
el
.
querySelector
(
'
.chatroom-body
'
);
_
.
each
(
body
.
children
,
function
(
child
)
{
child
.
classList
.
add
(
'
hidden
'
);
});
// Remove any existing forms
_
.
each
(
body
.
children
,
child
=>
child
.
classList
.
add
(
'
hidden
'
));
_
.
each
(
body
.
querySelectorAll
(
'
.chatroom-form-container
'
),
u
.
removeElement
);
body
.
insertAdjacentHTML
(
'
beforeend
'
,
tpl_chatroom_bookmark_form
({
heading
:
__
(
'
Bookmark this groupchat
'
),
label_name
:
__
(
'
The name for this bookmark:
'
),
label_autojoin
:
__
(
'
Would you like this groupchat to be automatically joined upon startup?
'
),
label_nick
:
__
(
'
What should your nickname for this groupchat be?
'
),
default_nick
:
this
.
model
.
get
(
'
nick
'
),
label_submit
:
__
(
'
Save
'
),
label_cancel
:
__
(
'
Cancel
'
)
'
default_nick
'
:
this
.
model
.
get
(
'
nick
'
),
'
heading
'
:
__
(
'
Bookmark this groupchat
'
),
'
label_autojoin
'
:
__
(
'
Would you like this groupchat to be automatically joined upon startup?
'
),
'
label_cancel
'
:
__
(
'
Cancel
'
),
'
label_name
'
:
__
(
'
The name for this bookmark:
'
),
'
label_nick
'
:
__
(
'
What should your nickname for this groupchat be?
'
),
'
label_submit
'
:
__
(
'
Save
'
),
'
name
'
:
this
.
model
.
get
(
'
name
'
)
})
);
const
form
=
body
.
querySelector
(
'
form.chatroom-form
'
);
form
.
addEventListener
(
'
submit
'
,
this
.
onBookmarkFormSubmitted
.
bind
(
this
)
);
form
.
querySelector
(
'
.button-cancel
'
).
addEventListener
(
'
click
'
,
this
.
closeForm
.
bind
(
this
)
);
form
.
addEventListener
(
'
submit
'
,
ev
=>
this
.
onBookmarkFormSubmitted
(
ev
));
form
.
querySelector
(
'
.button-cancel
'
).
addEventListener
(
'
click
'
,
()
=>
this
.
closeForm
());
},
onBookmarkFormSubmitted
(
ev
)
{
...
...
src/converse-muc-views.js
View file @
5836e9d8
...
...
@@ -343,10 +343,7 @@
},
roomStanzaItemToHTMLElement
(
groupchat
)
{
const
name
=
Strophe
.
unescapeNode
(
groupchat
.
getAttribute
(
'
name
'
)
||
groupchat
.
getAttribute
(
'
jid
'
)
);
const
name
=
Strophe
.
unescapeNode
(
groupchat
.
getAttribute
(
'
name
'
)
||
groupchat
.
getAttribute
(
'
jid
'
));
const
div
=
document
.
createElement
(
'
div
'
);
div
.
innerHTML
=
tpl_room_item
({
'
name
'
:
Strophe
.
xmlunescape
(
name
),
...
...
@@ -1309,14 +1306,14 @@
container_el
.
insertAdjacentHTML
(
'
beforeend
'
,
tpl_chatroom_password_form
({
heading
:
__
(
'
This groupchat requires a password
'
),
label_password
:
__
(
'
Password:
'
),
label_submit
:
__
(
'
Submit
'
)
'
heading
'
:
__
(
'
This groupchat requires a password
'
),
'
label_password
'
:
__
(
'
Password:
'
),
'
label_submit
'
:
__
(
'
Submit
'
)
}));
this
.
model
.
save
(
'
connection_status
'
,
converse
.
ROOMSTATUS
.
PASSWORD_REQUIRED
);
this
.
el
.
querySelector
(
'
.chatroom-form
'
)
.
addEventListener
(
'
submit
'
,
this
.
submitPassword
.
bind
(
this
),
false
);
this
.
el
.
querySelector
(
'
.chatroom-form
'
)
.
addEventListener
(
'
submit
'
,
ev
=>
this
.
submitPassword
(
ev
),
false
);
},
showDisconnectMessages
(
msgs
)
{
...
...
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