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
62c81771
Commit
62c81771
authored
Mar 02, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix.
After bookmarking a room for which a nickname is required, return to the nickname form.
parent
a5c0d5c4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
16 deletions
+27
-16
docs/CHANGES.md
docs/CHANGES.md
+2
-0
src/converse-bookmarks.js
src/converse-bookmarks.js
+1
-1
src/converse-muc.js
src/converse-muc.js
+24
-15
No files found.
docs/CHANGES.md
View file @
62c81771
...
...
@@ -16,6 +16,8 @@
*
Templates are no longer stored as attributes on the
`_converse`
object.
If you need a particular template, use
`require`
to load it.
-
Bugfix. After bookmarking a room for which a nickname is required, return to
the nickname form. [jcbrand]
-
Show the chat states of room occupants. [jcbrand]
-
The no-jQuery build has been renamed from
`converse.nojquery.js`
to
`converse-no-jquery.js`
to fit the convention used for other build names.
...
...
src/converse-bookmarks.js
View file @
62c81771
...
...
@@ -158,7 +158,7 @@
this
.
$el
.
find
(
'
div.chatroom-form-container
'
).
hide
(
function
()
{
$
(
this
).
remove
();
that
.
$
(
'
.chatroom-body
'
).
children
().
removeClass
(
'
hidden
'
);
that
.
renderAfterTransition
(
);
});
},
...
...
src/converse-muc.js
View file @
62c81771
...
...
@@ -84,8 +84,9 @@
var
ROOMSTATUS
=
{
CONNECTED
:
0
,
CONNECTING
:
1
,
DISCONNECTED
:
2
,
ENTERED
:
3
NICKNAME_REQUIRED
:
2
,
DISCONNECTED
:
3
,
ENTERED
:
4
};
converse
.
plugins
.
add
(
'
converse-muc
'
,
{
...
...
@@ -1250,8 +1251,7 @@
this
.
$el
.
find
(
'
div.chatroom-form-container
'
).
hide
(
function
()
{
$
(
this
).
remove
();
that
.
$el
.
find
(
'
.chat-area
'
).
removeClass
(
'
hidden
'
);
that
.
$el
.
find
(
'
.occupants
'
).
removeClass
(
'
hidden
'
);
that
.
renderAfterTransition
();
});
return
deferred
.
promise
();
},
...
...
@@ -1305,8 +1305,7 @@
this
.
$el
.
find
(
'
div.chatroom-form-container
'
).
hide
(
function
()
{
$
(
this
).
remove
();
that
.
$el
.
find
(
'
.chat-area
'
).
removeClass
(
'
hidden
'
);
that
.
$el
.
find
(
'
.occupants
'
).
removeClass
(
'
hidden
'
);
that
.
renderAfterTransition
();
});
},
...
...
@@ -1535,6 +1534,7 @@
label_join
:
__
(
'
Enter room
'
),
validation_message
:
message
}));
this
.
model
.
save
(
'
connection_status
'
,
ROOMSTATUS
.
NICKNAME_REQUIRED
);
this
.
$
(
'
.chatroom-form
'
).
on
(
'
submit
'
,
this
.
submitNickname
.
bind
(
this
));
},
...
...
@@ -1768,20 +1768,29 @@
this
.
$el
.
find
(
'
.chatroom-body
'
).
prepend
(
'
<span class="spinner centered"/>
'
);
},
renderAfterTransition
:
function
()
{
/* Rerender the room after some kind of transition. For
* example after the spinner has been removed or after a
* form has been submitted and removed.
*/
if
(
this
.
model
.
get
(
'
connection_status
'
)
==
ROOMSTATUS
.
NICKNAME_REQUIRED
)
{
this
.
renderNicknameForm
();
}
else
{
this
.
$el
.
find
(
'
.chat-area
'
).
removeClass
(
'
hidden
'
);
this
.
$el
.
find
(
'
.occupants
'
).
removeClass
(
'
hidden
'
);
this
.
scrollDown
();
}
},
hideSpinner
:
function
()
{
/* Check if the spinner is being shown and if so, hide it.
* Also make sure then that the chat area and occupants
* list are both visible.
*/
var
that
=
this
;
var
$spinner
=
this
.
$el
.
find
(
'
.spinner
'
);
if
(
$spinner
.
length
)
{
$spinner
.
hide
(
function
()
{
$
(
this
).
remove
();
that
.
$el
.
find
(
'
.chat-area
'
).
removeClass
(
'
hidden
'
);
that
.
$el
.
find
(
'
.occupants
'
).
removeClass
(
'
hidden
'
);
that
.
scrollDown
();
});
var
spinner
=
this
.
el
.
querySelector
(
'
.spinner
'
);
if
(
!
_
.
isNull
(
spinner
))
{
spinner
.
parentNode
.
removeChild
(
spinner
);
this
.
renderAfterTransition
();
}
return
this
;
},
...
...
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