Commit Graph

94 Commits

Author SHA1 Message Date
JC Brand
e4d95eb794 Don't load lodash.fp in converse-core. It's not being used there. 2017-08-15 16:36:43 +02:00
JC Brand
bfeb297ffc Clarify usage of locked_domain.
Also, declare it in the controlbox plugin, not in core, where it's not used.
2017-08-15 10:23:57 +02:00
JC Brand
27931d3e37 controlbox: Add JID validation to the login form 2017-07-21 20:14:38 +02:00
JC Brand
631ac6108f controlbox: have only one dropdown menu open at one time. 2017-07-21 20:10:32 +02:00
JC Brand
6fea88fcc3 Add JID validation and error messages to the add contact form 2017-07-17 22:08:15 +02:00
JC Brand
6ef0536e31 Some work on using es6 promises 2017-07-10 21:14:48 +02:00
JC Brand
9a9eae3fcf Use esnext to auto-generate es2015 syntax 2017-07-10 17:46:22 +02:00
JC Brand
40e7ee1ae6 Initial stab at using ES2015
Mostly replaced ``var`` with ``let`` and ``const``.
Also added a few arrow functions.
2017-07-10 12:49:20 +02:00
JC Brand
f81a94baf1 Move updateSettings to the private API.
Also add an API method for exposing new promises.

Update the plugin and API documentation, specifically concerning the above
changes.
2017-07-05 11:03:13 +02:00
JC Brand
f09d01c930 roster: Move roster push and rosterX handlers to core.
There's nothing about them that's view specific.
2017-06-16 11:42:46 +02:00
JC Brand
be28e04c57 roster: render unread messages in tab upon reload
Also including css fixes around the unread messages indicator.
2017-06-15 18:38:38 +02:00
JC Brand
e48015df66 Fixes #575 2017-06-15 17:51:56 +02:00
JC Brand
d527f693c2 Updates #890 Destroy and recreate session upon reconnection
This ensures that carbons will be activated again.
2017-06-15 17:30:26 +02:00
JC Brand
3181956b61 controlbox: use `sticky_controlbox` setting to reduce inverse code 2017-06-15 15:01:34 +02:00
JC Brand
d1bafdb38a Re-render only the tab when num_unread changes. 2017-06-09 23:45:54 +02:00
JC Brand
b5ecc1fc6a Expose the fp version of lodash via the API 2017-06-07 09:15:22 +02:00
JC Brand
a128a70d41 Discriminate between which unread messages to indicate per tab 2017-06-07 00:55:57 +02:00
JC Brand
f897fbb7c0 Show number of unread mesages on the "Contacts" tab 2017-06-05 21:42:25 +02:00
JC Brand
bab80a3234 No need to set num_unread, it has a default value. 2017-05-23 18:15:28 +02:00
JC Brand
7c9475e9fc controlbox: Only render the contacts panel when connected
Otherwise it gets rendered multiple times (at least during testing).
2017-05-16 11:54:20 +02:00
JC Brand
b32a8c5391 Update and simplify HTML/CSS for choosing status
Should also fix some of the issues mentioned in #847
2017-05-08 21:25:22 +02:00
JC Brand
3ea43c6a0f Use noConflict to avoid polluting globale namespace
with lodash and Backbone.
2017-04-21 18:06:27 +02:00
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