Commit 838ad136 authored by JC Brand's avatar JC Brand

Merge branch 'master' into roster_refactor

Conflicts:
	converse.js
parents 827efab0 c195d905
{
"name": "converse.js",
"description": "Web-based XMPP/Jabber chat client written in javascript",
"version": "0.9.1",
"version": "0.9.2",
"license": "MPL",
"devDependencies": {
"jasmine": "https://github.com/jcbrand/jasmine.git#1_3_x",
......@@ -18,7 +18,7 @@
"backbone.browserStorage": "*",
"backbone.overview": "*",
"otr": "0.2.12",
"crypto-js-evanvosberg": "3.1.2-5",
"crypto-js-evanvosberg": "https://github.com/evanvosberg/crypto-js.git#release-3.1.2-5",
"almond": "~0.3.0",
"requirejs-text": "~2.0.12",
"requirejs-tpl-jcbrand": "*",
......
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.
......@@ -352,14 +352,14 @@
this.playNotification = function () {
var audio;
if (converse.play_sounds && typeof Audio !== "undefined"){
audio = new Audio("sounds/msg_received.ogg");
audio = new Audio("/sounds/msg_received.ogg");
if (audio.canPlayType('/audio/ogg')) {
audio.play();
} else {
audio = new Audio("/sounds/msg_received.mp3");
audio.play();
}
}
}
};
this.giveFeedback = function (message, klass) {
......@@ -4295,6 +4295,11 @@
label_contacts: LABEL_CONTACTS,
label_groups: LABEL_GROUPS
}));
if (!converse.allow_contact_requests) {
// XXX: if we ever support live editing of config then
// we'll need to be able to remove this class on the fly.
this.$el.addClass('no-contact-requests');
}
return this;
},
......@@ -5697,6 +5702,45 @@
return _.map(jids, getWrappedChatBox);
}
},
'rooms': {
'open': function (jids, nick) {
if (!nick) {
nick = Strophe.getNodeFromJid(converse.bare_jid);
}
if (typeof nick !== "string") {
throw new TypeError('rooms.open: invalid nick, must be string');
}
var _transform = function (jid) {
var chatroom = converse.chatboxes.get(jid);
converse.log('jid');
if (!chatroom) {
chatroom = converse.chatboxviews.showChat({
'id': jid,
'jid': jid,
'name': Strophe.unescapeNode(Strophe.getNodeFromJid(jid)),
'nick': nick,
'chatroom': true,
'box_id' : b64_sha1(jid)
});
}
return wrappedChatBox(chatroom);
};
if (typeof jids === "undefined") {
throw new TypeError('rooms.open: You need to provide at least one JID');
} else if (typeof jids === "string") {
return _transform(jids);
}
return _.map(jids, _transform);
},
'get': function (jids) {
if (typeof jids === "undefined") {
throw new TypeError("rooms.get: You need to provide at least one JID");
} else if (typeof jids === "string") {
return getWrappedChatBox(jids);
}
return _.map(jids, getWrappedChatBox);
}
},
'tokens': {
'get': function (id) {
if (!converse.expose_rid_and_sid || typeof converse.connection === "undefined") {
......
......@@ -44,6 +44,8 @@
/* status dropdown styles */ }
#conversejs ::selection {
background-color: #E3C9C1; }
#conversejs ::-moz-selection {
background-color: #E3C9C1; }
#conversejs *, #conversejs *:before, #conversejs *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
......@@ -676,10 +678,12 @@
position: relative;
margin: 0.5em 0 0 0;
height: 194px;
height: calc(100% - 68px);
height: calc(100% - 50px - 20px);
overflow: hidden;
/* (jQ addClass:) if input has value: */
/* (jQ addClass:) if mouse is over the 'x' input area*/ }
#conversejs #converse-roster.no-contact-requests {
height: calc(100% - 25px - 20px); }
#conversejs #converse-roster .filter-type {
display: table-cell;
float: right;
......@@ -886,8 +890,6 @@
white-space: nowrap; }
#conversejs .chatroom .participant-list li.moderator {
color: #8f2831; }
#conversejs .chatroom .participant-list li.visitor {
color: #A3A3A3; }
#conversejs .chatroom .chat-textarea {
border-bottom-right-radius: 0; }
#conversejs .chatroom .chat-area {
......
This diff is collapsed.
Changelog
=========
0.9.2 (Undefined)
0.9.3 (Undefined)
-----------------
* Add the ability to log in anonymously. [jcbrand]
* Add the ability to log in automatically. [jcbrand]
0.9.2 (2015-04-09)
------------------
* Bugfix. Prevent attaching twice during initialization. [jcbrand]
* API method chats.get can now also return chat boxes which haven't been opened yet. [jcbrand]
* Add API method contacts.add. [pzia]
......@@ -11,6 +17,9 @@ Changelog
* #357 Fix the known bug where a state notification reopens a chat box. [floriancargoet]
* #358 Bugfix. Chat rooms show the same occupants bug. [floriancargoet]
* #359 Fix a timeout bug in chat state notifications. [floriancargoet]
* #360 Incorrect roster height when ``allow_contact_requests=true``. [floriancargoet, jcbrand]
* #362 Add API for retrieving and opening rooms. [pzia]
* #364 Text selection in chat boxes not shown in Firefox. [jcbrand]
0.9.1 (2015-03-26)
------------------
......
......@@ -48,9 +48,9 @@ copyright = u'2014, JC Brand'
# built documents.
#
# The short X.Y version.
version = '0.9.1'
version = '0.9.2'
# The full version, including alpha/beta/rc tags.
release = '0.9.1'
release = '0.9.2'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -373,7 +373,7 @@ nickname is mentioned in a chat room.
Inside the ``./sounds`` directory of the Converse.js repo, you'll see MP3 and Ogg
formatted sound files. We need both, because neither format is supported by all browsers.
For now, sound files are looked up by convention, not configuration. So to have
Sound files are looked up by convention, not configuration. So to have
a sound play when a message is received, make sure that your webserver serves
it in both formats as ``http://yoursite.com/sounds/msg_received.mp3`` and
``http://yoursite.com/sounds/msg_received.ogg``.
......
......@@ -351,6 +351,35 @@ To return an array of chat boxes, provide an array of JIDs::
| url | The URL of the chat box heading. |
+-------------+-----------------------------------------------------+
"rooms" grouping
----------------
get
~~~
Returns an object representing a multi user chat box (room).
Similar to chats.get API
open
~~~~
Opens a multi user chat box and returns an object representing it.
Similar to chats.get API
To open a single multi user chat box, provide the JID of the room::
converse.room.open('group@muc.example.com')
To return an array of chat boxes, provide an array of JIDs::
converse.chats.open(['group1@muc.example.com', 'group2@muc.example.com'])
To setup a custom nickname when joining the room, provide the optionnal nick argument::
converse.room.open('group@muc.example.com', 'mycustomnick')
"settings" grouping
-------------------
......
......@@ -105,8 +105,8 @@ HTTP requests are made by *Converse.js* to the connection manager via XmlHttpReq
Until recently, it was not possible to make such requests to a different domain
than the one currently being served (to prevent XSS attacks).
Luckily there is now a standard called
`CORS <https://en.wikipedia.org/wiki/Cross-origin_resource_sharing>`_
Luckily there is now a standard called
`CORS <https://en.wikipedia.org/wiki/Cross-origin_resource_sharing>`_
(Cross-origin resource sharing), which enables exactly that.
Modern browsers support CORS, but there are problems with Internet Explorer < 10.
......@@ -135,7 +135,7 @@ Your ``nginx`` or ``apache`` configuration will look as follows:
Nginx
~~~~~
.. code-block:: nginx
.. code-block:: nginx
http {
server {
......@@ -167,7 +167,6 @@ Single Session Support
.. note::
What is prebinding?
~~~~~~~~~~~~~~~~~~~
**Prebind** refers to a technique whereby your web application sets up an
authenticated BOSH session with a BOSH connection manager (which could be your
......@@ -217,7 +216,7 @@ page load). Each page load is a new request which requires a new unique RID.
The best way to achieve this is to simply increment the RID with each page
load.
You'll need to configure converse.js with the :ref:`prebind`, :ref:`keepalive` and
You'll need to configure converse.js with the ``prebind``, :ref:`keepalive` and
:ref:`prebind_url` settings.
Please read the documentation on those settings for a fuller picture of what
......
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": "0.9.1",
"version": "0.9.2",
"description": "Browser based XMPP instant messaging client",
"main": "main.js",
"directories": {
......
......@@ -34,10 +34,12 @@
#conversejs {
@import "variables";
::selection {
background-color: $highlight-color;
}
::-moz-selection {
background-color: $highlight-color;
}
color: $text-color;
font-size: $font-size;
......@@ -739,9 +741,13 @@
position: relative;
margin: 0.5em 0 0 0;
height: $roster-height;
height: calc(100% - 68px);
height: calc(100% - #{$controlbox-dropdown-height*2} - 20px);
overflow: hidden;
&.no-contact-requests {
height: calc(100% - #{$controlbox-dropdown-height} - 20px);
}
.filter-type {
display: table-cell;
float: right;
......
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