Commit 67578c97 authored by JC Brand's avatar JC Brand

Merge branch 'master' into emoji

parents 5d99076f bd38f0d6
{
"presets": [
["env", {
"targets": {
"browsers": ["last 2 versions", "safari >= 10", "IE 11"]
}
}]
]
}
{
"parserOptions": {
"ecmaVersion": 6
},
"env": {
"browser": true,
"jasmine": true
......@@ -15,7 +18,7 @@
"lodash/prefer-lodash-method": [2, {
"ignoreMethods": [
"find", "endsWith", "startsWith", "filter", "reduce",
"map", "replace", "toLower", "split", "trim"
"map", "replace", "toLower", "split", "trim", "forEach"
]
}],
"lodash/prefer-startswith": "off",
......
......@@ -9,16 +9,23 @@
.svn/
.project
.pydevproject
.idea
.su?
analytics.js
inverse-analytics.js
.idea
# python/buildout
eggs
.Python
build
parts
*.pyc
*.egg-info
dev-jc.html
inverse-dev.html
inverse-dev-jc.html
converse-logs/*.html
# Ruby/Sass/Bundler
......@@ -30,7 +37,6 @@ bourbon
Backbone.Overview
tags
stamp-npm
stamp-bower
stamp-bundler
# Sphinx
......@@ -50,8 +56,5 @@ develop-eggs
.DS_Store
# Builds
dist/*
css/*.map
css/*.min.css
.sv?
/vendor/
# Changelog
## 3.1.0 (Unreleased)
## 3.2.0 (Unreleased)
- Add support for Emojis (uses <a href="https://www.emojione.com/">Emojione</a>).
- Support for [XMPP-0313 Message Archive Management](https://xmpp.org/extensions/xep-0313.html)
has been upgraded to version 2. [jcbrand]
- Add support for Emojis (either native, or via <a href="https://www.emojione.com/">Emojione</a>).
- Removed jQuery from `converse-core`, `converse-vcard` and `converse-roomslist`. [jcbrand]
- Remove `jquery.easing` from the full build. Was only being used by the
[conversejs.org](https://conversejs.org) website, which has been updated to not rely on it. [jcbrand]
- All promises are now native (or polyfilled) ES2015 Promises
instead of jQuery's Deferred. [jcbrand]
- #866 Add babel in order to support ES2015 syntax [jcbrand]
## 3.1.1 (2017-07-12)
- Use a patched version of [awesomplete](https://github.com/LeaVerou/awesomplete)
which doesn't render suggestions as HTML (possible XSS attack vector). [jcbrand]
More info here: https://github.com/LeaVerou/awesomplete/pull/17082
## 3.1.0 (2017-07-05)
### API changes
- Deprecate the `updateSettings` method in favour of
`_converse.settings.update`. [jcbrand]
- Add a new API method `_converse.promises.add` for exposing promises to be
used with `_converse.waitUntil`. [jcbrand]
- The `message` event now returns a data object with `stanza` and
`chatbox` attributes, instead of just the stanza. [jcbrand]
### New Plugins
- New non-core plugin `converse-singleton` which ensures that no more than
one chat is visible at any given time. Used in the mobile build:
`converse-mobile.js` and makes the unread messages counter possible there.
[jcbrand]
- New non-core plugin `converse-roomslist`, which shows a list of open rooms
in the `Rooms` tab of the control box. [jcbrand]
- Show unread messages for minimized chats. [jcbrand]
- New configuration setting for `converse-bookmarks`:
### New configuration settings
- New setting for `converse-bookmarks`:
[hide_open_bookmarks](https://conversejs.org/docs/html/configurations.html#hide-open-bookmarks)
It is meant to be set to `true` when using `converse-roomslist` so that open
rooms aren't listed twice (in the rooms list and the bookmarks list).
[jcbrand]
- API change: the `message` event now returns a data object with `stanza` and
`chatbox` attributes, instead of just the stanza. [jcbrand]
- Render nickname form when entering a room via invitation. [jcbrand]
### Github tickets resolved
- #567 Unreaded message count reset on page load [novokrest]
- #575 Logging out from converse.js doesn't clear the connection status from the
sessionStorage [jcbrand]
......@@ -31,6 +54,13 @@
- #890 Message carbons not sent out after reconnection [jcbrand]
- #894 Room affiliation lost when connection jid and room presence jid are of different case [Rayzen]
### Miscellaneous
- Support for [XMPP-0313 Message Archive Management](https://xmpp.org/extensions/xep-0313.html)
has been upgraded to version 2. [jcbrand]
- Show unread messages for minimized chats. [jcbrand]
- Render nickname form when entering a room via invitation. [jcbrand]
## 3.0.2 (2017-04-23)
*Dependency updates*:
......
/** Converse.js
*
* An XMPP chat client that runs in the browser.
*
* Version: 3.1.0
*
* Copyright: JC Brand 2012-2017
* Except for 3rd party dependencies.
* Please refer to the unminified version of this file for details.
*
* You can download it at: https://github.com/jcbrand/converse.js/releases
*/
# You can set these variables from the command line.
UGLIFYJS ?= node_modules/.bin/uglifyjs
BABEL ?= node_modules/.bin/babel
BOURBON_TEMPLATES = ./node_modules/bourbon/app/assets/stylesheets/
BUILDDIR = ./docs
......@@ -13,6 +14,7 @@ PO2JSON ?= ./node_modules/.bin/po2json
RJS ?= ./node_modules/.bin/r.js
SASS ?= ./.bundle/bin/sass
SPHINXBUILD ?= ./bin/sphinx-build
SED ?= sed
SPHINXOPTS =
# Internal variables.
......@@ -59,7 +61,7 @@ serve_bg: dev
########################################################################
## Translation machinery
GETTEXT = xgettext --keyword=__ --keyword=___ --from-code=UTF-8 --output=locale/converse.pot src/*.js --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=3.0.2 -c
GETTEXT = xgettext --keyword=__ --keyword=___ --from-code=UTF-8 --output=locale/converse.pot src/*.js --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=3.1.0 -c
.PHONY: pot
pot:
......@@ -78,16 +80,16 @@ po2json:
.PHONY: release
release:
sed -ri s/Version:\ [0-9]\+\.[0-9]\+\.[0-9]\+/Version:\ $(VERSION)/ src/start.frag
sed -ri s/Project-Id-Version:\ Converse\.js\ [0-9]\+\.[0-9]\+\.[0-9]\+/Project-Id-Version:\ Converse.js\ $(VERSION)/ locale/converse.pot
sed -ri s/\"version\":\ \"[0-9]\+\.[0-9]\+\.[0-9]\+\"/\"version\":\ \"$(VERSION)\"/ bower.json
sed -ri s/\"version\":\ \"[0-9]\+\.[0-9]\+\.[0-9]\+\"/\"version\":\ \"$(VERSION)\"/ package.json
sed -ri s/--package-version=[0-9]\+\.[0-9]\+\.[0-9]\+/--package-version=$(VERSION)/ Makefile
sed -ri s/v[0-9]\+\.[0-9]\+\.[0-9]\+\.zip/v$(VERSION)\.zip/ index.html
sed -ri s/v[0-9]\+\.[0-9]\+\.[0-9]\+\.tar\.gz/v$(VERSION)\.tar\.gz/ index.html
sed -ri s/version\ =\ \'[0-9]\+\.[0-9]\+\.[0-9]\+\'/version\ =\ \'$(VERSION)\'/ docs/source/conf.py
sed -ri s/release\ =\ \'[0-9]\+\.[0-9]\+\.[0-9]\+\'/release\ =\ \'$(VERSION)\'/ docs/source/conf.py
sed -ri "s/(Unreleased)/(`date +%Y-%m-%d`)/" docs/CHANGES.md
$(SED) -ri s/Version:\ [0-9]\+\.[0-9]\+\.[0-9]\+/Version:\ $(VERSION)/ src/start.frag
$(SED) -ri s/Project-Id-Version:\ Converse\.js\ [0-9]\+\.[0-9]\+\.[0-9]\+/Project-Id-Version:\ Converse.js\ $(VERSION)/ locale/converse.pot
$(SED) -ri s/\"version\":\ \"[0-9]\+\.[0-9]\+\.[0-9]\+\"/\"version\":\ \"$(VERSION)\"/ bower.json
$(SED) -ri s/\"version\":\ \"[0-9]\+\.[0-9]\+\.[0-9]\+\"/\"version\":\ \"$(VERSION)\"/ package.json
$(SED) -ri s/--package-version=[0-9]\+\.[0-9]\+\.[0-9]\+/--package-version=$(VERSION)/ Makefile
$(SED) -ri s/v[0-9]\+\.[0-9]\+\.[0-9]\+\.zip/v$(VERSION)\.zip/ index.html
$(SED) -ri s/v[0-9]\+\.[0-9]\+\.[0-9]\+\.tar\.gz/v$(VERSION)\.tar\.gz/ index.html
$(SED) -ri s/version\ =\ \'[0-9]\+\.[0-9]\+\.[0-9]\+\'/version\ =\ \'$(VERSION)\'/ docs/source/conf.py
$(SED) -ri s/release\ =\ \'[0-9]\+\.[0-9]\+\.[0-9]\+\'/release\ =\ \'$(VERSION)\'/ docs/source/conf.py
$(SED) -ri "s/(Unreleased)/`date +%Y-%m-%d`/" CHANGES.md
make pot
make po
make po2json
......@@ -146,49 +148,66 @@ css/mobile.min.css:: stamp-npm sass/*
.PHONY: watch
watch: stamp-bundler
$(SASS) --watch -I ./node_modules/bourbon/app/assets/stylesheets/ sass/converse.scss:css/converse.css sass/_muc_embedded.scss:css/converse-muc-embedded.css
$(SASS) --watch -I ./node_modules/bourbon/app/assets/stylesheets/ sass/converse/converse.scss:css/converse.css sass/_muc_embedded.scss:css/converse-muc-embedded.css
.PHONY: watchjs
watchjs: stamp-npm
$(BABEL) --source-maps --watch=./src --out-dir=./build
$(BABEL) --source-maps --watch=./src --out-dir=./builds
.PHONY: transpile
transpile: stamp-npm
$(BABEL) --source-maps --out-dir=./builds ./src
BUILDS = dist/converse.js \
dist/converse.min.js \
dist/inverse.js \
dist/converse-esnext.js \
dist/converse-esnext.min.js \
dist/inverse.js \
dist/inverse.min.js \
dist/converse-mobile.js \
dist/converse-mobile.min.js \
dist/converse-muc-embedded.js \
dist/converse-muc-embedded.min.js \
dist/converse-no-jquery.js \
dist/converse-mobile.js \
dist/converse-mobile.min.js \
dist/converse-muc-embedded.js \
dist/converse-muc-embedded.min.js \
dist/converse-no-jquery.js \
dist/converse-no-jquery.min.js \
dist/converse-no-dependencies.min.js \
dist/converse-no-dependencies.js
dist/converse.min.js: src locale node_modules *.js
$(RJS) -o src/build.js include=converse out=dist/converse.min.js
dist/converse.js: src locale node_modules *.js
$(RJS) -o src/build.js include=converse out=dist/converse.js optimize=none
dist/converse.min.js: src locale node_modules *.js
$(UGLIFYJS) --verbose dist/converse.js -o dist/converse.min.js
cat COPYRIGHT > tmpfile && cat dist/converse.min.js >> tmpfile && mv tmpfile dist/converse.min.js
dist/converse-esnext.js: src locale node_modules *.js transpile
$(RJS) -o src/build-esnext.js include=converse out=dist/converse-esnext.js optimize=none
dist/converse-esnext.min.js: src locale node_modules *.js transpile
$(UGLIFYJS) --verbose dist/converse-esnext.js -o dist/converse-esnext.min.js
cat COPYRIGHT > tmpfile && cat dist/converse-esnext.min.js >> tmpfile && mv tmpfile dist/converse-esnext.min.js
dist/inverse.js: src locale node_modules *.js
$(RJS) -o src/build-inverse.js include=inverse out=dist/inverse.js optimize=none
dist/inverse.min.js: src locale node_modules *.js
$(RJS) -o src/build-inverse.js include=inverse out=dist/inverse.min.js
dist/converse-no-jquery.min.js: src locale node_modules *.js
$(RJS) -o src/build.js include=converse wrap.endFile=end-no-jquery.frag exclude=jquery exclude=jquery.noconflict out=dist/converse-no-jquery.min.js
$(UGLIFYJS) --verbose dist/inverse.js -o dist/inverse.min.js
cat COPYRIGHT > tmpfile && cat dist/inverse.min.js >> tmpfile && mv tmpfile dist/inverse.min.js
dist/converse-no-jquery.js: src locale node_modules *.js
$(RJS) -o src/build.js include=converse wrap.endFile=end-no-jquery.frag exclude=jquery exclude=jquery.noconflict out=dist/converse-no-jquery.js optimize=none
dist/converse-no-dependencies.min.js: src locale node_modules *.js
$(RJS) -o src/build-no-dependencies.js
dist/converse-no-jquery.min.js: src locale node_modules *.js transpile
$(UGLIFYJS) --verbose dist/converse-no-jquery.js -o dist/converse-no-jquery.min.js
cat COPYRIGHT > tmpfile && cat dist/converse-no-jquery.min.js >> tmpfile && mv tmpfile dist/converse-no-jquery.min.js
dist/converse-no-dependencies.js: src locale node_modules *.js
$(RJS) -o src/build-no-dependencies.js optimize=none out=dist/converse-no-dependencies.js
dist/converse-mobile.min.js: src locale node_modules *.js
$(RJS) -o src/build.js paths.converse=src/converse-mobile include=converse out=dist/converse-mobile.min.js
dist/converse-no-dependencies.min.js: src locale node_modules *.js
$(UGLIFYJS) --verbose dist/converse-no-dependencies.js -o dist/converse-no-dependencies.min.js
cat COPYRIGHT > tmpfile && cat dist/converse-no-dependencies.min.js >> tmpfile && mv tmpfile dist/converse-no-dependencies.min.js
dist/converse-mobile.js: src locale node_modules *.js
$(RJS) -o src/build.js paths.converse=src/converse-mobile include=converse out=dist/converse-mobile.js optimize=none
dist/converse-muc-embedded.min.js: src locale node_modules *.js
$(RJS) -o src/build.js paths.converse=src/converse-embedded include=converse out=dist/converse-muc-embedded.min.js
dist/converse-mobile.min.js: src locale node_modules *.js
$(UGLIFYJS) --verbose dist/converse-mobile.js -o dist/converse-mobile.min.js
cat COPYRIGHT > tmpfile && cat dist/converse-mobile.min.js >> tmpfile && mv tmpfile dist/converse-mobile.min.js
dist/converse-muc-embedded.js: src locale node_modules *.js
$(RJS) -o src/build.js paths.converse=src/converse-embedded include=converse out=dist/converse-muc-embedded.js optimize=none
dist/converse-muc-embedded.min.js: src locale node_modules *.js
$(UGLIFYJS) --verbose dist/converse-muc-embedded.js -o dist/converse-muc-embedded.min.js
cat COPYRIGHT > tmpfile && cat dist/converse-muc-embedded.min.js >> tmpfile && mv tmpfile dist/converse-muc-embedded.min.js
.PHONY: jsmin
jsmin: $(BUILDS)
......
......@@ -22,7 +22,9 @@ avialable at [https://conversejs.org/demo/embedded.html](https://conversejs.org/
![Screenshot of Converse.js](https://opkode.com/img/converse-screenshot.png)
### inVerse: a full-screen version of converse.js
### inVerse: a fullscreen version of converse.js
Converse.js is also available in a fullscreen version, called [inVerse](https://inverse.chat)
![Screenshot of inVerse](https://opkode.com/img/inverse-screenshot.png)
......
{
"name": "converse.js",
"description": "Web-based XMPP/Jabber chat client written in javascript",
"version": "3.0.2",
"version": "3.1.1",
"license": "MPL-2.0",
"devDependencies": {},
"dependencies": {},
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1353,7 +1353,7 @@
#converse-embedded-chat form.pure-form.converse-form,
#conversejs form.pure-form.converse-form {
background: white;
padding: 0 1em; }
padding: 1em; }
#converse-embedded-chat form.pure-form.converse-form legend,
#conversejs form.pure-form.converse-form legend {
color: #818479; }
......@@ -1853,6 +1853,8 @@
#conversejs #controlbox {
margin-right: 1em; }
#conversejs #controlbox .pure-form.converse-form {
padding: 0; }
@media screen and (max-width: 480px) {
#conversejs #controlbox {
margin: 0; } }
......@@ -2550,7 +2552,8 @@
#converse-embedded-chat .chatroom .box-flyout .chatroom-body .chatroom-form-container,
#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container {
background-color: white;
border-radius: 4px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border: 0;
color: #818479;
font-size: 14px;
......
This diff is collapsed.
......@@ -1353,7 +1353,7 @@
#converse-embedded-chat form.pure-form.converse-form,
#conversejs form.pure-form.converse-form {
background: white;
padding: 0 1em; }
padding: 1em; }
#converse-embedded-chat form.pure-form.converse-form legend,
#conversejs form.pure-form.converse-form legend {
color: #818479; }
......@@ -1938,6 +1938,8 @@ body {
#conversejs #controlbox {
margin-right: 1em; }
#conversejs #controlbox .pure-form.converse-form {
padding: 0; }
@media screen and (max-width: 480px) {
#conversejs #controlbox {
margin: 0; } }
......@@ -2676,7 +2678,8 @@ body {
#converse-embedded-chat .chatroom .box-flyout .chatroom-body .chatroom-form-container,
#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container {
background-color: white;
border-radius: 7px;
border-bottom-left-radius: 7px;
border-bottom-right-radius: 7px;
border: 0;
color: #818479;
font-size: 16px;
......@@ -2738,6 +2741,8 @@ body {
#conversejs .chatroom .box-flyout .chatroom-body {
border-top-left-radius: 7px;
border-top-right-radius: 7px; }
#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container {
border-radius: 7px; }
#conversejs .chatroom .box-flyout .chatroom-body .chat-area {
border-top-left-radius: 7px;
min-width: auto; }
......
......@@ -344,5 +344,5 @@ ul.features {
.sponsors {
clear: both;
font-size: 1.1em;
padding: 6em 0 7em 0;
padding: 2em 0 7em 0;
}
......@@ -72,6 +72,7 @@
<p class="intro-text">Demos:</p>
<p class="intro-text">
<ul style="list-style: none; font-size: 22px;">
<li><a href="https://inverse.chat" target="_blank" rel="noopener">As a fullscreen application</a></li>
<li><a href="/demo/anonymous.html">Anonymous login</a></li>
<li><a href="/demo/embedded.html">Single MUC chatroom embedded into the page</a></li>
<li><a href="/demo/without_bundled_dependencies.html">Dependencies loaded externally as &lt;script&gt; tags</a></li>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -48,9 +48,9 @@ copyright = u'2014, JC Brand'
# built documents.
#
# The short X.Y version.
version = '3.0.2'
version = '3.1.1'
# The full version, including alpha/beta/rc tags.
release = '3.0.2'
release = '3.1.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -26,10 +26,10 @@ After you have configured *Converse.js*, you'll have to regenerate the minified
JS file so that it will include the new settings. Please refer to the
:ref:`minification` section for more info on how to do this.
.. _`configuration-variables`:
.. _`configuration-settings`:
Configuration variables
=======================
Configuration settings
======================
authentication
--------------
......
......@@ -55,6 +55,8 @@ can call them. Public methods therefore don't expose any sensitive or closured
data. To do that, you'll need to create a plugin, which has access to the
private API method.
.. _`initialize`:
initialize
----------
......@@ -63,7 +65,7 @@ initialize
Publich API method which initializes converse.js.
This method must always be called when using converse.js.
The `initialize` method takes a map of :ref:`configuration-variables`.
The `initialize` method takes a map of :ref:`configuration-settings`.
Example:
......@@ -133,6 +135,22 @@ that might be running in the page.
time-constriaints these limitations are ignored in the examples below. For
a fuller picture, refer to the section :ref:`events-API` as well.
emit
----
This method allows you to emit events, which can be listened to via
``_converse.api.listen.on`` or ``_converse.api.listen.once``.
For example:
.. code-block:: javascript
_converse.emit('foo-completed');
Additionally, if a promise has been registered under the same name
(via ``_converse.api.promises.add``), then that promise will also be resolved
when calling ``emit``.
send
----
......@@ -155,7 +173,6 @@ For example, to send a message stanza:
}
});
.. _`waituntil-grouping`:
waitUntil
......@@ -202,7 +219,7 @@ Converse.js supports the *Message Archive Management*
(`XEP-0313 <https://xmpp.org/extensions/xep-0313.html>`_) protocol,
through which it is able to query an XMPP server for archived messages.
See also the **message_archiving** option in the :ref:`configuration-variables` section, which you'll usually
See also the **message_archiving** option in the :ref:`configuration-settings` section, which you'll usually
want to in conjunction with this API.
query
......@@ -880,10 +897,101 @@ Lets you close open chat rooms. You can call this method without any arguments
to close all open chat rooms, or you can specify a single JID or an array of
JIDs.
.. _`promises-grouping`:
The **promises** grouping
-------------------------
Converse.js and its plugins emit various events which you can listen to via the
:refs:`listen-grouping`.
These events can also be turned into promises, and by default some already
are.
The core events, which are also promises are:
* cachedRoster
* chatBoxesFetched
* connected
* pluginsInitialized
* roster
* rosterContactsFetched
* rosterGroupsFetched
* rosterInitialized
* statusInitialized
The various plugins might also provide promises, and they do this by using the
``promises.add`` api method.
add(promises)
~~~~~~~~~~~~~
By calling ``promises.add``, a new promise is made available for other code or
plugins to depend on via the ``_converse.api.waitUntil`` method.
This method accepts either a string or list of strings which specify the
promise(s) to be added.
For example:
.. code-block:: javascript
converse.plugins.add('myplugin', {
initialize: function () {
this._converse.api.promises.add('foo-completed');
}
});
Generally, it's the responsibility of the plugin which adds the promise to
also resolve it.
This is done by calling ``_converse.api.emit``, which not only resolve the
promise, but also emit an event with the same name (which can be listened to
via ``_converse.api.listen``).
For example:
.. code-block:: javascript
_converse.api.emit('foo-completed');
The **settings** grouping
-------------------------
This grouping allows you to get or set the configuration settings of converse.js.
This grouping allows access to the configuration settings of converse.js.
.. _`settings-update`:
update(settings)
~~~~~~~~~~~~~~~~
Allows new configuration settings to be specified, or new default values for
existing configuration settings to be specified.
For example:
.. code-block:: javascript
converse.plugins.add('myplugin', {
initialize: function () {
this._converse.api.settings.update({
'enable_foo': true
});
}
});
The user can then override the default value of the configuration setting when
calling `converse.initialize`.
For example:
.. code-block:: javascript
converse.initialize({
'enable_foo': false
});
get(key)
~~~~~~~~
......
......@@ -126,7 +126,6 @@ Here's an example of the plugin shown above wrapped inside a UMD module:
});
Accessing 3rd party libraries
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -198,11 +197,36 @@ If the setting :ref:`strict_plugin_dependencies` is set to true,
an error will be raised if the plugin is not found, thereby making them
non-optional.
Extending converse.js's configuration settings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Converse.js comes with various :ref:`configuration-settings`_ that can be used to
modify its functionality and behavior.
All configuration settings have default values which can be overridden when
`converse.initialize` (see :ref:`initialize`_) gets called.
Plugins often need their own additional configuration settings and you can add
these settings with the `_converse.api.settings.update` method (see
:ref:`settings-update`_).
Exposing promises
~~~~~~~~~~~~~~~~~
Converse.js has a ``waitUntil`` API method (see :ref:`waituntil-grouping`_)
which allows you to wait for various promises to resolve before executing a
piece of code.
You can add new promises for your plugin by calling
``_converse.api.promises.add`` (see :ref:`promises-grouping`_).
Generally, your plugin will then also be responsible for making sure these
promises are resolved. You do this by calling ``_converse.api.emit``, which not
only resolves the plugin but will also emit an event with the same name.
A full example plugin
---------------------
.. code-block:: javascript
(function (root, factory) {
......@@ -237,20 +261,58 @@ A full example plugin
// method on any plugin (if it exists) as soon as the plugin has
// been loaded.
var _converse = this._converse;
// Inside this method, you have access to the closured
// _converse object, from which you can get any configuration
// options that the user might have passed in via
// converse.initialize. These values are stored in the
// "user_settings" attribute.
// Let's assume the user might pass in a custom setting, like so:
// We can also specify new configuration settings for this
// plugin, or override the default values of existing
// configuration settings. This is done like so:
_converse.api.settings.update({
'initialize_message': 'Initialized', // New configuration setting
'auto_subscribe': true, // New default value for an
// existing "core" configuration setting
});
// The user can then pass in values for the configuration
// settings when `converse.initialize` gets called.
// For example:
//
// converse.initialize({
// "initialize_message": "My plugin has been initialized"
// });
//
// Then we can alert that message, like so:
alert(this._converse.user_settings.initialize_message);
// And the configuration setting is then available via the
// `user_settings` attribute:
// alert(this._converse.user_settings.initialize_message);
// Besides `_converse.api.settings.update`, there is also a
// `_converse.api.promises.add` method, which allows you to
// add new promises that your plugin is obligated to fulfill.
// This method takes a string or a list of strings which
// represent the promise names.
_converse.api.promises.add('operationCompleted');
// Your plugin should then, when appropriate, resolve the
// promise by calling `_converse.api.emit`, which will also
// emit an event with the same name as the promise.
// For example:
// _converse.api.emit('operationCompleted');
//
// Other plugins can then either listen for the event
// `operationCompleted` like so:
// `_converse.api.listen.on('operationCompleted', function { ... });`
//
// or they can wait for the promise to be fulfilled like so:
// `_converse.api.waitUntil('operationCompleted', function { ... });`
},
// Optional dependencies are other plugins which might be
......
......@@ -42,7 +42,7 @@ Initializing Converse.js
------------------------
You'll then need to initialize Converse.js with configuration settings relevant to your requirements.
Refer to the :ref:`configuration-variables` section for info on all the available configuration settings.
Refer to the :ref:`configuration-settings` section for info on all the available configuration settings.
To quickly get started, you can put the following Javascript code at the
bottom of your page (after the closing *</body>* element)::
......
......@@ -212,7 +212,7 @@ your authentication backend, since you could then configure your XMPP server to
use that as well.
To prebind you will require a BOSH-enabled XMPP server for converse.js to connect to
(see the :ref:`bosh-service-url` under :ref:`configuration-variables`)
(see the :ref:`bosh-service-url` under :ref:`configuration-settings`)
as well as a BOSH client in your web application (written for example in
Python, Ruby or PHP) that will set up an authenticated BOSH session, which
converse.js can then attach to.
......
This diff is collapsed.
This diff is collapsed.
......@@ -5,10 +5,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>inVerse</title>
<link rel="shortcut icon" type="image/ico" href="css/images/favicon.ico"/>
<link type="text/css" rel="stylesheet" media="screen" href="css/inverse.css" />
<![if gte IE 9]>
<script src="dist/inverse.js"></script>
<![endif]>
<link type="text/css" rel="stylesheet" media="screen" href="https://cdn.conversejs.org/3.1.0/css/inverse.min.css" />
<script type="text/javascript" src="inverse-analytics.js"></script>
<noscript><p><img src="//stats.opkode.com/piwik.php?idsite=5" style="border:0;" alt="" /></p></noscript>
<script src="dist/inverse.min.js"></script>
</head>
<body>
<div class="content">
......
......@@ -39,25 +39,21 @@
null,
"Klik om die boekmerklys te skakel"
],
"Bookmarked Rooms": [
null,
"Kletskamerboekmerke"
],
"Are you sure you want to remove the bookmark \"%1$s\"?": [
null,
"Is u seker u wil die boekmerk \"%1$s\" verwyder?"
],
"Click to open this room": [
"Remove this bookmark": [
null,
"Klik om hierdie kletskamer te open"
"Verwyder hierdie boekmerk"
],
"Show more information on this room": [
null,
"Wys meer inligting aangaande hierdie kletskamer"
],
"Remove this bookmark": [
"Click to open this room": [
null,
"Verwyder hierdie boekmerk"
"Klik om hierdie kletskamer te open"
],
"You have unread messages": [
null,
......@@ -231,6 +227,14 @@
null,
"Meld af"
],
"Click to add new chat contacts": [
null,
"Klik om nuwe kletskontakte by te voeg"
],
"Add a contact": [
null,
"Voeg 'n kontak by"
],
"Contact name": [
null,
"Kontaknaam"
......@@ -247,14 +251,6 @@
null,
"Voeg by"
],
"Click to add new chat contacts": [
null,
"Klik om nuwe kletskontakte by te voeg"
],
"Add a contact": [
null,
"Voeg 'n kontak by"
],
"No users found": [
null,
"Geen gebruikers gevind"
......@@ -1059,6 +1055,10 @@
null,
"Enige"
],
"Unread": [
null,
""
],
"Chatty": [
null,
"Geselserig"
......@@ -1067,18 +1067,6 @@
null,
"Weg vir langer"
],
"Click to remove this contact": [
null,
"Klik om hierdie kontak te verwyder"
],
"Click to accept this contact request": [
null,
"Klik om hierdie kontakversoek te aanvaar"
],
"Click to decline this contact request": [
null,
"Klik om hierdie kontakversoek te weier"
],
"Click to chat with this contact": [
null,
"Klik om met hierdie kontak te klets"
......
This diff is collapsed.
......@@ -31,21 +31,21 @@
null,
"Cancel·la"
],
"Bookmarked Rooms": [
"Bookmarks": [
null,
""
],
"Click to open this room": [
"Remove this bookmark": [
null,
"Feu clic per obrir aquesta sala"
""
],
"Show more information on this room": [
null,
"Mostra més informació d'aquesta sala"
],
"Remove this bookmark": [
"Click to open this room": [
null,
""
"Feu clic per obrir aquesta sala"
],
"Close this chat box": [
null,
......@@ -211,6 +211,14 @@
null,
"Tanca la sessió"
],
"Click to add new chat contacts": [
null,
"Feu clic per afegir contactes nous al xat"
],
"Add a contact": [
null,
"Afegeix un contacte"
],
"Contact name": [
null,
"Nom del contacte"
......@@ -223,14 +231,6 @@
null,
"Afegeix"
],
"Click to add new chat contacts": [
null,
"Feu clic per afegir contactes nous al xat"
],
"Add a contact": [
null,
"Afegeix un contacte"
],
"No users found": [
null,
"No s'ha trobat cap usuari"
......@@ -839,25 +839,17 @@
null,
""
],
"Chatty": [
"Unread": [
null,
""
],
"Extended Away": [
"Chatty": [
null,
""
],
"Click to remove this contact": [
null,
"Feu clic per eliminar aquest contacte"
],
"Click to accept this contact request": [
null,
"Feu clic per acceptar aquesta sol·licitud de contacte"
],
"Click to decline this contact request": [
"Extended Away": [
null,
"Feu clic per rebutjar aquesta sol·licitud de contacte"
""
],
"Click to chat with this contact": [
null,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -35,21 +35,21 @@
null,
""
],
"Bookmarked Rooms": [
"Bookmarks": [
null,
""
],
"Click to open this room": [
"Remove this bookmark": [
null,
"Haga click para abrir esta sala"
""
],
"Show more information on this room": [
null,
"Mostrar más información en esta sala"
],
"Remove this bookmark": [
"Click to open this room": [
null,
""
"Haga click para abrir esta sala"
],
"Personal message": [
null,
......@@ -175,6 +175,14 @@
null,
"Desconectado"
],
"Click to add new chat contacts": [
null,
"Haga click para agregar nuevos contactos al chat"
],
"Add a contact": [
null,
"Agregar un contacto"
],
"Contact name": [
null,
"Nombre de contacto"
......@@ -191,14 +199,6 @@
null,
"Agregar"
],
"Click to add new chat contacts": [
null,
"Haga click para agregar nuevos contactos al chat"
],
"Add a contact": [
null,
"Agregar un contacto"
],
"No users found": [
null,
"Sin usuarios encontrados"
......@@ -763,17 +763,17 @@
null,
""
],
"Chatty": [
"Unread": [
null,
""
],
"Extended Away": [
"Chatty": [
null,
""
],
"Click to remove this contact": [
"Extended Away": [
null,
"Haga click para eliminar este contacto"
""
],
"Click to chat with this contact": [
null,
......
This diff is collapsed.
......@@ -39,25 +39,17 @@
null,
"Cliquer pour ouvrir la liste des salons"
],
"Bookmarked Rooms": [
null,
"Salons en marques-page"
],
"Are you sure you want to remove the bookmark \"%1$s\"?": [
null,
"Voulez-vous vraiment supprimer ce marque-page ?"
],
"Click to open this room": [
"Remove this bookmark": [
null,
"Cliquer pour ouvrir ce salon"
"Supprimer ce marque-page"
],
"Show more information on this room": [
null,
"Afficher davantage d’informations sur ce salon"
],
"Remove this bookmark": [
"Click to open this room": [
null,
"Supprimer ce marque-page"
"Cliquer pour ouvrir ce salon"
],
"You have unread messages": [
null,
......@@ -231,6 +223,14 @@
null,
"Se déconnecter"
],
"Click to add new chat contacts": [
null,
"Cliquez pour ajouter de nouveaux contacts"
],
"Add a contact": [
null,
"Ajouter un contact"
],
"Contact name": [
null,
"Nom du contact"
......@@ -247,14 +247,6 @@
null,
"Ajouter"
],
"Click to add new chat contacts": [
null,
"Cliquez pour ajouter de nouveaux contacts"
],
"Add a contact": [
null,
"Ajouter un contact"
],
"No users found": [
null,
"Aucun utilisateur trouvé"
......@@ -1015,25 +1007,17 @@
null,
"Aucun"
],
"Chatty": [
"Unread": [
null,
""
],
"Extended Away": [
"Chatty": [
null,
""
],
"Click to remove this contact": [
null,
"Cliquez pour supprimer ce contact"
],
"Click to accept this contact request": [
null,
"Cliquez pour accepter la demande de ce contact"
],
"Click to decline this contact request": [
"Extended Away": [
null,
"Cliquez pour refuser la demande de ce contact"
""
],
"Click to chat with this contact": [
null,
......
This diff is collapsed.
......@@ -31,21 +31,21 @@
null,
"ביטול"
],
"Bookmarked Rooms": [
"Bookmarks": [
null,
""
],
"Click to open this room": [
"Remove this bookmark": [
null,
"לחץ כדי לפתוח את חדר זה"
""
],
"Show more information on this room": [
null,
"הצג עוד מידע אודות חדר זה"
],
"Remove this bookmark": [
"Click to open this room": [
null,
""
"לחץ כדי לפתוח את חדר זה"
],
"Personal message": [
null,
......@@ -207,6 +207,14 @@
null,
"התנתקות"
],
"Click to add new chat contacts": [
null,
"לחץ כדי להוסיף אנשי קשר שיחה חדשים"
],
"Add a contact": [
null,
"הוסף איש קשר"
],
"Contact name": [
null,
"שם איש קשר"
......@@ -219,14 +227,6 @@
null,
"הוסף"
],
"Click to add new chat contacts": [
null,
"לחץ כדי להוסיף אנשי קשר שיחה חדשים"
],
"Add a contact": [
null,
"הוסף איש קשר"
],
"No users found": [
null,
"לא נמצאו משתמשים"
......@@ -831,25 +831,17 @@
null,
""
],
"Chatty": [
"Unread": [
null,
""
],
"Extended Away": [
"Chatty": [
null,
""
],
"Click to remove this contact": [
null,
"לחץ כדי להסיר את איש קשר זה"
],
"Click to accept this contact request": [
null,
"לחץ כדי לקבל את בקשת איש קשר זה"
],
"Click to decline this contact request": [
"Extended Away": [
null,
"לחץ כדי לסרב את בקשת איש קשר זה"
""
],
"Click to chat with this contact": [
null,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{
"name": "converse.js",
"version": "3.0.2",
"version": "3.1.1",
"description": "Browser based XMPP instant messaging client",
"main": "main.js",
"directories": {
......@@ -33,7 +33,10 @@
},
"devDependencies": {
"almond": "~0.3.3",
"awesomplete": "^1.1.1",
"awesomplete-avoid-xss": "^1.1.2",
"babel-cli": "^6.18.0",
"babel-preset-env": "^1.5.2",
"babel-preset-latest": "^6.16.0",
"backbone": "1.3.3",
"backbone.browserStorage": "0.0.3",
"backbone.overview": "0.0.3",
......@@ -54,7 +57,6 @@
"jasmine-core": "2.6.4",
"jed": "0.5.4",
"jquery": "2.2.3",
"jquery-easing": "0.0.1",
"jquery.browser": ">=0.1.0",
"jshint": "^2.9.4",
"lodash": "4.17.4",
......@@ -75,6 +77,7 @@
"strophejs-plugin-rsm": "0.0.1",
"strophejs-plugin-vcard": "0.0.1",
"text": "requirejs/text#2.0.15",
"uglify-es": "^3.0.24",
"wait-until-promise": "^1.0.0"
},
"dependencies": {}
......
......@@ -183,7 +183,8 @@
}
.chatroom-form-container {
background-color: white;
border-radius: $chatbox-border-radius;
border-bottom-left-radius: $chatbox-border-radius;
border-bottom-right-radius: $chatbox-border-radius;
border: 0;
color: $text-color;
font-size: $font-size;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment