Commit Graph

72 Commits

Author SHA1 Message Date
JC Brand
9fc61d9302 Bugfix. Endless spinner when trying to log in
after rendering the registration form.
2017-03-31 01:54:42 +00:00
JC Brand
27a0560ad3 Consistently use . Fixes failing test 2017-03-03 15:25:05 +01:00
JC Brand
eb82d64426 converse-controlbox: Retain open state after logging in. 2017-03-03 14:43:13 +01:00
JC Brand
9817aedea7 No need to set templates on the _converse object.
If it's needed in another plugin, it can simply be `require`'d.
2017-02-19 11:12:26 +01:00
JC Brand
073a95b7e6 Avoid visibility transience and fix failing test 2017-02-15 07:46:24 +00:00
JC Brand
fbdbea223d Ensure consistent behavior from show_controlbox_by_default 2017-02-14 17:23:22 +00:00
JC Brand
fe6a9ca748 Merge converse-api and converse-core
Otherwise `require('converse-core')` can be called, exposing the inner converse
object.
2017-02-14 14:35:52 +00:00
JC Brand
f73a1d3fc0 Don't name the modules.
According to the require.js docs this shouldn't be done.
http://requirejs.org/docs/whyamd.html#namedmodules
2017-02-13 14:37:17 +00:00
JC Brand
bfd3e7f0b6 Bugfix. Show custom status, not chat status. 2017-02-13 12:00:46 +00:00
JC Brand
63888dd454 Fix failing tests 2017-02-02 21:55:05 +00:00
JC Brand
0424df9edc Rename the closured converse object to _converse
to indicate that it's private and to differentiate it from the outer "global"
converse object.
2017-02-02 20:43:48 +00:00
JC Brand
9b48b2d6bd Update plugins to not depend on converse-core
To illustrate that this is not necessary (and also not possible with
non-bundled plugins).
2017-02-02 18:34:13 +00:00
JC Brand
b701c4830f Also use _converse as pluggable object reference. 2017-02-02 18:34:13 +00:00
JC Brand
b7b9711296 Rename the closured converse object to _converse
to indicate that it's private and to differentiate it from the outer "global"
converse object.
2017-02-02 18:34:13 +00:00
JC Brand
081f075aa9 Add eslint with lodash checking and apply its suggestions 2017-02-01 14:02:18 +01:00
JC Brand
0cf9903726 Fix failing tests. 2017-02-01 10:49:13 +00:00
JC Brand
af42bc0696 Only close controlbox when logging out
Not when the connection failed due to other reasons (like wrong credentials).
2017-02-01 10:49:12 +00:00
JC Brand
e179811181 converse-controlbox: Fix empty controlbox toggle after disconnect
- Remove apparently unused `giveFeedback` method on ControlBoxView
- Don't show old connection feedback when rendering a new login form.
  Now also no need to explicitly remove feedback after disconnection.
2016-12-04 16:37:07 +00:00
JC Brand
be25c688ff converse-controlbox: Use event listeners instead of (removed) overrides
Due to changes in `converse-core` the controlbox wasn't aware anymore of
disconnection or reconnection events.
2016-12-04 15:07:46 +00:00
JC Brand
a5f76abcf1 Updates #729. Minimized chat boxes don't stay hidden
Bug got introduced during fix for #677

Eventually had to do a significant refactoring, to more consistently use the
`hidden` class instead of `display: None`. (relevant for #695)
2016-11-22 17:42:58 +01:00
JC Brand
0c2c7be467 Close the controlbox when logging out...
and don't show the online count in the toggle.
2016-11-03 13:59:05 +00:00
JC Brand
5610d759c8 Call removeAll on rosterview when tearing down.
Otherwise RosterContactView objects stay around and keep on listening.
2016-11-03 13:59:05 +00:00
JC Brand
d3090f80bc Remember which panel was open when reloading the page. 2016-11-02 22:08:20 +00:00
JC Brand
38db959e11 Reconnection fixes. Fixes #712
- Remove groupviews, so that they'll get recreated upon reconnection
- Don't call `clearSession` when reconnecting. We want to reuse the
  Backbone collections.
- Emit `rosterInitialized` event and use that in converse-rosterview.js
  (instead of overriding).
- Refactor `onReconnected` to emit `rosterReadyAfterReconnection`, call
  `converse.populateRoster()` and `converse.chatboxes.onConnected()`.
- Recreate the roster view on the `rosterReadyAfterReconnection` event.
2016-11-02 13:13:49 +00:00
JC Brand
e3d59afd80 Use converse instead of this, or that instead of bind 2016-11-02 12:46:29 +00:00
JC Brand
90d1071df0 Load templates in the respective plugins 2016-09-23 12:35:01 +02:00
JC Brand
d8d1c283a7 Let the RosterView render and populate itself
instead of having the ControlBoxView do it. This provides for cleaner
separation between the two plugins.
2016-09-21 11:48:43 +02:00
JC Brand
7030495275 Refactor the rosterview.fetch method
So that we can also fetch the roster also without the controlbox and rosterview.
2016-09-20 17:38:01 +02:00
JC Brand
713922a9e1 Update to Strophe 1.2.8 and add support for SASL-EXTERNAL auth 2016-09-16 13:06:52 +02:00
JC Brand
89e5bd7c54 Update to pluggable.js 0.0.2 2016-08-31 10:39:11 +00:00
JC Brand
3c9b5bd7a0 More work on session management.
When it's not possible to reconnect due to password no longer being cached,
render the login form.

Fixed a bug whereby after one failed reconnection event, reconnection becomes
impossible (due to 'connection' state of the controlbox).
2016-08-23 18:14:09 +00:00
JC Brand
f5b182c365 Set connected back to true after reconnect. 2016-08-23 13:25:34 +00:00
JC Brand
4a2048baae Found a better way to ensure roster is fetched after reconnecting. 2016-08-23 08:53:37 +00:00
JC Brand
59143c1c72 More work on auto-reconnecting and on maintaining sessions.
- Added the ability to reconnect to more disconnection causes.
- Make sure the roster is fetched again when reconnecting.
2016-08-19 12:16:55 +00:00
JC Brand
9e8674ef55 Rename ChatBoxView.insertIntoPage to ChatBoxView.insertIntoDOM
to ensure naming consistency, we have the same method on `ChatRoomView`.
2016-06-22 15:54:22 +02:00
JC Brand
081d377881 Move code from plugins to core.
Move init of RosterGroups collection and presenceHandler registration out of
the controlbox and rosterview plugins and into core, since this code is
generally useful (indeed necessary) even without those plugins.
2016-06-22 10:25:01 +00:00
JC Brand
7f753040de Move roster-related models/collections to core 2016-06-21 17:36:40 +00:00
JC Brand
2c6f6bfef2 Merge branch 'soft-dependencie' 2016-06-13 07:45:15 +00:00
amanzur
45a3e643a8 online users count issue-656 (#657)
* online users count issue-656

* change log entry added for issue 656
2016-06-10 16:27:28 +02:00
JC Brand
62c170273e Allow plugins to have optional dependencies.
This change refactors out the plugin code from converse-core into
src/converse-puggable.js

Additionally, plugins now have an optional attribute `optional_dependencies`
which is an array of dependencies which are "nice-to-have" but not essential.

Work has also been done to ensure that a plugins' dependencies are first loaded
before the plugin itself.
2016-06-10 08:26:29 +00:00
JC Brand
0002c0bd53 converse._tearDown shouldn't be called from converse-controlbox.js 2016-05-31 10:24:22 +00:00
JC Brand
cb288341fb Bugfix. Login form doesn't render after logging out
when auto_reconnect = false
2016-05-24 09:03:41 +00:00
JC Brand
0564f0f592 Handle case were connection is not defined. 2016-04-13 10:09:47 +00:00
JC Brand
aee232421c Properly tear down when logging out or disconnecting.
Remove interval handler and the user activity handler.
Make sure the connection is reset when logging out.
Also removed the reconnectTimeout, instead debounce the reconnect method by 1 second.
2016-04-08 09:02:06 +00:00
JC Brand
f4c1e0916e Debounce so that it doesn't get called for each fetched contact 2016-04-07 10:42:35 +00:00
JC Brand
d0c13ea91c Small translation tweaks and then compiled i18n files 2016-04-07 10:42:27 +00:00
JC Brand
cd3cc412d9 Move updateOnlineCount to controlbox, where it belongs. 2016-04-06 13:14:38 +00:00
JC Brand
94693f2d02 Some refactoring to fix issues with how/when chat rooms are shown
- Don't call show in a room's initialize method (instead let the code be more
  similar to normal chats, in that it should listen to the "show" trigger).
- Rename chatBoxShouldBeShown to chatBoxMayBeShown
- Implement auto_join for rooms only once boxes have been fetched already.
2016-04-05 11:23:16 +00:00
JC Brand
8e0f8f0a6d Add the ability to filter contacts by chat state.
The roster filter is now also remembered across page loads.
2016-04-02 11:30:54 +00:00
JC Brand
885c553e2e Bugfix. Login panel wasn't being rendered after logging out 2016-04-02 03:43:04 +00:00