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", "name": "converse.js",
"description": "Web-based XMPP/Jabber chat client written in javascript", "description": "Web-based XMPP/Jabber chat client written in javascript",
"version": "0.9.1", "version": "0.9.2",
"license": "MPL", "license": "MPL",
"devDependencies": { "devDependencies": {
"jasmine": "https://github.com/jcbrand/jasmine.git#1_3_x", "jasmine": "https://github.com/jcbrand/jasmine.git#1_3_x",
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"backbone.browserStorage": "*", "backbone.browserStorage": "*",
"backbone.overview": "*", "backbone.overview": "*",
"otr": "0.2.12", "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", "almond": "~0.3.0",
"requirejs-text": "~2.0.12", "requirejs-text": "~2.0.12",
"requirejs-tpl-jcbrand": "*", "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,7 +352,7 @@ ...@@ -352,7 +352,7 @@
this.playNotification = function () { this.playNotification = function () {
var audio; var audio;
if (converse.play_sounds && typeof Audio !== "undefined"){ 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')) { if (audio.canPlayType('/audio/ogg')) {
audio.play(); audio.play();
} else { } else {
...@@ -4295,6 +4295,11 @@ ...@@ -4295,6 +4295,11 @@
label_contacts: LABEL_CONTACTS, label_contacts: LABEL_CONTACTS,
label_groups: LABEL_GROUPS 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; return this;
}, },
...@@ -5697,6 +5702,45 @@ ...@@ -5697,6 +5702,45 @@
return _.map(jids, getWrappedChatBox); 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': { 'tokens': {
'get': function (id) { 'get': function (id) {
if (!converse.expose_rid_and_sid || typeof converse.connection === "undefined") { if (!converse.expose_rid_and_sid || typeof converse.connection === "undefined") {
......
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
/* status dropdown styles */ } /* status dropdown styles */ }
#conversejs ::selection { #conversejs ::selection {
background-color: #E3C9C1; } background-color: #E3C9C1; }
#conversejs ::-moz-selection {
background-color: #E3C9C1; }
#conversejs *, #conversejs *:before, #conversejs *:after { #conversejs *, #conversejs *:before, #conversejs *:after {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
...@@ -676,10 +678,12 @@ ...@@ -676,10 +678,12 @@
position: relative; position: relative;
margin: 0.5em 0 0 0; margin: 0.5em 0 0 0;
height: 194px; height: 194px;
height: calc(100% - 68px); height: calc(100% - 50px - 20px);
overflow: hidden; overflow: hidden;
/* (jQ addClass:) if input has value: */ /* (jQ addClass:) if input has value: */
/* (jQ addClass:) if mouse is over the 'x' input area*/ } /* (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 { #conversejs #converse-roster .filter-type {
display: table-cell; display: table-cell;
float: right; float: right;
...@@ -886,8 +890,6 @@ ...@@ -886,8 +890,6 @@
white-space: nowrap; } white-space: nowrap; }
#conversejs .chatroom .participant-list li.moderator { #conversejs .chatroom .participant-list li.moderator {
color: #8f2831; } color: #8f2831; }
#conversejs .chatroom .participant-list li.visitor {
color: #A3A3A3; }
#conversejs .chatroom .chat-textarea { #conversejs .chatroom .chat-textarea {
border-bottom-right-radius: 0; } border-bottom-right-radius: 0; }
#conversejs .chatroom .chat-area { #conversejs .chatroom .chat-area {
......
This diff is collapsed.
Changelog 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] * Bugfix. Prevent attaching twice during initialization. [jcbrand]
* API method chats.get can now also return chat boxes which haven't been opened yet. [jcbrand] * API method chats.get can now also return chat boxes which haven't been opened yet. [jcbrand]
* Add API method contacts.add. [pzia] * Add API method contacts.add. [pzia]
...@@ -11,6 +17,9 @@ Changelog ...@@ -11,6 +17,9 @@ Changelog
* #357 Fix the known bug where a state notification reopens a chat box. [floriancargoet] * #357 Fix the known bug where a state notification reopens a chat box. [floriancargoet]
* #358 Bugfix. Chat rooms show the same occupants bug. [floriancargoet] * #358 Bugfix. Chat rooms show the same occupants bug. [floriancargoet]
* #359 Fix a timeout bug in chat state notifications. [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) 0.9.1 (2015-03-26)
------------------ ------------------
......
...@@ -48,9 +48,9 @@ copyright = u'2014, JC Brand' ...@@ -48,9 +48,9 @@ copyright = u'2014, JC Brand'
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
version = '0.9.1' version = '0.9.2'
# The full version, including alpha/beta/rc tags. # 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 # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
......
...@@ -373,7 +373,7 @@ nickname is mentioned in a chat room. ...@@ -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 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. 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 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 it in both formats as ``http://yoursite.com/sounds/msg_received.mp3`` and
``http://yoursite.com/sounds/msg_received.ogg``. ``http://yoursite.com/sounds/msg_received.ogg``.
......
...@@ -351,6 +351,35 @@ To return an array of chat boxes, provide an array of JIDs:: ...@@ -351,6 +351,35 @@ To return an array of chat boxes, provide an array of JIDs::
| url | The URL of the chat box heading. | | 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 "settings" grouping
------------------- -------------------
......
...@@ -167,7 +167,6 @@ Single Session Support ...@@ -167,7 +167,6 @@ Single Session Support
.. note:: .. note::
What is prebinding? What is prebinding?
~~~~~~~~~~~~~~~~~~~
**Prebind** refers to a technique whereby your web application sets up an **Prebind** refers to a technique whereby your web application sets up an
authenticated BOSH session with a BOSH connection manager (which could be your 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. ...@@ -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 The best way to achieve this is to simply increment the RID with each page
load. 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. :ref:`prebind_url` settings.
Please read the documentation on those settings for a fuller picture of what 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", "name": "converse.js",
"version": "0.9.1", "version": "0.9.2",
"description": "Browser based XMPP instant messaging client", "description": "Browser based XMPP instant messaging client",
"main": "main.js", "main": "main.js",
"directories": { "directories": {
......
...@@ -34,10 +34,12 @@ ...@@ -34,10 +34,12 @@
#conversejs { #conversejs {
@import "variables"; @import "variables";
::selection { ::selection {
background-color: $highlight-color; background-color: $highlight-color;
} }
::-moz-selection {
background-color: $highlight-color;
}
color: $text-color; color: $text-color;
font-size: $font-size; font-size: $font-size;
...@@ -739,9 +741,13 @@ ...@@ -739,9 +741,13 @@
position: relative; position: relative;
margin: 0.5em 0 0 0; margin: 0.5em 0 0 0;
height: $roster-height; height: $roster-height;
height: calc(100% - 68px); height: calc(100% - #{$controlbox-dropdown-height*2} - 20px);
overflow: hidden; overflow: hidden;
&.no-contact-requests {
height: calc(100% - #{$controlbox-dropdown-height} - 20px);
}
.filter-type { .filter-type {
display: table-cell; display: table-cell;
float: right; 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