فهرست منبع

Merge branch 'master' into otr

Conflicts:
	bower.json
	converse.css
	converse.js
	main.js
	tests_main.js
JC Brand 11 سال پیش
والد
کامیت
e4cf875d24
28فایلهای تغییر یافته به همراه512 افزوده شده و 491 حذف شده
  1. 18 1
      CHANGES.rst
  2. 0 1
      Gruntfile.js
  3. 1 1
      Makefile
  4. 3 2
      bower.json
  5. 26 0
      build.js
  6. 21 21
      converse.css
  7. 93 64
      converse.js
  8. 0 0
      converse.min.css
  9. 3 3
      converse.min.js
  10. BIN
      docs/doctrees/index.doctree
  11. 1 1
      docs/html/.buildinfo
  12. 8 0
      docs/html/_sources/index.txt
  13. 5 5
      docs/html/genindex.html
  14. 82 73
      docs/html/index.html
  15. 1 1
      docs/html/objects.inv
  16. 5 5
      docs/html/search.html
  17. 0 0
      docs/html/searchindex.js
  18. 2 2
      docs/source/conf.py
  19. 8 0
      docs/source/index.rst
  20. 55 22
      index.html
  21. 130 150
      locale/converse.pot
  22. 8 7
      locale/locales.js
  23. 20 0
      locale/nolocales.js
  24. 3 3
      main.js
  25. 16 3
      mockup.html
  26. 1 1
      package.json
  27. 0 123
      test_minified.html
  28. 2 2
      tests_main.js

+ 18 - 1
CHANGES.rst

@@ -1,7 +1,22 @@
 Changelog
 Changelog
 =========
 =========
 
 
-0.6.0 (Unreleased)
+0.6.2 (2013-08-29)
+------------------
+
+- Bugfix. The remove icon wasn't appearing in the contacts roster. [jcbrand]
+- Bugfix. With auto_subscribe=True, the "Pending Contacts" header didn't disappear
+after a new user was accepted. [jcbrand]
+
+0.6.1 (2013-08-28)
+------------------
+
+- IE9 and IE8 CSS fixes. [jcbrand]
+- Bugfix: Pencil icon not visible (for setting status update). [jcbrand]
+- Bugfix: RID, JID and SID initialization values were being ignored. [jcbrand]
+- Bugfix: Fall back to English if a non-existing locale was specified. [jcbrand]
+
+0.6.0 (2013-08-26)
 ------------------
 ------------------
 
 
 - #39 Documentation for minifying JS is wrong. [jcbrand]
 - #39 Documentation for minifying JS is wrong. [jcbrand]
@@ -13,6 +28,8 @@ Changelog
 - Add a debug option (logs to the browser console). [jcbrand]
 - Add a debug option (logs to the browser console). [jcbrand]
 - Use font icons from http://icomoon.io [jcbrand]
 - Use font icons from http://icomoon.io [jcbrand]
 - Added a static mockup to aid CSS/design process. [jcbrand]
 - Added a static mockup to aid CSS/design process. [jcbrand]
+- Save language codes with hyphens. Thanks to @seocam. [jcbrand]
+- The combined and minified JS file now uses almond and not require.js. [jcbrand]
 
 
 0.5.2 (2013-08-05)
 0.5.2 (2013-08-05)
 ------------------
 ------------------

+ 0 - 1
Gruntfile.js

@@ -46,7 +46,6 @@ module.exports = function(grunt) {
                         "es": "locale/es/LC_MESSAGES/es",
                         "es": "locale/es/LC_MESSAGES/es",
                         "it": "locale/it/LC_MESSAGES/it",
                         "it": "locale/it/LC_MESSAGES/it",
                         "pt_BR": "locale/pt_BR/LC_MESSAGES/pt_BR", 
                         "pt_BR": "locale/pt_BR/LC_MESSAGES/pt_BR", 
-                        "sjcl": "components/sjcl/sjcl",
                         "tinysort": "components/tinysort/src/jquery.tinysort",
                         "tinysort": "components/tinysort/src/jquery.tinysort",
                         "underscore": "components/underscore/underscore",
                         "underscore": "components/underscore/underscore",
                         "backbone": "components/backbone/backbone",
                         "backbone": "components/backbone/backbone",

+ 1 - 1
Makefile

@@ -35,7 +35,7 @@ help:
 	@echo "  text       to make text files"
 	@echo "  text       to make text files"
 
 
 pot: 
 pot: 
-	xgettext --keyword=__ --keyword=translate --from-code=UTF-8 --output=locale/converse.pot converse.js --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=0.4 -c --language="python";
+	xgettext --keyword=__ --keyword=___ --from-code=UTF-8 --output=locale/converse.pot converse.js --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=0.4 -c --language="python";
 
 
 release: 
 release: 
 	r.js -o build.js
 	r.js -o build.js

+ 3 - 2
bower.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "converse",
   "name": "converse",
-  "version": "0.6.0",
+  "version": "0.6.2",
   "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,8 @@
     "strophe.disco": "https://raw.github.com/jcbrand/strophejs-plugins/75c8693992bc357c699b6d615eeb396e799f5c02/disco/strophe.disco.js",
     "strophe.disco": "https://raw.github.com/jcbrand/strophejs-plugins/75c8693992bc357c699b6d615eeb396e799f5c02/disco/strophe.disco.js",
     "strophe.muc": "https://raw.github.com/jcbrand/strophejs-plugins/75c8693992bc357c699b6d615eeb396e799f5c02/muc/strophe.muc.js",
     "strophe.muc": "https://raw.github.com/jcbrand/strophejs-plugins/75c8693992bc357c699b6d615eeb396e799f5c02/muc/strophe.muc.js",
     "otr": "~0.2.1",
     "otr": "~0.2.1",
-    "crypto-js": "~3.1.2"
+    "crypto-js": "~3.1.2",
+    "almond": "~0.2.6"
   },
   },
   "exportsOverride": {}
   "exportsOverride": {}
 }
 }

+ 26 - 0
build.js

@@ -0,0 +1,26 @@
+({
+    baseUrl: ".",
+    name: "components/almond/almond.js",
+    out: "converse.min.js",
+    include: ['main'],
+    paths: {
+        "jquery": "components/jquery/jquery",
+        "jed": "components/jed/jed",
+        "locales": "locale/locales",
+        "af": "locale/af/LC_MESSAGES/af",
+        "en": "locale/en/LC_MESSAGES/en",
+        "de": "locale/de/LC_MESSAGES/de",
+        "es": "locale/es/LC_MESSAGES/es",
+        "it": "locale/it/LC_MESSAGES/it",
+        "pt_BR": "locale/pt_BR/LC_MESSAGES/pt_BR", 
+        "jquery.tinysort": "components/tinysort/src/jquery.tinysort",
+        "underscore": "components/underscore/underscore",
+        "backbone": "components/backbone/backbone",
+        "backbone.localStorage": "components/backbone.localStorage/backbone.localStorage",
+        "strophe": "components/strophe/strophe",
+        "strophe.muc": "components/strophe.muc/index",
+        "strophe.roster": "components/strophe.roster/index",
+        "strophe.vcard": "components/strophe.vcard/index",
+        "strophe.disco": "components/strophe.disco/index"
+    }
+})

+ 21 - 21
converse.css

@@ -17,10 +17,7 @@
     user-select: none;
     user-select: none;
 }
 }
 
 
-#collective-xmpp-chat-data {
-  color: rgb(79, 79, 79);
-}
-
+#collective-xmpp-chat-data,
 #collective-xmpp-chat-data input {
 #collective-xmpp-chat-data input {
   color: rgb(79, 79, 79);
   color: rgb(79, 79, 79);
 }
 }
@@ -169,6 +166,10 @@ ul.participant-list li.moderator {
     height:200px;
     height:200px;
 }
 }
 
 
+.chatroom .chat-content {
+    height:200px;
+}
+
 .chat-info {
 .chat-info {
     color:#666666;
     color:#666666;
 }
 }
@@ -331,7 +332,7 @@ dl.add-converse-contact {
     float: right;
     float: right;
     clear: right;
     clear: right;
     height: 22px;
     height: 22px;
-    padding: 5px 5px 0 0;
+    padding: 0px 5px 0 0;
     color: rgb(79, 79, 79);
     color: rgb(79, 79, 79);
 }
 }
 
 
@@ -384,18 +385,8 @@ a.close-chatbox-button {
     text-shadow:1px 1px 0 #ffffff;
     text-shadow:1px 1px 0 #ffffff;
 }
 }
 
 
-.close-chatbox-button {
-    padding: 0 2px 0 6px;
-}
-
-.close-chatbox-button:hover {
-    background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f6f6f6), color-stop(1, #ffffff) );
-    background:-moz-linear-gradient( center top, #f6f6f6 5%, #ffffff 100% );
-    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#ffffff');
-    background-color:#f6f6f6;
-}
-
-.close-chatbox-button:active {
+a.configure-chatroom-button:active,
+a.close-chatbox-button:active {
     position:relative;
     position:relative;
     top:1px;
     top:1px;
 }
 }
@@ -576,6 +567,7 @@ dd.available-chatroom:hover a.room-info {
 }
 }
 
 
 #converse-roster a.open-chat {
 #converse-roster a.open-chat {
+    line-height: 21px;
     width: 85%;
     width: 85%;
 }
 }
 #converse-roster  dd:hover a.open-chat {
 #converse-roster  dd:hover a.open-chat {
@@ -627,7 +619,7 @@ div#controlbox-panes {
     background-color: white;
     background-color: white;
     border-bottom-left-radius: 4px;
     border-bottom-left-radius: 4px;
     border-bottom-right-radius: 4px;
     border-bottom-right-radius: 4px;
-    width: 199px;
+    width: 200px;
 }
 }
 
 
 
 
@@ -781,6 +773,10 @@ ul.chat-toolbar {
     height: 20px;
     height: 20px;
     display: block;
     display: block;
     width: 195px;
     width: 195px;
+    /* XXX:  CHECKME */
+    float: right;
+    display: inline-block;
+    height: 20px;
 }
 }
 
 
 .chat-toolbar .toggle-otr {
 .chat-toolbar .toggle-otr {
@@ -845,6 +841,11 @@ ul.chat-toolbar li {
     cursor: pointer; 
     cursor: pointer; 
 }
 }
 
 
+ul.chat-toolbar li:hover {
+    cursor: pointer; 
+    color: rgb(39, 39, 39);
+}
+
 form#set-custom-xmpp-status {
 form#set-custom-xmpp-status {
     float: left;
     float: left;
     padding: 0;
     padding: 0;
@@ -860,7 +861,6 @@ form#set-custom-xmpp-status {
     margin:0;
     margin:0;
 }
 }
 
 
-
 #set-custom-xmpp-status button {
 #set-custom-xmpp-status button {
     padding: 1px 2px 1px 1px;
     padding: 1px 2px 1px 1px;
 }
 }
@@ -894,7 +894,7 @@ form.add-xmpp-contact input {
 .chatbox .dropdown dt a span {
 .chatbox .dropdown dt a span {
     cursor:pointer; 
     cursor:pointer; 
     display:block; 
     display:block; 
-    padding: 2px 7px 0 5px;
+    padding: 4px 7px 0 5px;
     color: rgb(79, 79, 79);
     color: rgb(79, 79, 79);
 }
 }
 
 
@@ -921,7 +921,7 @@ form.add-xmpp-contact input {
 .chatbox .dropdown a {
 .chatbox .dropdown a {
     height: 22px;
     height: 22px;
     display: inline-block;
     display: inline-block;
-    padding-top: 2px;
+    line-height: 24px;
 }
 }
 
 
 .chatbox .dropdown dd ul a:hover {
 .chatbox .dropdown dd ul a:hover {

+ 93 - 64
converse.js

@@ -16,8 +16,8 @@
             "components/otr/build/otr",
             "components/otr/build/otr",
             "crypto.aes",
             "crypto.aes",
             "locales",
             "locales",
-            "localstorage",
-            "tinysort",
+            "backbone.localStorage",
+            "jquery.tinysort",
             "strophe",
             "strophe",
             "strophe.muc",
             "strophe.muc",
             "strophe.roster",
             "strophe.roster",
@@ -55,6 +55,7 @@
         this.prebind = false;
         this.prebind = false;
         this.show_controlbox_by_default = false;
         this.show_controlbox_by_default = false;
         this.xhr_user_search = false;
         this.xhr_user_search = false;
+        this.xhr_custom_status = false;
         this.testing = false; // Exposes sensitive data for testing. Never set to true in production systems!
         this.testing = false; // Exposes sensitive data for testing. Never set to true in production systems!
         this.callback = callback || function () {};
         this.callback = callback || function () {};
 
 
@@ -72,12 +73,21 @@
             'prebind',
             'prebind',
             'show_controlbox_by_default',
             'show_controlbox_by_default',
             'xhr_user_search',
             'xhr_user_search',
+            'xhr_custom_status',
             'connection',
             'connection',
-            'testing'
+            'testing',
+            'jid',
+            'sid',
+            'rid'
         ];
         ];
         _.extend(this, _.pick(settings, whitelist));
         _.extend(this, _.pick(settings, whitelist));
 
 
         var __ = $.proxy(function (str) {
         var __ = $.proxy(function (str) {
+            /* Translation factory
+             */
+            if (this.i18n === undefined) {
+                this.i18n = locales['en'];
+            }
             var t = this.i18n.translate(str);
             var t = this.i18n.translate(str);
             if (arguments.length>1) {
             if (arguments.length>1) {
                 return t.fetch.apply(t, [].slice.call(arguments,1));
                 return t.fetch.apply(t, [].slice.call(arguments,1));
@@ -85,6 +95,18 @@
                 return t.fetch();
                 return t.fetch();
             }
             }
         }, this);
         }, this);
+
+        var ___ = function (str) {
+            /* XXX: This is part of a hack to get gettext to scan strings to be
+             * translated. Strings we cannot send to the function above because
+             * they require variable interpolation and we don't yet have the
+             * variables at scan time.
+             *
+             * See actionInfoMessages
+             */
+            return str;
+        };
+
         this.msg_counter = 0;
         this.msg_counter = 0;
         this.autoLink = function (text) {
         this.autoLink = function (text) {
             // Convert URLs into hyperlinks
             // Convert URLs into hyperlinks
@@ -1591,22 +1613,20 @@
             },
             },
 
 
             actionInfoMessages: {
             actionInfoMessages: {
-                // # For translations: %1$s will be replaced with the user's nickname
-                // # Don't translate "strong"
-                // # Example: <strong>jcbrand</strong> has been banned
-                301: converse.i18n.translate('<strong>%1$s</strong> has been banned'),
-                // # For translations: %1$s will be replaced with the user's nickname
-                // # Don't translate "strong"
-                // # Example: <strong>jcbrand</strong> has been kicked out
-                307: converse.i18n.translate('<strong>%1$s</strong> has been kicked out'),
-                // # For translations: %1$s will be replaced with the user's nickname
-                // # Don't translate "strong"
-                // # Example: <strong>jcbrand</strong> has been removed because of an affiliasion change
-                321: converse.i18n.translate("<strong>%1$s</strong> has been removed because of an affiliation change"),
-                // # For translations: %1$s will be replaced with the user's nickname
-                // # Don't translate "strong"
-                // # Example: <strong>jcbrand</strong> has been removed for not being a member
-                322: converse.i18n.translate("<strong>%1$s</strong> has been removed for not being a member")
+                /* XXX: Note the triple underscore function and not double
+                 * underscore.
+                 *
+                 * This is a hack. We can't pass the strings to __ because we
+                 * don't yet know what the variable to interpolate is.
+                 *
+                 * Triple underscore will just return the string again, but we
+                 * can then at least tell gettext to scan for it so that these
+                 * strings are picked up by the translation machinery.
+                 */
+                301: ___("<strong>%1$s</strong> has been banned"),
+                307: ___("<strong>%1$s</strong> has been kicked out"),
+                321: ___("<strong>%1$s</strong> has been removed because of an affiliation change"),
+                322: ___("<strong>%1$s</strong> has been removed for not being a member")
             },
             },
 
 
             disconnectMessages: {
             disconnectMessages: {
@@ -1638,9 +1658,8 @@
                             info_msgs.push(this.infoMessages[stat]);
                             info_msgs.push(this.infoMessages[stat]);
                         } else if (_.contains(_.keys(this.actionInfoMessages), stat)) {
                         } else if (_.contains(_.keys(this.actionInfoMessages), stat)) {
                             action_msgs.push(
                             action_msgs.push(
-                                this.actionInfoMessages[stat].fetch(
-                                    Strophe.unescapeNode(Strophe.getResourceFromJid($el.attr('from')))
-                            ));
+                                __(this.actionInfoMessages[stat], Strophe.unescapeNode(Strophe.getResourceFromJid($el.attr('from'))))
+                            );
                         }
                         }
                     }
                     }
                 }
                 }
@@ -1995,13 +2014,14 @@
             },
             },
 
 
             template: _.template(
             template: _.template(
-                '<a class="open-chat" title="'+__('Click to chat with this contact')+'" href="#">{{ fullname }}</a>' +
-                '<span class="icon-{{ chat_status }}" title="{{ status_desc }}"></span>'+
-                '<a class="remove-xmpp-contact" title="'+__('Click to remove this contact')+'" href="#"></a>'),
+                '<a class="open-chat" title="'+__('Click to chat with this contact')+'" href="#">'+
+                    '<span class="icon-{{ chat_status }}" title="{{ status_desc }}"></span>{{ fullname }}'+
+                '</a>' +
+                '<a class="remove-xmpp-contact icon-remove" title="'+__('Click to remove this contact')+'" href="#"></a>'),
 
 
             pending_template: _.template(
             pending_template: _.template(
                 '<span>{{ fullname }}</span>' +
                 '<span>{{ fullname }}</span>' +
-                '<a class="remove-xmpp-contact" title="'+__('Click to remove this contact')+'" href="#"></a>'),
+                '<a class="remove-xmpp-contact icon-remove" title="'+__('Click to remove this contact')+'" href="#"></a>'),
 
 
             request_template: _.template('<div>{{ fullname }}</div>' +
             request_template: _.template('<div>{{ fullname }}</div>' +
                 '<button type="button" class="accept-xmpp-request">' +
                 '<button type="button" class="accept-xmpp-request">' +
@@ -2024,6 +2044,12 @@
                     this.$el.html(this.request_template(item.toJSON()));
                     this.$el.html(this.request_template(item.toJSON()));
                     converse.showControlBox();
                     converse.showControlBox();
                 } else if (subscription === 'both' || subscription === 'to') {
                 } else if (subscription === 'both' || subscription === 'to') {
+                    _.each(['pending-xmpp-contact', 'requesting-xmpp-contact'], 
+                        function (cls) {
+                            if (this.el.className.indexOf(cls) !== -1) {
+                                this.$el.removeClass(cls);
+                            }
+                        }, this);
                     this.$el.addClass('current-xmpp-contact');
                     this.$el.addClass('current-xmpp-contact');
                     var status_desc = {
                     var status_desc = {
                         'dnd': 'This contact is busy',
                         'dnd': 'This contact is busy',
@@ -2391,7 +2417,8 @@
                 var $my_contacts = this.$el.find('#xmpp-contacts'),
                 var $my_contacts = this.$el.find('#xmpp-contacts'),
                     $contact_requests = this.$el.find('#xmpp-contact-requests'),
                     $contact_requests = this.$el.find('#xmpp-contact-requests'),
                     $pending_contacts = this.$el.find('#pending-xmpp-contacts'),
                     $pending_contacts = this.$el.find('#pending-xmpp-contacts'),
-                    $count, presence_change;
+                    sorted = false,
+                    $count, changed_presence;
                 if (item) {
                 if (item) {
                     var jid = item.id,
                     var jid = item.id,
                         view = this.rosteritemviews[item.id],
                         view = this.rosteritemviews[item.id],
@@ -2406,44 +2433,37 @@
                         $contact_requests.after(view.render().el);
                         $contact_requests.after(view.render().el);
                         $contact_requests.after($contact_requests.siblings('dd.requesting-xmpp-contact').tsort(crit));
                         $contact_requests.after($contact_requests.siblings('dd.requesting-xmpp-contact').tsort(crit));
                     } else if (subscription === 'both' || subscription === 'to') {
                     } else if (subscription === 'both' || subscription === 'to') {
-                        if (!item.get('sorted')) {
-                            // this attribute will be true only after all of the elements have been added on the page
-                            // at this point all offline
-                            $my_contacts.after(view.render().el);
-                        }
-                        else {
-                            // just by calling render will be enough to change the icon of the existing item without
-                            // having to reinsert it and the sort will come from the presence change
+                        if ($.contains(document.documentElement, view.el)) {
                             view.render();
                             view.render();
+                        } else {
+                            $my_contacts.after(view.render().el);
                         }
                         }
                     }
                     }
-                    presence_change = view.model.changed.chat_status;
-                    if (presence_change) {
-                        // resort all items only if the model has changed it's chat_status as this render
-                        // is also triggered when the resource is changed which always comes before the presence change
-                        // therefore we avoid resorting when the change doesn't affect the position of the item
-                        $my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.offline').tsort('a', crit));
-                        $my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.unavailable').tsort('a', crit));
-                        $my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.away').tsort('a', crit));
-                        $my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.dnd').tsort('a', crit));
-                        $my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.online').tsort('a', crit));
-                    }
-
-                    if (item.get('is_last') && !item.get('sorted')) {
-                        // this will be true after all of the roster items have been added with the default
-                        // options where all of the items are offline and now we can show the rosterView
-                        item.set('sorted', true);
-                        this.initialSort();
-                        this.$el.show();
+                    changed_presence = view.model.changed.chat_status;
+                    if (changed_presence) {
+                        this.sortRoster(changed_presence)
+                        sorted = true;
+                    } 
+                    if (item.get('is_last')) {
+                        if (!sorted) {
+                            this.sortRoster(item.get('chat_status'));
+                        }
+                        if (!this.$el.is(':visible')) {
+                            // Once all initial roster items have been added, we
+                            // can show the roster.
+                            this.$el.show();
+                        }
                         converse.xmppstatus.sendPresence();
                         converse.xmppstatus.sendPresence();
                     }
                     }
                 }
                 }
                 // Hide the headings if there are no contacts under them
                 // Hide the headings if there are no contacts under them
                 _.each([$my_contacts, $contact_requests, $pending_contacts], function (h) {
                 _.each([$my_contacts, $contact_requests, $pending_contacts], function (h) {
                     if (h.nextUntil('dt').length) {
                     if (h.nextUntil('dt').length) {
-                        h.show();
+                        if (!h.is(':visible')) {
+                            h.show();
+                        }
                     }
                     }
-                    else {
+                    else if (h.is(':visible')) {
                         h.hide();
                         h.hide();
                     }
                     }
                 });
                 });
@@ -2455,11 +2475,14 @@
                 return this;
                 return this;
             },
             },
 
 
-            initialSort: function () {
-                var $my_contacts = this.$el.find('#xmpp-contacts'),
-                    crit = {order:'asc'};
-                $my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.offline').tsort('a', crit));
-                $my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.unavailable').tsort('a', crit));
+            sortRoster: function (chat_status) {
+                var $my_contacts = this.$el.find('#xmpp-contacts');
+                $my_contacts.siblings('dd.current-xmpp-contact.'+chat_status).tsort('a', {order:'asc'});
+                $my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.offline'));
+                $my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.unavailable'));
+                $my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.away'));
+                $my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.dnd'));
+                $my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.online'));
             }
             }
         });
         });
 
 
@@ -2517,6 +2540,13 @@
             setStatusMessage: function (status_message) {
             setStatusMessage: function (status_message) {
                 converse.connection.send($pres().c('show').t(this.get('status')).up().c('status').t(status_message));
                 converse.connection.send($pres().c('show').t(this.get('status')).up().c('status').t(status_message));
                 this.save({'status_message': status_message});
                 this.save({'status_message': status_message});
+                if (this.xhr_custom_status) {
+                    $.ajax({
+                        url: 'set-custom-status',
+                        type: 'POST',
+                        data: {'msg': status_message}
+                    });
+                }
             }
             }
         });
         });
 
 
@@ -2548,7 +2578,7 @@
                         '<span class="icon-{{ chat_status }}"></span>'+
                         '<span class="icon-{{ chat_status }}"></span>'+
                         '{{ status_message }}' +
                         '{{ status_message }}' +
                     '</a>' +
                     '</a>' +
-                    '<a class="change-xmpp-status-message" href="#" title="'+__('Click here to write a custom status message')+'"></a>' +
+                    '<a class="change-xmpp-status-message icon-pencil" href="#" title="'+__('Click here to write a custom status message')+'"></a>' +
                 '</div>'),
                 '</div>'),
 
 
             renderStatusChangeForm: function (ev) {
             renderStatusChangeForm: function (ev) {
@@ -2836,9 +2866,8 @@
             if (this.debug) {
             if (this.debug) {
                 this.connection.xmlInput = function (body) { console.log(body); };
                 this.connection.xmlInput = function (body) { console.log(body); };
                 this.connection.xmlOutput = function (body) { console.log(body); };
                 this.connection.xmlOutput = function (body) { console.log(body); };
-                Strophe.log = function (level, msg) {
-                    console.log(level+' '+msg);
-                };
+                Strophe.log = function (level, msg) { console.log(level+' '+msg); };
+                Strophe.error = function (msg) { console.log('ERROR: '+msg); };
             }
             }
             this.bare_jid = Strophe.getBareJidFromJid(this.connection.jid);
             this.bare_jid = Strophe.getBareJidFromJid(this.connection.jid);
             this.domain = Strophe.getDomainFromJid(this.connection.jid);
             this.domain = Strophe.getDomainFromJid(this.connection.jid);

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
converse.min.css


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 3 - 3
converse.min.js


BIN
docs/doctrees/index.doctree


+ 1 - 1
docs/html/.buildinfo

@@ -1,4 +1,4 @@
 # Sphinx build info version 1
 # Sphinx build info version 1
 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: cc4e774ae6c30c8f75f9540598d47e5a
+config: 4e01f0b4332cc0ad20271406d2d00beb
 tags: fbb0d17656682115ca4d033fb2f83ba1
 tags: fbb0d17656682115ca4d033fb2f83ba1

+ 8 - 0
docs/html/_sources/index.txt

@@ -553,6 +553,14 @@ To minify the Javascript and CSS, run the following command:
 
 
     grunt minify
     grunt minify
 
 
+.. Note ::
+   Since release 0.6.0, I'm using `almond <https://github.com/jrburke/almond>`_
+   instead of `require.js <http://requirejs.org>`_. The
+   `grunt-contrib-requirejs <https://github.com/gruntjs/grunt-contrib-requirejs>`_
+   plugin however doesn't support *almond*. I therefore now build it manually
+   (the old way again), like this: ``r.js -o build.js``. CSS can be minimized
+   separately via ``grunt cssmin``.
+
 Javascript will be bundled and minified via `require.js`_'s optimization tool.
 Javascript will be bundled and minified via `require.js`_'s optimization tool.
 You can `read more about require.js's optimizer here`_.
 You can `read more about require.js's optimizer here`_.
 
 

+ 5 - 5
docs/html/genindex.html

@@ -9,7 +9,7 @@
   <head>
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
     
-    <title>Index &mdash; Converse.js 0.5.3 documentation</title>
+    <title>Index &mdash; Converse.js 0.6.0 documentation</title>
     
     
     <link rel="stylesheet" href="_static/stylesheet.css" type="text/css" />
     <link rel="stylesheet" href="_static/stylesheet.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -17,7 +17,7 @@
     <script type="text/javascript">
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
         URL_ROOT:    '',
-        VERSION:     '0.5.3',
+        VERSION:     '0.6.0',
         COLLAPSE_INDEX: false,
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
         HAS_SOURCE:  true
@@ -26,7 +26,7 @@
     <script type="text/javascript" src="_static/jquery.js"></script>
     <script type="text/javascript" src="_static/jquery.js"></script>
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="top" title="Converse.js 0.5.3 documentation" href="index.html" /> 
+    <link rel="top" title="Converse.js 0.6.0 documentation" href="index.html" /> 
   </head>
   </head>
   <body>
   <body>
     <div id="header_wrap" class="outer">
     <div id="header_wrap" class="outer">
@@ -51,7 +51,7 @@
         <li class="right" style="margin-right: 10px">
         <li class="right" style="margin-right: 10px">
           <a href="#" title="General Index"
           <a href="#" title="General Index"
              accesskey="I">index</a></li>
              accesskey="I">index</a></li>
-        <li><a href="index.html">Converse.js 0.5.3 documentation</a> &raquo;</li> 
+        <li><a href="index.html">Converse.js 0.6.0 documentation</a> &raquo;</li> 
       </ul>
       </ul>
     </div>
     </div>
 <section id="main_content" class="inner">  
 <section id="main_content" class="inner">  
@@ -80,7 +80,7 @@
         <li class="right" style="margin-right: 10px">
         <li class="right" style="margin-right: 10px">
           <a href="#" title="General Index"
           <a href="#" title="General Index"
              >index</a></li>
              >index</a></li>
-        <li><a href="index.html">Converse.js 0.5.3 documentation</a> &raquo;</li> 
+        <li><a href="index.html">Converse.js 0.6.0 documentation</a> &raquo;</li> 
       </ul>
       </ul>
     </div>
     </div>
 </div>
 </div>

+ 82 - 73
docs/html/index.html

@@ -7,7 +7,7 @@
   <head>
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
     
-    <title>Quickstart (to get a demo up and running) &mdash; Converse.js 0.5.3 documentation</title>
+    <title>Quickstart (to get a demo up and running) &mdash; Converse.js 0.6.0 documentation</title>
     
     
     <link rel="stylesheet" href="_static/stylesheet.css" type="text/css" />
     <link rel="stylesheet" href="_static/stylesheet.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -15,7 +15,7 @@
     <script type="text/javascript">
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
         URL_ROOT:    '',
-        VERSION:     '0.5.3',
+        VERSION:     '0.6.0',
         COLLAPSE_INDEX: false,
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
         HAS_SOURCE:  true
@@ -24,7 +24,7 @@
     <script type="text/javascript" src="_static/jquery.js"></script>
     <script type="text/javascript" src="_static/jquery.js"></script>
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="top" title="Converse.js 0.5.3 documentation" href="#" /> 
+    <link rel="top" title="Converse.js 0.6.0 documentation" href="#" /> 
   </head>
   </head>
   <body>
   <body>
     <div id="header_wrap" class="outer">
     <div id="header_wrap" class="outer">
@@ -49,7 +49,7 @@
         <li class="right" style="margin-right: 10px">
         <li class="right" style="margin-right: 10px">
           <a href="genindex.html" title="General Index"
           <a href="genindex.html" title="General Index"
              accesskey="I">index</a></li>
              accesskey="I">index</a></li>
-        <li><a href="#">Converse.js 0.5.3 documentation</a> &raquo;</li> 
+        <li><a href="#">Converse.js 0.6.0 documentation</a> &raquo;</li> 
       </ul>
       </ul>
     </div>
     </div>
 <section id="main_content" class="inner">  
 <section id="main_content" class="inner">  
@@ -65,60 +65,60 @@
 <div class="contents local topic" id="table-of-contents">
 <div class="contents local topic" id="table-of-contents">
 <p class="topic-title first">Table of Contents</p>
 <p class="topic-title first">Table of Contents</p>
 <ul class="simple">
 <ul class="simple">
-<li><a class="reference internal" href="#quickstart-to-get-a-demo-up-and-running" id="id2">Quickstart (to get a demo up and running)</a></li>
-<li><a class="reference internal" href="#introduction" id="id3">Introduction</a></li>
-<li><a class="reference internal" href="#what-you-will-need" id="id4">What you will need</a><ul>
-<li><a class="reference internal" href="#an-xmpp-jabber-server" id="id5">An XMPP/Jabber server</a></li>
-<li><a class="reference internal" href="#connection-manager" id="id6">Connection Manager</a><ul>
-<li><a class="reference internal" href="#overcoming-cross-domain-request-restrictions" id="id7">Overcoming cross-domain request restrictions</a></li>
+<li><a class="reference internal" href="#quickstart-to-get-a-demo-up-and-running" id="id3">Quickstart (to get a demo up and running)</a></li>
+<li><a class="reference internal" href="#introduction" id="id4">Introduction</a></li>
+<li><a class="reference internal" href="#what-you-will-need" id="id5">What you will need</a><ul>
+<li><a class="reference internal" href="#an-xmpp-jabber-server" id="id6">An XMPP/Jabber server</a></li>
+<li><a class="reference internal" href="#connection-manager" id="id7">Connection Manager</a><ul>
+<li><a class="reference internal" href="#overcoming-cross-domain-request-restrictions" id="id8">Overcoming cross-domain request restrictions</a></li>
 </ul>
 </ul>
 </li>
 </li>
-<li><a class="reference internal" href="#server-side-authentication" id="id8">Server-side authentication</a><ul>
-<li><a class="reference internal" href="#pre-binding-and-single-session-support" id="id9">Pre-binding and Single Session Support</a></li>
+<li><a class="reference internal" href="#server-side-authentication" id="id9">Server-side authentication</a><ul>
+<li><a class="reference internal" href="#pre-binding-and-single-session-support" id="id10">Pre-binding and Single Session Support</a></li>
 </ul>
 </ul>
 </li>
 </li>
-<li><a class="reference internal" href="#facebook-integration" id="id10">Facebook integration</a></li>
+<li><a class="reference internal" href="#facebook-integration" id="id11">Facebook integration</a></li>
 </ul>
 </ul>
 </li>
 </li>
-<li><a class="reference internal" href="#development" id="id11">Development</a><ul>
-<li><a class="reference internal" href="#install-node-js-and-development-dependencies" id="id12">Install Node.js and development dependencies</a></li>
-<li><a class="reference internal" href="#install-3rd-party-dependencies" id="id13">Install 3rd party dependencies</a></li>
-<li><a class="reference internal" href="#with-amd-and-require-js-recommended" id="id14">With AMD and require.js (recommended)</a></li>
-<li><a class="reference internal" href="#without-amd-and-require-js" id="id15">Without AMD and require.js</a></li>
-<li><a class="reference internal" href="#before-submitting-a-pull-request" id="id16">Before submitting a pull request</a><ul>
-<li><a class="reference internal" href="#add-tests-for-your-bugfix-or-feature" id="id17">Add tests for your bugfix or feature</a></li>
-<li><a class="reference internal" href="#check-that-the-tests-pass" id="id18">Check that the tests pass</a></li>
-<li><a class="reference internal" href="#check-your-code-for-errors-or-bad-habits-by-running-jshint" id="id19">Check your code for errors or bad habits by running JSHint</a></li>
+<li><a class="reference internal" href="#development" id="id12">Development</a><ul>
+<li><a class="reference internal" href="#install-node-js-and-development-dependencies" id="id13">Install Node.js and development dependencies</a></li>
+<li><a class="reference internal" href="#install-3rd-party-dependencies" id="id14">Install 3rd party dependencies</a></li>
+<li><a class="reference internal" href="#with-amd-and-require-js-recommended" id="id15">With AMD and require.js (recommended)</a></li>
+<li><a class="reference internal" href="#without-amd-and-require-js" id="id16">Without AMD and require.js</a></li>
+<li><a class="reference internal" href="#before-submitting-a-pull-request" id="id17">Before submitting a pull request</a><ul>
+<li><a class="reference internal" href="#add-tests-for-your-bugfix-or-feature" id="id18">Add tests for your bugfix or feature</a></li>
+<li><a class="reference internal" href="#check-that-the-tests-pass" id="id19">Check that the tests pass</a></li>
+<li><a class="reference internal" href="#check-your-code-for-errors-or-bad-habits-by-running-jshint" id="id20">Check your code for errors or bad habits by running JSHint</a></li>
 </ul>
 </ul>
 </li>
 </li>
 </ul>
 </ul>
 </li>
 </li>
-<li><a class="reference internal" href="#configuration" id="id20">Configuration</a><ul>
-<li><a class="reference internal" href="#configuration-variables" id="id21">Configuration variables</a><ul>
-<li><a class="reference internal" href="#animate" id="id22">animate</a></li>
-<li><a class="reference internal" href="#auto-list-rooms" id="id23">auto_list_rooms</a></li>
-<li><a class="reference internal" href="#auto-subscribe" id="id24">auto_subscribe</a></li>
-<li><a class="reference internal" href="#bosh-service-url" id="id25">bosh_service_url</a></li>
-<li><a class="reference internal" href="#debug" id="id26">debug</a></li>
-<li><a class="reference internal" href="#fullname" id="id27">fullname</a></li>
-<li><a class="reference internal" href="#hide-muc-server" id="id28">hide_muc_server</a></li>
-<li><a class="reference internal" href="#i18n" id="id29">i18n</a></li>
-<li><a class="reference internal" href="#prebind" id="id30">prebind</a></li>
-<li><a class="reference internal" href="#show-controlbox-by-default" id="id31">show_controlbox_by_default</a></li>
-<li><a class="reference internal" href="#xhr-user-search" id="id32">xhr_user_search</a></li>
+<li><a class="reference internal" href="#configuration" id="id21">Configuration</a><ul>
+<li><a class="reference internal" href="#configuration-variables" id="id22">Configuration variables</a><ul>
+<li><a class="reference internal" href="#animate" id="id23">animate</a></li>
+<li><a class="reference internal" href="#auto-list-rooms" id="id24">auto_list_rooms</a></li>
+<li><a class="reference internal" href="#auto-subscribe" id="id25">auto_subscribe</a></li>
+<li><a class="reference internal" href="#bosh-service-url" id="id26">bosh_service_url</a></li>
+<li><a class="reference internal" href="#debug" id="id27">debug</a></li>
+<li><a class="reference internal" href="#fullname" id="id28">fullname</a></li>
+<li><a class="reference internal" href="#hide-muc-server" id="id29">hide_muc_server</a></li>
+<li><a class="reference internal" href="#i18n" id="id30">i18n</a></li>
+<li><a class="reference internal" href="#prebind" id="id31">prebind</a></li>
+<li><a class="reference internal" href="#show-controlbox-by-default" id="id32">show_controlbox_by_default</a></li>
+<li><a class="reference internal" href="#xhr-user-search" id="id33">xhr_user_search</a></li>
 </ul>
 </ul>
 </li>
 </li>
 </ul>
 </ul>
 </li>
 </li>
-<li><a class="reference internal" href="#minification" id="id33">Minification</a><ul>
-<li><a class="reference internal" href="#minifying-javascript-and-css" id="id34">Minifying Javascript and CSS</a></li>
+<li><a class="reference internal" href="#minification" id="id34">Minification</a><ul>
+<li><a class="reference internal" href="#minifying-javascript-and-css" id="id35">Minifying Javascript and CSS</a></li>
 </ul>
 </ul>
 </li>
 </li>
-<li><a class="reference internal" href="#translations" id="id35">Translations</a></li>
+<li><a class="reference internal" href="#translations" id="id36">Translations</a></li>
 </ul>
 </ul>
 </div>
 </div>
 <div class="section" id="quickstart-to-get-a-demo-up-and-running">
 <div class="section" id="quickstart-to-get-a-demo-up-and-running">
-<h1><a class="toc-backref" href="#id2">Quickstart (to get a demo up and running)</a><a class="headerlink" href="#quickstart-to-get-a-demo-up-and-running" title="Permalink to this headline">¶</a></h1>
+<h1><a class="toc-backref" href="#id3">Quickstart (to get a demo up and running)</a><a class="headerlink" href="#quickstart-to-get-a-demo-up-and-running" title="Permalink to this headline">¶</a></h1>
 <p>When you download a specific release of <em>Converse.js</em> there will be two minified files inside the zip file.</p>
 <p>When you download a specific release of <em>Converse.js</em> there will be two minified files inside the zip file.</p>
 <ul class="simple">
 <ul class="simple">
 <li>converse.min.js</li>
 <li>converse.min.js</li>
@@ -172,7 +172,7 @@ the minified Javascript file. Read <a class="reference internal" href="#configur
 that.</p>
 that.</p>
 </div>
 </div>
 <div class="section" id="introduction">
 <div class="section" id="introduction">
-<h1><a class="toc-backref" href="#id3">Introduction</a><a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
+<h1><a class="toc-backref" href="#id4">Introduction</a><a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
 <p>Even though you can connect to public XMPP servers on the <a class="reference external" href="http://conversejs.org">conversejs.org</a>
 <p>Even though you can connect to public XMPP servers on the <a class="reference external" href="http://conversejs.org">conversejs.org</a>
 website, <em>Converse.js</em> is not really meant to be a &#8220;Software-as-a-service&#8221; (SaaS)
 website, <em>Converse.js</em> is not really meant to be a &#8220;Software-as-a-service&#8221; (SaaS)
 webchat.</p>
 webchat.</p>
@@ -191,9 +191,9 @@ code.</p>
 requirements.</p>
 requirements.</p>
 </div>
 </div>
 <div class="section" id="what-you-will-need">
 <div class="section" id="what-you-will-need">
-<h1><a class="toc-backref" href="#id4">What you will need</a><a class="headerlink" href="#what-you-will-need" title="Permalink to this headline">¶</a></h1>
+<h1><a class="toc-backref" href="#id5">What you will need</a><a class="headerlink" href="#what-you-will-need" title="Permalink to this headline">¶</a></h1>
 <div class="section" id="an-xmpp-jabber-server">
 <div class="section" id="an-xmpp-jabber-server">
-<h2><a class="toc-backref" href="#id5">An XMPP/Jabber server</a><a class="headerlink" href="#an-xmpp-jabber-server" title="Permalink to this headline">¶</a></h2>
+<h2><a class="toc-backref" href="#id6">An XMPP/Jabber server</a><a class="headerlink" href="#an-xmpp-jabber-server" title="Permalink to this headline">¶</a></h2>
 <p><em>Converse.js</em> implements <a class="reference external" href="https://en.wikipedia.org/wiki/Xmpp">XMPP</a> as its messaging protocol, and therefore needs
 <p><em>Converse.js</em> implements <a class="reference external" href="https://en.wikipedia.org/wiki/Xmpp">XMPP</a> as its messaging protocol, and therefore needs
 to connect to an XMPP/Jabber server (Jabber is really just a synonym for XMPP).</p>
 to connect to an XMPP/Jabber server (Jabber is really just a synonym for XMPP).</p>
 <p>You can connect to public XMPP servers like <tt class="docutils literal"><span class="pre">jabber.org</span></tt> but if you want to
 <p>You can connect to public XMPP servers like <tt class="docutils literal"><span class="pre">jabber.org</span></tt> but if you want to
@@ -202,7 +202,7 @@ have <a class="reference internal" href="#session-support">Session Support</a> y
 servers that you can set up yourself on <a class="reference external" href="http://xmpp.org/xmpp-software/servers/">xmpp.org</a>.</p>
 servers that you can set up yourself on <a class="reference external" href="http://xmpp.org/xmpp-software/servers/">xmpp.org</a>.</p>
 </div>
 </div>
 <div class="section" id="connection-manager">
 <div class="section" id="connection-manager">
-<h2><a class="toc-backref" href="#id6">Connection Manager</a><a class="headerlink" href="#connection-manager" title="Permalink to this headline">¶</a></h2>
+<h2><a class="toc-backref" href="#id7">Connection Manager</a><a class="headerlink" href="#connection-manager" title="Permalink to this headline">¶</a></h2>
 <p>Your website and <em>Converse.js</em> use <a class="reference external" href="https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol">HTTP</a> as protocol to communicate with
 <p>Your website and <em>Converse.js</em> use <a class="reference external" href="https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol">HTTP</a> as protocol to communicate with
 the webserver. HTTP connections are stateless and usually shortlived.</p>
 the webserver. HTTP connections are stateless and usually shortlived.</p>
 <p><a class="reference external" href="https://en.wikipedia.org/wiki/Xmpp">XMPP</a> on the other hand, is the protocol that enables instant messaging, and
 <p><a class="reference external" href="https://en.wikipedia.org/wiki/Xmpp">XMPP</a> on the other hand, is the protocol that enables instant messaging, and
@@ -217,7 +217,7 @@ includes a connection manager (but you have to enable it).</p>
 This connection manager is for testing purposes only, please don&#8217;t use it in
 This connection manager is for testing purposes only, please don&#8217;t use it in
 production.</p>
 production.</p>
 <div class="section" id="overcoming-cross-domain-request-restrictions">
 <div class="section" id="overcoming-cross-domain-request-restrictions">
-<h3><a class="toc-backref" href="#id7">Overcoming cross-domain request restrictions</a><a class="headerlink" href="#overcoming-cross-domain-request-restrictions" title="Permalink to this headline">¶</a></h3>
+<h3><a class="toc-backref" href="#id8">Overcoming cross-domain request restrictions</a><a class="headerlink" href="#overcoming-cross-domain-request-restrictions" title="Permalink to this headline">¶</a></h3>
 <p>The domain of the <em>Converse.js</em> demo is <em>conversejs.org</em>, but the domain of the connection manager is <em>opkode.im</em>.
 <p>The domain of the <em>Converse.js</em> demo is <em>conversejs.org</em>, but the domain of the connection manager is <em>opkode.im</em>.
 HTTP requests are made by <em>Converse.js</em> to the connection manager via XmlHttpRequests (XHR).
 HTTP requests are made by <em>Converse.js</em> to the connection manager via XmlHttpRequests (XHR).
 Until recently, it was not possible to make such requests to a different domain
 Until recently, it was not possible to make such requests to a different domain
@@ -235,9 +235,9 @@ website. This will remove the need for any cross-domain XHR support.</p>
 </div>
 </div>
 </div>
 </div>
 <div class="section" id="server-side-authentication">
 <div class="section" id="server-side-authentication">
-<h2><a class="toc-backref" href="#id8">Server-side authentication</a><a class="headerlink" href="#server-side-authentication" title="Permalink to this headline">¶</a></h2>
+<h2><a class="toc-backref" href="#id9">Server-side authentication</a><a class="headerlink" href="#server-side-authentication" title="Permalink to this headline">¶</a></h2>
 <div class="section" id="pre-binding-and-single-session-support">
 <div class="section" id="pre-binding-and-single-session-support">
-<span id="session-support"></span><h3><a class="toc-backref" href="#id9">Pre-binding and Single Session Support</a><a class="headerlink" href="#pre-binding-and-single-session-support" title="Permalink to this headline">¶</a></h3>
+<span id="session-support"></span><h3><a class="toc-backref" href="#id10">Pre-binding and Single Session Support</a><a class="headerlink" href="#pre-binding-and-single-session-support" title="Permalink to this headline">¶</a></h3>
 <p>It&#8217;s possible to enable single-site login, whereby users already
 <p>It&#8217;s possible to enable single-site login, whereby users already
 authenticated in your website will also automatically be logged in on the chat server,
 authenticated in your website will also automatically be logged in on the chat server,
 but this will require custom code on your server.</p>
 but this will require custom code on your server.</p>
@@ -273,7 +273,7 @@ BOSH connection manager.</p>
 </div>
 </div>
 </div>
 </div>
 <div class="section" id="facebook-integration">
 <div class="section" id="facebook-integration">
-<h2><a class="toc-backref" href="#id10">Facebook integration</a><a class="headerlink" href="#facebook-integration" title="Permalink to this headline">¶</a></h2>
+<h2><a class="toc-backref" href="#id11">Facebook integration</a><a class="headerlink" href="#facebook-integration" title="Permalink to this headline">¶</a></h2>
 <div class="admonition note">
 <div class="admonition note">
 <p class="first admonition-title">Note</p>
 <p class="first admonition-title">Note</p>
 <p class="last">It should be possible to integrate Converse.js with Facebook chat, and
 <p class="last">It should be possible to integrate Converse.js with Facebook chat, and
@@ -316,13 +316,13 @@ Until then, people will have to do this themselves.</p>
 </div>
 </div>
 </div>
 </div>
 <div class="section" id="development">
 <div class="section" id="development">
-<h1><a class="toc-backref" href="#id11">Development</a><a class="headerlink" href="#development" title="Permalink to this headline">¶</a></h1>
+<h1><a class="toc-backref" href="#id12">Development</a><a class="headerlink" href="#development" title="Permalink to this headline">¶</a></h1>
 <p>If you want to work with the non-minified Javascript and CSS files you&#8217;ll soon
 <p>If you want to work with the non-minified Javascript and CSS files you&#8217;ll soon
 notice that there are references to a missing <em>components</em> folder. Please
 notice that there are references to a missing <em>components</em> folder. Please
 follow the instructions below to create this folder and fetch Converse&#8217;s
 follow the instructions below to create this folder and fetch Converse&#8217;s
 3rd-party dependencies.</p>
 3rd-party dependencies.</p>
 <div class="section" id="install-node-js-and-development-dependencies">
 <div class="section" id="install-node-js-and-development-dependencies">
-<h2><a class="toc-backref" href="#id12">Install Node.js and development dependencies</a><a class="headerlink" href="#install-node-js-and-development-dependencies" title="Permalink to this headline">¶</a></h2>
+<h2><a class="toc-backref" href="#id13">Install Node.js and development dependencies</a><a class="headerlink" href="#install-node-js-and-development-dependencies" title="Permalink to this headline">¶</a></h2>
 <p>We use development tools (<a class="reference external" href="http://gruntjs.com">Grunt</a> and <a class="reference external" href="http://bower.io">Bower</a>)
 <p>We use development tools (<a class="reference external" href="http://gruntjs.com">Grunt</a> and <a class="reference external" href="http://bower.io">Bower</a>)
 which depend on Node.js and npm (the Node package manager).</p>
 which depend on Node.js and npm (the Node package manager).</p>
 <p>If you don&#8217;t have Node.js installed, you can download and install the latest
 <p>If you don&#8217;t have Node.js installed, you can download and install the latest
@@ -336,7 +336,7 @@ curious to know what these are, take a look at whats under the <em>devDependenci
 <cite>package.json &lt;https://github.com/jcbrand/converse.js/blob/master/package.json&gt;</cite>.</p>
 <cite>package.json &lt;https://github.com/jcbrand/converse.js/blob/master/package.json&gt;</cite>.</p>
 </div>
 </div>
 <div class="section" id="install-3rd-party-dependencies">
 <div class="section" id="install-3rd-party-dependencies">
-<h2><a class="toc-backref" href="#id13">Install 3rd party dependencies</a><a class="headerlink" href="#install-3rd-party-dependencies" title="Permalink to this headline">¶</a></h2>
+<h2><a class="toc-backref" href="#id14">Install 3rd party dependencies</a><a class="headerlink" href="#install-3rd-party-dependencies" title="Permalink to this headline">¶</a></h2>
 <p>After running <tt class="docutils literal"><span class="pre">npm</span> <span class="pre">install</span></tt>, you will now have Grunt and Bower installed.</p>
 <p>After running <tt class="docutils literal"><span class="pre">npm</span> <span class="pre">install</span></tt>, you will now have Grunt and Bower installed.</p>
 <p>We use Bower to manage Converse&#8217;s front-end dependencies (e.g. Javascript that
 <p>We use Bower to manage Converse&#8217;s front-end dependencies (e.g. Javascript that
 should get loaded in the browser).</p>
 should get loaded in the browser).</p>
@@ -348,7 +348,7 @@ dependencies (like backbone.js, strophe.js etc.) and then put them in the
 <em>components</em> folder.</p>
 <em>components</em> folder.</p>
 </div>
 </div>
 <div class="section" id="with-amd-and-require-js-recommended">
 <div class="section" id="with-amd-and-require-js-recommended">
-<h2><a class="toc-backref" href="#id14">With AMD and require.js (recommended)</a><a class="headerlink" href="#with-amd-and-require-js-recommended" title="Permalink to this headline">¶</a></h2>
+<h2><a class="toc-backref" href="#id15">With AMD and require.js (recommended)</a><a class="headerlink" href="#with-amd-and-require-js-recommended" title="Permalink to this headline">¶</a></h2>
 <p>Converse.js uses <a class="reference external" href="http://requirejs.org">require.js</a> to asynchronously load dependencies.</p>
 <p>Converse.js uses <a class="reference external" href="http://requirejs.org">require.js</a> to asynchronously load dependencies.</p>
 <p>If you want to develop or customize converse.js, you&#8217;ll want to load the
 <p>If you want to develop or customize converse.js, you&#8217;ll want to load the
 non-minified javascript files.</p>
 non-minified javascript files.</p>
@@ -361,7 +361,7 @@ attribute on the <em>script</em> tag), which will in turn cause converse.js to b
 parsed.</p>
 parsed.</p>
 </div>
 </div>
 <div class="section" id="without-amd-and-require-js">
 <div class="section" id="without-amd-and-require-js">
-<h2><a class="toc-backref" href="#id15">Without AMD and require.js</a><a class="headerlink" href="#without-amd-and-require-js" title="Permalink to this headline">¶</a></h2>
+<h2><a class="toc-backref" href="#id16">Without AMD and require.js</a><a class="headerlink" href="#without-amd-and-require-js" title="Permalink to this headline">¶</a></h2>
 <p>Converse.js can also be used without require.js. If you for some reason prefer
 <p>Converse.js can also be used without require.js. If you for some reason prefer
 to use it this way, please refer to
 to use it this way, please refer to
 <a class="reference external" href="https://github.com/jcbrand/converse.js/blob/master/non_amd.html">non_amd.html</a>
 <a class="reference external" href="https://github.com/jcbrand/converse.js/blob/master/non_amd.html">non_amd.html</a>
@@ -369,9 +369,9 @@ for an example of how and in what order all the Javascript files that converse.j
 depends on need to be loaded.</p>
 depends on need to be loaded.</p>
 </div>
 </div>
 <div class="section" id="before-submitting-a-pull-request">
 <div class="section" id="before-submitting-a-pull-request">
-<h2><a class="toc-backref" href="#id16">Before submitting a pull request</a><a class="headerlink" href="#before-submitting-a-pull-request" title="Permalink to this headline">¶</a></h2>
+<h2><a class="toc-backref" href="#id17">Before submitting a pull request</a><a class="headerlink" href="#before-submitting-a-pull-request" title="Permalink to this headline">¶</a></h2>
 <div class="section" id="add-tests-for-your-bugfix-or-feature">
 <div class="section" id="add-tests-for-your-bugfix-or-feature">
-<h3><a class="toc-backref" href="#id17">Add tests for your bugfix or feature</a><a class="headerlink" href="#add-tests-for-your-bugfix-or-feature" title="Permalink to this headline">¶</a></h3>
+<h3><a class="toc-backref" href="#id18">Add tests for your bugfix or feature</a><a class="headerlink" href="#add-tests-for-your-bugfix-or-feature" title="Permalink to this headline">¶</a></h3>
 <p>Add a test for any bug fixed or feature added. We use Jasmine
 <p>Add a test for any bug fixed or feature added. We use Jasmine
 for testing.</p>
 for testing.</p>
 <p>Take a look at <tt class="docutils literal"><span class="pre">tests.html</span></tt> and <tt class="docutils literal"><span class="pre">spec/MainSpec.js</span></tt> to see how
 <p>Take a look at <tt class="docutils literal"><span class="pre">tests.html</span></tt> and <tt class="docutils literal"><span class="pre">spec/MainSpec.js</span></tt> to see how
@@ -380,7 +380,7 @@ the tests are implemented.</p>
 <a class="reference external" href="http://opkode.com/contact">contact me</a> and I&#8217;ll be happy to help.</p>
 <a class="reference external" href="http://opkode.com/contact">contact me</a> and I&#8217;ll be happy to help.</p>
 </div>
 </div>
 <div class="section" id="check-that-the-tests-pass">
 <div class="section" id="check-that-the-tests-pass">
-<h3><a class="toc-backref" href="#id18">Check that the tests pass</a><a class="headerlink" href="#check-that-the-tests-pass" title="Permalink to this headline">¶</a></h3>
+<h3><a class="toc-backref" href="#id19">Check that the tests pass</a><a class="headerlink" href="#check-that-the-tests-pass" title="Permalink to this headline">¶</a></h3>
 <p>Check that the Jasmine tests complete sucessfully. Open
 <p>Check that the Jasmine tests complete sucessfully. Open
 <a class="reference external" href="https://github.com/jcbrand/converse.js/blob/master/tests.html">tests.html</a>
 <a class="reference external" href="https://github.com/jcbrand/converse.js/blob/master/tests.html">tests.html</a>
 in your browser, and the tests will run automatically.</p>
 in your browser, and the tests will run automatically.</p>
@@ -389,7 +389,7 @@ in your browser, and the tests will run automatically.</p>
 </div>
 </div>
 </div>
 </div>
 <div class="section" id="check-your-code-for-errors-or-bad-habits-by-running-jshint">
 <div class="section" id="check-your-code-for-errors-or-bad-habits-by-running-jshint">
-<h3><a class="toc-backref" href="#id19">Check your code for errors or bad habits by running JSHint</a><a class="headerlink" href="#check-your-code-for-errors-or-bad-habits-by-running-jshint" title="Permalink to this headline">¶</a></h3>
+<h3><a class="toc-backref" href="#id20">Check your code for errors or bad habits by running JSHint</a><a class="headerlink" href="#check-your-code-for-errors-or-bad-habits-by-running-jshint" title="Permalink to this headline">¶</a></h3>
 <p><a class="reference external" href="http://jshint.com">JSHint</a> will do a static analysis of your code and hightlight potential errors
 <p><a class="reference external" href="http://jshint.com">JSHint</a> will do a static analysis of your code and hightlight potential errors
 and/or bad habits.</p>
 and/or bad habits.</p>
 <div class="highlight-python"><pre>grunt jshint</pre>
 <div class="highlight-python"><pre>grunt jshint</pre>
@@ -401,7 +401,7 @@ and/or bad habits.</p>
 </div>
 </div>
 </div>
 </div>
 <div class="section" id="configuration">
 <div class="section" id="configuration">
-<h1><a class="toc-backref" href="#id20">Configuration</a><a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h1>
+<h1><a class="toc-backref" href="#id21">Configuration</a><a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h1>
 <p>The included minified JS and CSS files can be used for demoing or testing, but
 <p>The included minified JS and CSS files can be used for demoing or testing, but
 you&#8217;ll want to configure <em>Converse.js</em> to suit your needs before you deploy it
 you&#8217;ll want to configure <em>Converse.js</em> to suit your needs before you deploy it
 on your website.</p>
 on your website.</p>
@@ -415,14 +415,14 @@ all the available configuration settings.</p>
 JS file so that it will include the new settings. Please refer to the
 JS file so that it will include the new settings. Please refer to the
 <a class="reference internal" href="#minification">Minification</a> section for more info on how to do this.</p>
 <a class="reference internal" href="#minification">Minification</a> section for more info on how to do this.</p>
 <div class="section" id="configuration-variables">
 <div class="section" id="configuration-variables">
-<h2><a class="toc-backref" href="#id21">Configuration variables</a><a class="headerlink" href="#configuration-variables" title="Permalink to this headline">¶</a></h2>
+<h2><a class="toc-backref" href="#id22">Configuration variables</a><a class="headerlink" href="#configuration-variables" title="Permalink to this headline">¶</a></h2>
 <div class="section" id="animate">
 <div class="section" id="animate">
-<h3><a class="toc-backref" href="#id22">animate</a><a class="headerlink" href="#animate" title="Permalink to this headline">¶</a></h3>
+<h3><a class="toc-backref" href="#id23">animate</a><a class="headerlink" href="#animate" title="Permalink to this headline">¶</a></h3>
 <p>Default = True</p>
 <p>Default = True</p>
 <p>Show animations, for example when opening and closing chat boxes.</p>
 <p>Show animations, for example when opening and closing chat boxes.</p>
 </div>
 </div>
 <div class="section" id="auto-list-rooms">
 <div class="section" id="auto-list-rooms">
-<h3><a class="toc-backref" href="#id23">auto_list_rooms</a><a class="headerlink" href="#auto-list-rooms" title="Permalink to this headline">¶</a></h3>
+<h3><a class="toc-backref" href="#id24">auto_list_rooms</a><a class="headerlink" href="#auto-list-rooms" title="Permalink to this headline">¶</a></h3>
 <p>Default = False</p>
 <p>Default = False</p>
 <p>If true, and the XMPP server on which the current user is logged in supports
 <p>If true, and the XMPP server on which the current user is logged in supports
 multi-user chat, then a list of rooms on that server will be fetched.</p>
 multi-user chat, then a list of rooms on that server will be fetched.</p>
@@ -432,39 +432,39 @@ features, number of occupants etc.), so on servers with many rooms this
 option will create lots of extra connection traffic.</p>
 option will create lots of extra connection traffic.</p>
 </div>
 </div>
 <div class="section" id="auto-subscribe">
 <div class="section" id="auto-subscribe">
-<h3><a class="toc-backref" href="#id24">auto_subscribe</a><a class="headerlink" href="#auto-subscribe" title="Permalink to this headline">¶</a></h3>
+<h3><a class="toc-backref" href="#id25">auto_subscribe</a><a class="headerlink" href="#auto-subscribe" title="Permalink to this headline">¶</a></h3>
 <p>Default = False</p>
 <p>Default = False</p>
 <p>If true, the user will automatically subscribe back to any contact requests.</p>
 <p>If true, the user will automatically subscribe back to any contact requests.</p>
 </div>
 </div>
 <div class="section" id="bosh-service-url">
 <div class="section" id="bosh-service-url">
-<h3><a class="toc-backref" href="#id25">bosh_service_url</a><a class="headerlink" href="#bosh-service-url" title="Permalink to this headline">¶</a></h3>
+<h3><a class="toc-backref" href="#id26">bosh_service_url</a><a class="headerlink" href="#bosh-service-url" title="Permalink to this headline">¶</a></h3>
 <p>Connections to an XMPP server depend on a BOSH connection manager which acts as
 <p>Connections to an XMPP server depend on a BOSH connection manager which acts as
 a middle man between HTTP and XMPP.</p>
 a middle man between HTTP and XMPP.</p>
 <p>See <a class="reference external" href="http://metajack.im/2008/09/08/which-bosh-server-do-you-need">here</a> for more information.</p>
 <p>See <a class="reference external" href="http://metajack.im/2008/09/08/which-bosh-server-do-you-need">here</a> for more information.</p>
 </div>
 </div>
 <div class="section" id="debug">
 <div class="section" id="debug">
-<h3><a class="toc-backref" href="#id26">debug</a><a class="headerlink" href="#debug" title="Permalink to this headline">¶</a></h3>
+<h3><a class="toc-backref" href="#id27">debug</a><a class="headerlink" href="#debug" title="Permalink to this headline">¶</a></h3>
 <p>If set to true, debugging output will be logged to the browser console.</p>
 <p>If set to true, debugging output will be logged to the browser console.</p>
 </div>
 </div>
 <div class="section" id="fullname">
 <div class="section" id="fullname">
-<h3><a class="toc-backref" href="#id27">fullname</a><a class="headerlink" href="#fullname" title="Permalink to this headline">¶</a></h3>
+<h3><a class="toc-backref" href="#id28">fullname</a><a class="headerlink" href="#fullname" title="Permalink to this headline">¶</a></h3>
 <p>If you are using prebinding, can specify the fullname of the currently
 <p>If you are using prebinding, can specify the fullname of the currently
 logged in user, otherwise the user&#8217;s vCard will be fetched.</p>
 logged in user, otherwise the user&#8217;s vCard will be fetched.</p>
 </div>
 </div>
 <div class="section" id="hide-muc-server">
 <div class="section" id="hide-muc-server">
-<h3><a class="toc-backref" href="#id28">hide_muc_server</a><a class="headerlink" href="#hide-muc-server" title="Permalink to this headline">¶</a></h3>
+<h3><a class="toc-backref" href="#id29">hide_muc_server</a><a class="headerlink" href="#hide-muc-server" title="Permalink to this headline">¶</a></h3>
 <p>Default = false</p>
 <p>Default = false</p>
 <p>Hide the <tt class="docutils literal"><span class="pre">server</span></tt> input field of the form inside the <tt class="docutils literal"><span class="pre">Room</span></tt> panel of the
 <p>Hide the <tt class="docutils literal"><span class="pre">server</span></tt> input field of the form inside the <tt class="docutils literal"><span class="pre">Room</span></tt> panel of the
 controlbox. Useful if you want to restrict users to a specific XMPP server of
 controlbox. Useful if you want to restrict users to a specific XMPP server of
 your choosing.</p>
 your choosing.</p>
 </div>
 </div>
 <div class="section" id="i18n">
 <div class="section" id="i18n">
-<h3><a class="toc-backref" href="#id29">i18n</a><a class="headerlink" href="#i18n" title="Permalink to this headline">¶</a></h3>
+<h3><a class="toc-backref" href="#id30">i18n</a><a class="headerlink" href="#i18n" title="Permalink to this headline">¶</a></h3>
 <p>Specify the locale/language. The language must be in the <tt class="docutils literal"><span class="pre">locales</span></tt> object. Refer to
 <p>Specify the locale/language. The language must be in the <tt class="docutils literal"><span class="pre">locales</span></tt> object. Refer to
 <tt class="docutils literal"><span class="pre">./locale/locales.js</span></tt> to see which locales are supported.</p>
 <tt class="docutils literal"><span class="pre">./locale/locales.js</span></tt> to see which locales are supported.</p>
 </div>
 </div>
 <div class="section" id="prebind">
 <div class="section" id="prebind">
-<h3><a class="toc-backref" href="#id30">prebind</a><a class="headerlink" href="#prebind" title="Permalink to this headline">¶</a></h3>
+<h3><a class="toc-backref" href="#id31">prebind</a><a class="headerlink" href="#prebind" title="Permalink to this headline">¶</a></h3>
 <p>Default = false</p>
 <p>Default = false</p>
 <p>Use this option when you want to attach to an existing XMPP connection that was
 <p>Use this option when you want to attach to an existing XMPP connection that was
 already authenticated (usually on the backend before page load).</p>
 already authenticated (usually on the backend before page load).</p>
@@ -477,7 +477,7 @@ values as <tt class="docutils literal"><span class="pre">jid</span></tt>, <tt cl
 <p>Additionally, you have to specify <tt class="docutils literal"><span class="pre">bosh_service_url</span></tt>.</p>
 <p>Additionally, you have to specify <tt class="docutils literal"><span class="pre">bosh_service_url</span></tt>.</p>
 </div>
 </div>
 <div class="section" id="show-controlbox-by-default">
 <div class="section" id="show-controlbox-by-default">
-<h3><a class="toc-backref" href="#id31">show_controlbox_by_default</a><a class="headerlink" href="#show-controlbox-by-default" title="Permalink to this headline">¶</a></h3>
+<h3><a class="toc-backref" href="#id32">show_controlbox_by_default</a><a class="headerlink" href="#show-controlbox-by-default" title="Permalink to this headline">¶</a></h3>
 <p>Default = false</p>
 <p>Default = false</p>
 <p>The &#8220;controlbox&#8221; refers to the special chatbox containing your contacts roster,
 <p>The &#8220;controlbox&#8221; refers to the special chatbox containing your contacts roster,
 status widget, chatrooms and other controls.</p>
 status widget, chatrooms and other controls.</p>
@@ -487,7 +487,7 @@ the page with class <em>toggle-online-users</em>.</p>
 page load.</p>
 page load.</p>
 </div>
 </div>
 <div class="section" id="xhr-user-search">
 <div class="section" id="xhr-user-search">
-<h3><a class="toc-backref" href="#id32">xhr_user_search</a><a class="headerlink" href="#xhr-user-search" title="Permalink to this headline">¶</a></h3>
+<h3><a class="toc-backref" href="#id33">xhr_user_search</a><a class="headerlink" href="#xhr-user-search" title="Permalink to this headline">¶</a></h3>
 <p>Default = False</p>
 <p>Default = False</p>
 <p>There are two ways to add users.</p>
 <p>There are two ways to add users.</p>
 <ul class="simple">
 <ul class="simple">
@@ -500,9 +500,9 @@ be used.</p>
 </div>
 </div>
 </div>
 </div>
 <div class="section" id="minification">
 <div class="section" id="minification">
-<h1><a class="toc-backref" href="#id33">Minification</a><a class="headerlink" href="#minification" title="Permalink to this headline">¶</a></h1>
+<h1><a class="toc-backref" href="#id34">Minification</a><a class="headerlink" href="#minification" title="Permalink to this headline">¶</a></h1>
 <div class="section" id="minifying-javascript-and-css">
 <div class="section" id="minifying-javascript-and-css">
-<h2><a class="toc-backref" href="#id34">Minifying Javascript and CSS</a><a class="headerlink" href="#minifying-javascript-and-css" title="Permalink to this headline">¶</a></h2>
+<h2><a class="toc-backref" href="#id35">Minifying Javascript and CSS</a><a class="headerlink" href="#minifying-javascript-and-css" title="Permalink to this headline">¶</a></h2>
 <p>Please make sure to read the section <a class="reference internal" href="#development">Development</a> and that you have installed
 <p>Please make sure to read the section <a class="reference internal" href="#development">Development</a> and that you have installed
 all development dependencies (long story short, you can run <tt class="docutils literal"><span class="pre">npm</span> <span class="pre">install</span></tt>
 all development dependencies (long story short, you can run <tt class="docutils literal"><span class="pre">npm</span> <span class="pre">install</span></tt>
 and then <tt class="docutils literal"><span class="pre">grunt</span> <span class="pre">fetch</span></tt>).</p>
 and then <tt class="docutils literal"><span class="pre">grunt</span> <span class="pre">fetch</span></tt>).</p>
@@ -512,13 +512,22 @@ production site.</p>
 <p>To minify the Javascript and CSS, run the following command:</p>
 <p>To minify the Javascript and CSS, run the following command:</p>
 <div class="highlight-python"><pre>grunt minify</pre>
 <div class="highlight-python"><pre>grunt minify</pre>
 </div>
 </div>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">Since release 0.6.0, I&#8217;m using <a class="reference external" href="https://github.com/jrburke/almond">almond</a>
+instead of <a class="reference external" href="http://requirejs.org">require.js</a>. The
+<a class="reference external" href="https://github.com/gruntjs/grunt-contrib-requirejs">grunt-contrib-requirejs</a>
+plugin however doesn&#8217;t support <em>almond</em>. I therefore now build it manually
+(the old way again), like this: <tt class="docutils literal"><span class="pre">r.js</span> <span class="pre">-o</span> <span class="pre">build.js</span></tt>. CSS can be minimized
+separately via <tt class="docutils literal"><span class="pre">grunt</span> <span class="pre">cssmin</span></tt>.</p>
+</div>
 <p>Javascript will be bundled and minified via <a class="reference external" href="http://requirejs.org">require.js</a>&#8216;s optimization tool.
 <p>Javascript will be bundled and minified via <a class="reference external" href="http://requirejs.org">require.js</a>&#8216;s optimization tool.
 You can <a class="reference external" href="http://requirejs.org/docs/optimization.html">read more about require.js&#8217;s optimizer here</a>.</p>
 You can <a class="reference external" href="http://requirejs.org/docs/optimization.html">read more about require.js&#8217;s optimizer here</a>.</p>
 <p>CSS is minified via <a class="reference external" href="https://github.com/gruntjs/grunt-contrib-cssmin">cssmin</a>.</p>
 <p>CSS is minified via <a class="reference external" href="https://github.com/gruntjs/grunt-contrib-cssmin">cssmin</a>.</p>
 </div>
 </div>
 </div>
 </div>
 <div class="section" id="translations">
 <div class="section" id="translations">
-<h1><a class="toc-backref" href="#id35">Translations</a><a class="headerlink" href="#translations" title="Permalink to this headline">¶</a></h1>
+<h1><a class="toc-backref" href="#id36">Translations</a><a class="headerlink" href="#translations" title="Permalink to this headline">¶</a></h1>
 <div class="admonition note">
 <div class="admonition note">
 <p class="first admonition-title">Note</p>
 <p class="first admonition-title">Note</p>
 <p class="last">Translations take up a lot of space and will bloat your minified file.
 <p class="last">Translations take up a lot of space and will bloat your minified file.
@@ -604,7 +613,7 @@ those hoops you had to jump through.</p>
         <li class="right" style="margin-right: 10px">
         <li class="right" style="margin-right: 10px">
           <a href="genindex.html" title="General Index"
           <a href="genindex.html" title="General Index"
              >index</a></li>
              >index</a></li>
-        <li><a href="#">Converse.js 0.5.3 documentation</a> &raquo;</li> 
+        <li><a href="#">Converse.js 0.6.0 documentation</a> &raquo;</li> 
       </ul>
       </ul>
     </div>
     </div>
 </div>
 </div>

+ 1 - 1
docs/html/objects.inv

@@ -1,6 +1,6 @@
 # Sphinx inventory version 2
 # Sphinx inventory version 2
 # Project: Converse.js
 # Project: Converse.js
-# Version: 0.5.3
+# Version: 0.6.0
 # The remainder of this file is compressed using zlib.
 # The remainder of this file is compressed using zlib.
 xÚmÎÁ
 xÚmÎÁ
 à à{Ÿ"°³ƒ]÷;
 à à{Ÿ"°³ƒ]÷;

+ 5 - 5
docs/html/search.html

@@ -7,7 +7,7 @@
   <head>
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
     
-    <title>Search &mdash; Converse.js 0.5.3 documentation</title>
+    <title>Search &mdash; Converse.js 0.6.0 documentation</title>
     
     
     <link rel="stylesheet" href="_static/stylesheet.css" type="text/css" />
     <link rel="stylesheet" href="_static/stylesheet.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -15,7 +15,7 @@
     <script type="text/javascript">
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
         URL_ROOT:    '',
-        VERSION:     '0.5.3',
+        VERSION:     '0.6.0',
         COLLAPSE_INDEX: false,
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
         HAS_SOURCE:  true
@@ -25,7 +25,7 @@
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/searchtools.js"></script>
     <script type="text/javascript" src="_static/searchtools.js"></script>
-    <link rel="top" title="Converse.js 0.5.3 documentation" href="index.html" />
+    <link rel="top" title="Converse.js 0.6.0 documentation" href="index.html" />
   <script type="text/javascript">
   <script type="text/javascript">
     jQuery(function() { Search.loadIndex("searchindex.js"); });
     jQuery(function() { Search.loadIndex("searchindex.js"); });
   </script>
   </script>
@@ -55,7 +55,7 @@
         <li class="right" style="margin-right: 10px">
         <li class="right" style="margin-right: 10px">
           <a href="genindex.html" title="General Index"
           <a href="genindex.html" title="General Index"
              accesskey="I">index</a></li>
              accesskey="I">index</a></li>
-        <li><a href="index.html">Converse.js 0.5.3 documentation</a> &raquo;</li> 
+        <li><a href="index.html">Converse.js 0.6.0 documentation</a> &raquo;</li> 
       </ul>
       </ul>
     </div>
     </div>
 <section id="main_content" class="inner">  
 <section id="main_content" class="inner">  
@@ -100,7 +100,7 @@
         <li class="right" style="margin-right: 10px">
         <li class="right" style="margin-right: 10px">
           <a href="genindex.html" title="General Index"
           <a href="genindex.html" title="General Index"
              >index</a></li>
              >index</a></li>
-        <li><a href="index.html">Converse.js 0.5.3 documentation</a> &raquo;</li> 
+        <li><a href="index.html">Converse.js 0.6.0 documentation</a> &raquo;</li> 
       </ul>
       </ul>
     </div>
     </div>
 </div>
 </div>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
docs/html/searchindex.js


+ 2 - 2
docs/source/conf.py

@@ -48,9 +48,9 @@ copyright = u'2013, JC Brand'
 # built documents.
 # built documents.
 #
 #
 # The short X.Y version.
 # The short X.Y version.
-version = '0.6.0'
+version = '0.6.2'
 # The full version, including alpha/beta/rc tags.
 # The full version, including alpha/beta/rc tags.
-release = '0.6.0'
+release = '0.6.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.

+ 8 - 0
docs/source/index.rst

@@ -553,6 +553,14 @@ To minify the Javascript and CSS, run the following command:
 
 
     grunt minify
     grunt minify
 
 
+.. Note ::
+   Since release 0.6.0, I'm using `almond <https://github.com/jrburke/almond>`_
+   instead of `require.js <http://requirejs.org>`_. The
+   `grunt-contrib-requirejs <https://github.com/gruntjs/grunt-contrib-requirejs>`_
+   plugin however doesn't support *almond*. I therefore now build it manually
+   (the old way again), like this: ``r.js -o build.js``. CSS can be minimized
+   separately via ``grunt cssmin``.
+
 Javascript will be bundled and minified via `require.js`_'s optimization tool.
 Javascript will be bundled and minified via `require.js`_'s optimization tool.
 You can `read more about require.js's optimizer here`_.
 You can `read more about require.js's optimizer here`_.
 
 

+ 55 - 22
index.html

@@ -7,6 +7,7 @@
     <link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">
     <link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">
     <link rel="stylesheet" type="text/css" media="screen" href="converse.css">
     <link rel="stylesheet" type="text/css" media="screen" href="converse.css">
     <script data-main="main" src="components/requirejs/require.js"></script>
     <script data-main="main" src="components/requirejs/require.js"></script>
+    <!-- <script src="converse.min.js"></script>-->
     <title>Converse.js</title>
     <title>Converse.js</title>
 </head>
 </head>
 
 
@@ -18,8 +19,8 @@
         <h1 id="project_title"><a href="http://conversejs.org">Converse.js</a></h1>
         <h1 id="project_title"><a href="http://conversejs.org">Converse.js</a></h1>
         <h2 id="project_tagline">An XMPP chat client for your website</h2>
         <h2 id="project_tagline">An XMPP chat client for your website</h2>
         <section id="downloads">
         <section id="downloads">
-            <a class="zip_download_link" href="https://github.com/jcbrand/converse.js/archive/v0.5.2.zip">Download the latest release as a .zip file</a>
-            <a class="tar_download_link" href="https://github.com/jcbrand/converse.js/archive/v0.5.2.tar.gz">Download the latest release as a tar.gz file</a>
+            <a class="zip_download_link" href="https://github.com/jcbrand/converse.js/archive/v0.6.2.zip">Download the latest release as a .zip file</a>
+            <a class="tar_download_link" href="https://github.com/jcbrand/converse.js/archive/v0.6.2.tar.gz">Download the latest release as a tar.gz file</a>
         </section>
         </section>
     </header>
     </header>
     </div>
     </div>
@@ -35,18 +36,10 @@
 
 
     <p><em>Converse.js</em> can connect to any accessible <a href="http://xmpp.org" target="_blank">XMPP/Jabber</a> server, either from a public provider such as <a href="http://jabber.org">jabber.org</a>, or to one you have set up yourself.</p>
     <p><em>Converse.js</em> can connect to any accessible <a href="http://xmpp.org" target="_blank">XMPP/Jabber</a> server, either from a public provider such as <a href="http://jabber.org">jabber.org</a>, or to one you have set up yourself.</p>
 
 
-    <p>It's possible to enable single-site login, whereby users already authenticated in your website will also automatically be logged in on the chat server,
+    <p>It's possible to enable single-site-login, whereby users already authenticated in your website will also automatically be logged in on the chat server,
     but you will have to pre-authenticate them on your server. You can refer to the <a href="/docs/html/index.html">documentation</a> for more
     but you will have to pre-authenticate them on your server. You can refer to the <a href="/docs/html/index.html">documentation</a> for more
     info.</p>
     info.</p>
 
 
-    <p>An <a href="http://github.com/collective/collective.xmpp.chat" target="_blank">add-on product</a> that does exactly this,
-    already exists for the <a href="http://plone.org" target="_blank">Plone</a> CMS. Hopefully in the future more such add-ons will
-    be created for other platforms.
-   </p>
-
-    <p>If you have integrated <em>Converse.js</em> into any other CMS or framework,
-    <a href="http://opkode.com/contact.html" target="_blank">please let me know</a> and I'll mention it on this page.</p>
-
     <h2>Features</h2>
     <h2>Features</h2>
     <ul>
     <ul>
         <li>Single-user chat</li>
         <li>Single-user chat</li>
@@ -61,7 +54,7 @@
         <li>Custom status messages</li>
         <li>Custom status messages</li>
         <li>Typing notifications</li>
         <li>Typing notifications</li>
         <li>Third person messages (/me )</li>
         <li>Third person messages (/me )</li>
-        <li>Translated into multiple languages  (af, de, es, it, pt_BR)</li>
+        <li>Translated into multiple languages  (af, de, es, it, pt-BR)</li>
     </ul>
     </ul>
 
 
     <h2>Screencasts</h2>
     <h2>Screencasts</h2>
@@ -74,6 +67,30 @@
         </li>
         </li>
     </ul>
     </ul>
 
 
+
+    <h2>Integration into other frameworks</h2>
+
+    <ul>
+        <li><h4><a href="http://plone.org" target="_blank">Plone</a></h4>
+            <strong><a href="http://github.com/collective/collective.xmpp.chat" target="_blank">collective.xmpp.chat</a></strong>
+            is an add-on for Plone that uses <em>Converse.js</em>.
+            Together with <a href="http://github.com/collective/collective.xmpp.core" target="_blank">collective.xmpp.core</a>, it provides for single-signon-support (SSO)
+            and also enables you to manually or automatically
+            register your Plone users onto your XMPP server.
+        </li>
+        <li><h4><a href="http://www.djangoproject.com" target="_blank">Django</a></h4>
+            <strong><a href="https://pypi.python.org/pypi/django-conversejs" target="_blank">django-conversejs</a></strong> is an app that makes it easer to integrate <em>Converse.js</em>
+            into Django. It adds single-signon-support (SSO) support and a database model to store XMPP credentials.
+        </li>
+        <li><h4><a href="http://roundcube.net" target="_blank">Roundcube</a></h4>
+            <strong><a href="https://github.com/priyadi/roundcube-converse.js-xmpp-plugin" target="_blank">roundcube-converse.js-xmpp-plugin</a></strong>
+            is a plugin for Roundcube Webmail. It's README states that it's still a work in progress.
+        </li>
+    </ul>
+
+    <p>If you have integrated <em>Converse.js</em> into any other CMS or framework,
+    <a href="http://opkode.com/contact.html" target="_blank">please let me know</a> and I'll mention it on this page.</p>
+
     <h2>Demo</h2>
     <h2>Demo</h2>
     <p>You can log in with any existing XMPP account. There is also a list of public XMPP providers on <a href="http://xmpp.net" target="_blank">xmpp.net</a>.</p>
     <p>You can log in with any existing XMPP account. There is also a list of public XMPP providers on <a href="http://xmpp.net" target="_blank">xmpp.net</a>.</p>
     <p><em><strong>Note:</strong> currently the demo doesn't work in Internet Explorer older
     <p><em><strong>Note:</strong> currently the demo doesn't work in Internet Explorer older
@@ -83,10 +100,29 @@
     See <a href="/docs/html/index.html#overcoming-cross-domain-request-restrictions" target="_blank">here</a> for more information.</p></em>
     See <a href="/docs/html/index.html#overcoming-cross-domain-request-restrictions" target="_blank">here</a> for more information.</p></em>
 
 
     <h3>Is it secure?</h3>
     <h3>Is it secure?</h3>
-    <p>Yes. In this demo <em>Converse.js</em> makes an
-    <a href="https://en.wikipedia.org/wiki/Secure_Sockets_Layer" target="_blank">SSL</a> encrypted connection to a secure connection manager. 
-    The connection manager then uses SSL and <a href="https://en.wikipedia.org/wiki/Transport_Layer_Security">TLS</a> to connect to an XMPP server.</p>
-    That said, the developers don't assume any liability for any loss or damages as a result of using this software or demo. Use this demo at your own risk. 
+    <p>
+        Yes, as long as you can trust that the Javascript being downloaded is
+        not being tampered with. This page itself is served by Github and is not <a href="https://en.wikipedia.org/wiki/Transport_Layer_Security">TLS/TLS</a>
+        encrypted (i.e. served via <a href="https://en.wikipedia.org/wiki/HTTPS">HTTPS</a>). 
+        I don't know how probable it is that Github served pages could be hacked to
+        insert malicious Javascript.
+    </p>
+    <p>
+        Ideally you'd want your site to be served encrypted via HTTPS. 
+        In this case, use with caution. You can of course go
+        download the source from Github and run this page locally, removing
+        the attack vector altogether.
+    </p>
+    <p> 
+        <em>Converse.js</em> itself makes encrypted HTTPS requests to a <em>connection manager</em>, which will make an 
+        SSL/TLS encrypted connection to an XMPP server (if the server supports it).
+    </p>
+    <p>
+        Logging in happens via <a href="https://en.wikipedia.org/wiki/Simple_Authentication_and_Security_Layer">SASL</a>.
+    </p>
+    <p>
+        That said, the developers don't assume any liability for any loss or damages as a result of using this software or demo. Use at your own risk. 
+    </p>
 
 
     <h3>Session support</h3>
     <h3>Session support</h3>
     <p>
     <p>
@@ -119,19 +155,16 @@
         <li><a href="http://backbonejs.org" target="_blank">backbone.js</a></li>
         <li><a href="http://backbonejs.org" target="_blank">backbone.js</a></li>
         <li><a href="http://requirejs.org" target="_blank">require.js</a> (optional dependency)</li>
         <li><a href="http://requirejs.org" target="_blank">require.js</a> (optional dependency)</li>
     </ul>
     </ul>
-    <p>Some images were taken from <a href="http://plone.org" target="_blank">Plone</a> and the
-    <a href="http://openiconlibrary.sourceforge.net" target="_blank">Open Icon Library</a>.
 
 
     <h2>Licence</h2>
     <h2>Licence</h2>
     <p><strong>Converse.js</strong> is released under both the <a href="http://opensource.org/licenses/mit-license.php" target="_blank">MIT</a> 
     <p><strong>Converse.js</strong> is released under both the <a href="http://opensource.org/licenses/mit-license.php" target="_blank">MIT</a> 
     and <a href="http://opensource.org/licenses/GPL-2.0" target="_blank">GPL</a> licenses.</p>
     and <a href="http://opensource.org/licenses/GPL-2.0" target="_blank">GPL</a> licenses.</p>
 
 
     <h2>Contact</h2>
     <h2>Contact</h2>
-    <p>You can follow me on <strong><a href="http://twitter.com/jcopkode" target="_blank">Twitter</a></strong> and <strong><a href="http://identi.ca/opkode" target="_blank">Identica</a></strong></p>
+    <p>You can follow me on <strong><a href="http://twitter.com/jcopkode" target="_blank">Twitter</a></strong></p>
     <p>My XMPP username is <strong>jc@opkode.im</strong>.</p>
     <p>My XMPP username is <strong>jc@opkode.im</strong>.</p>
     <p>Send me an email via this <a href="http://opkode.com/contact" target="_blank">contact form</a>.</p>
     <p>Send me an email via this <a href="http://opkode.com/contact" target="_blank">contact form</a>.</p>
 </section>
 </section>
-
 </div>
 </div>
 
 
 <!-- FOOTER  -->
 <!-- FOOTER  -->
@@ -163,11 +196,11 @@
             auto_subscribe: false,
             auto_subscribe: false,
             bosh_service_url: 'https://bind.opkode.im', // Please use this connection manager only for testing purposes
             bosh_service_url: 'https://bind.opkode.im', // Please use this connection manager only for testing purposes
             hide_muc_server: false,
             hide_muc_server: false,
-            i18n: locales.en, // Refer to ./locale/locales.js to see which locales are supported
+            i18n: locales['fr'], // Refer to ./locale/locales.js to see which locales are supported
             prebind: false,
             prebind: false,
             show_controlbox_by_default: true,
             show_controlbox_by_default: true,
             xhr_user_search: false,
             xhr_user_search: false,
-            debug: true
+            debug: true 
         });
         });
     });
     });
 </script>
 </script>

+ 130 - 150
locale/converse.pot

@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 msgstr ""
 "Project-Id-Version: Converse.js 0.4\n"
 "Project-Id-Version: Converse.js 0.4\n"
 "Report-Msgid-Bugs-To: \n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-06-01 23:03+0200\n"
+"POT-Creation-Date: 2013-08-26 16:15+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,465 +17,445 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Content-Transfer-Encoding: 8bit\n"
 
 
-#: converse.js:397 converse.js:1128
+#: converse.js:130
+msgid "Disconnected"
+msgstr ""
+
+#: converse.js:134
+msgid "Error"
+msgstr ""
+
+#: converse.js:136
+msgid "Connecting"
+msgstr ""
+
+#: converse.js:139
+msgid "Connection Failed"
+msgstr ""
+
+#: converse.js:141
+msgid "Authenticating"
+msgstr ""
+
+#: converse.js:144
+msgid "Authentication Failed"
+msgstr ""
+
+#: converse.js:146
+msgid "Disconnecting"
+msgstr ""
+
+#: converse.js:456 converse.js:1175
 msgid "Show this menu"
 msgid "Show this menu"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:398 converse.js:1129
+#: converse.js:457 converse.js:1176
 msgid "Write in the third person"
 msgid "Write in the third person"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:399 converse.js:1133
+#: converse.js:458 converse.js:1180
 msgid "Remove messages"
 msgid "Remove messages"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:539
+#: converse.js:598
 msgid "Personal message"
 msgid "Personal message"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:613
+#: converse.js:672
 msgid "Contacts"
 msgid "Contacts"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:618
+#: converse.js:677
 msgid "Online"
 msgid "Online"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:619
+#: converse.js:678
 msgid "Busy"
 msgid "Busy"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:620
+#: converse.js:679
 msgid "Away"
 msgid "Away"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:621
+#: converse.js:680
 msgid "Offline"
 msgid "Offline"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:628
+#: converse.js:687
 msgid "Click to add new chat contacts"
 msgid "Click to add new chat contacts"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:628
+#: converse.js:688
 msgid "Add a contact"
 msgid "Add a contact"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:637
+#: converse.js:697
 msgid "Contact username"
 msgid "Contact username"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:638
+#: converse.js:698
 msgid "Add"
 msgid "Add"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:646
+#: converse.js:706
 msgid "Contact name"
 msgid "Contact name"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:647
+#: converse.js:707
 msgid "Search"
 msgid "Search"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:682
+#: converse.js:747
 msgid "No users found"
 msgid "No users found"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:689
+#: converse.js:754
 msgid "Click to add as a chat contact"
 msgid "Click to add as a chat contact"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:753
+#: converse.js:814
 msgid "Click to open this room"
 msgid "Click to open this room"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:755
+#: converse.js:816
 msgid "Show more information on this room"
 msgid "Show more information on this room"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:760
+#: converse.js:822
 msgid "Description:"
 msgid "Description:"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:761
+#: converse.js:823
 msgid "Occupants:"
 msgid "Occupants:"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:762
+#: converse.js:824
 msgid "Features:"
 msgid "Features:"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:764
+#: converse.js:826
 msgid "Requires authentication"
 msgid "Requires authentication"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:767
+#: converse.js:829
 msgid "Hidden"
 msgid "Hidden"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:770
+#: converse.js:832
 msgid "Requires an invitation"
 msgid "Requires an invitation"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:773
+#: converse.js:835
 msgid "Moderated"
 msgid "Moderated"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:776
+#: converse.js:838
 msgid "Non-anonymous"
 msgid "Non-anonymous"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:779
+#: converse.js:841
 msgid "Open room"
 msgid "Open room"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:782
+#: converse.js:844
 msgid "Permanent room"
 msgid "Permanent room"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:785
+#: converse.js:847
 msgid "Public"
 msgid "Public"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:788
+#: converse.js:850
 msgid "Semi-anonymous"
 msgid "Semi-anonymous"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:791
+#: converse.js:853
 msgid "Temporary room"
 msgid "Temporary room"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:794
+#: converse.js:856
 msgid "Unmoderated"
 msgid "Unmoderated"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:800
+#: converse.js:862
 msgid "Rooms"
 msgid "Rooms"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:804
+#: converse.js:866
 msgid "Room name"
 msgid "Room name"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:805
+#: converse.js:867
 msgid "Nickname"
 msgid "Nickname"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:806
+#: converse.js:868
 msgid "Server"
 msgid "Server"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:807
+#: converse.js:869
 msgid "Join"
 msgid "Join"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:808
+#: converse.js:870
 msgid "Show rooms"
 msgid "Show rooms"
 msgstr ""
 msgstr ""
 
 
 #. For translators: %1$s is a variable and will be replaced with the XMPP server name
 #. For translators: %1$s is a variable and will be replaced with the XMPP server name
-#: converse.js:841
+#: converse.js:905
 msgid "No rooms on %1$s"
 msgid "No rooms on %1$s"
 msgstr ""
 msgstr ""
 
 
 #. For translators: %1$s is a variable and will be
 #. For translators: %1$s is a variable and will be
 #. replaced with the XMPP server name
 #. replaced with the XMPP server name
-#: converse.js:856
+#: converse.js:920
 msgid "Rooms on %1$s"
 msgid "Rooms on %1$s"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1130
+#: converse.js:1177
 msgid "Set chatroom topic"
 msgid "Set chatroom topic"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1131
+#: converse.js:1178
 msgid "Kick user from chatroom"
 msgid "Kick user from chatroom"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1132
+#: converse.js:1179
 msgid "Ban user from chatroom"
 msgid "Ban user from chatroom"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1159
+#: converse.js:1206
 msgid "Message"
 msgid "Message"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1273 converse.js:2318
+#: converse.js:1320 converse.js:2387
 msgid "Save"
 msgid "Save"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1274
+#: converse.js:1321
 msgid "Cancel"
 msgid "Cancel"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1321
+#: converse.js:1368
 msgid "An error occurred while trying to save the form."
 msgid "An error occurred while trying to save the form."
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1367
+#: converse.js:1414
 msgid "This chatroom requires a password"
 msgid "This chatroom requires a password"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1368
+#: converse.js:1415
 msgid "Password: "
 msgid "Password: "
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1369
+#: converse.js:1416
 msgid "Submit"
 msgid "Submit"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1383
+#: converse.js:1430
 msgid "This room is not anonymous"
 msgid "This room is not anonymous"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1384
+#: converse.js:1431
 msgid "This room now shows unavailable members"
 msgid "This room now shows unavailable members"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1385
+#: converse.js:1432
 msgid "This room does not show unavailable members"
 msgid "This room does not show unavailable members"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1386
+#: converse.js:1433
 msgid "Non-privacy-related room configuration has changed"
 msgid "Non-privacy-related room configuration has changed"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1387
+#: converse.js:1434
 msgid "Room logging is now enabled"
 msgid "Room logging is now enabled"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1388
+#: converse.js:1435
 msgid "Room logging is now disabled"
 msgid "Room logging is now disabled"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1389
+#: converse.js:1436
 msgid "This room is now non-anonymous"
 msgid "This room is now non-anonymous"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1390
+#: converse.js:1437
 msgid "This room is now semi-anonymous"
 msgid "This room is now semi-anonymous"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1391
+#: converse.js:1438
 msgid "This room is now fully-anonymous"
 msgid "This room is now fully-anonymous"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1392
+#: converse.js:1439
 msgid "A new room has been created"
 msgid "A new room has been created"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1393
+#: converse.js:1440
 msgid "Your nickname has been changed"
 msgid "Your nickname has been changed"
 msgstr ""
 msgstr ""
 
 
-#. For translations: %1$s will be replaced with the user's nickname
-#. Don't translate "strong"
-#. Example: <strong>jcbrand</strong> has been banned
-#: converse.js:1400
+#: converse.js:1454
 msgid "<strong>%1$s</strong> has been banned"
 msgid "<strong>%1$s</strong> has been banned"
 msgstr ""
 msgstr ""
 
 
-#. For translations: %1$s will be replaced with the user's nickname
-#. Don't translate "strong"
-#. Example: <strong>jcbrand</strong> has been kicked out
-#: converse.js:1404
+#: converse.js:1455
 msgid "<strong>%1$s</strong> has been kicked out"
 msgid "<strong>%1$s</strong> has been kicked out"
 msgstr ""
 msgstr ""
 
 
-#. For translations: %1$s will be replaced with the user's nickname
-#. Don't translate "strong"
-#. Example: <strong>jcbrand</strong> has been removed because of an affiliasion change
-#: converse.js:1408
+#: converse.js:1456
 msgid "<strong>%1$s</strong> has been removed because of an affiliation change"
 msgid "<strong>%1$s</strong> has been removed because of an affiliation change"
 msgstr ""
 msgstr ""
 
 
-#. For translations: %1$s will be replaced with the user's nickname
-#. Don't translate "strong"
-#. Example: <strong>jcbrand</strong> has been removed for not being a member
-#: converse.js:1412
+#: converse.js:1457
 msgid "<strong>%1$s</strong> has been removed for not being a member"
 msgid "<strong>%1$s</strong> has been removed for not being a member"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1416 converse.js:1478
+#: converse.js:1461 converse.js:1521
 msgid "You have been banned from this room"
 msgid "You have been banned from this room"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1417
+#: converse.js:1462
 msgid "You have been kicked from this room"
 msgid "You have been kicked from this room"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1418
+#: converse.js:1463
 msgid "You have been removed from this room because of an affiliation change"
 msgid "You have been removed from this room because of an affiliation change"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1419
+#: converse.js:1464
 msgid ""
 msgid ""
 "You have been removed from this room because the room has changed to members-"
 "You have been removed from this room because the room has changed to members-"
 "only and you're not a member"
 "only and you're not a member"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1420
+#: converse.js:1465
 msgid ""
 msgid ""
 "You have been removed from this room because the MUC (Multi-user chat) "
 "You have been removed from this room because the MUC (Multi-user chat) "
 "service is being shut down."
 "service is being shut down."
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1476
+#: converse.js:1519
 msgid "You are not on the member list of this room"
 msgid "You are not on the member list of this room"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1482
+#: converse.js:1525
 msgid "No nickname was specified"
 msgid "No nickname was specified"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1486
+#: converse.js:1529
 msgid "You are not allowed to create new rooms"
 msgid "You are not allowed to create new rooms"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1488
+#: converse.js:1531
 msgid "Your nickname doesn't conform to this room's policies"
 msgid "Your nickname doesn't conform to this room's policies"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1490
+#: converse.js:1533
 msgid "Your nickname is already taken"
 msgid "Your nickname is already taken"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1492
+#: converse.js:1535
 msgid "This room does not (yet) exist"
 msgid "This room does not (yet) exist"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1494
+#: converse.js:1537
 msgid "This room has reached it's maximum number of occupants"
 msgid "This room has reached it's maximum number of occupants"
 msgstr ""
 msgstr ""
 
 
 #. For translators: the %1$s and %2$s parts will get replaced by the user and topic text respectively
 #. For translators: the %1$s and %2$s parts will get replaced by the user and topic text respectively
 #. Example: Topic set by JC Brand to: Hello World!
 #. Example: Topic set by JC Brand to: Hello World!
-#: converse.js:1571
+#: converse.js:1614
 msgid "Topic set by %1$s to: %2$s"
 msgid "Topic set by %1$s to: %2$s"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1587
+#: converse.js:1630
 msgid "This user is a moderator"
 msgid "This user is a moderator"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1590
+#: converse.js:1633
 msgid "This user can send messages in this room"
 msgid "This user can send messages in this room"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1593
+#: converse.js:1636
 msgid "This user can NOT send messages in this room"
 msgid "This user can NOT send messages in this room"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1796
+#: converse.js:1843
 msgid "Click to chat with this contact"
 msgid "Click to chat with this contact"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:1797 converse.js:1801
+#: converse.js:1845 converse.js:1849
 msgid "Click to remove this contact"
 msgid "Click to remove this contact"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:2163
+#: converse.js:2231
 msgid "Contact requests"
 msgid "Contact requests"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:2164
+#: converse.js:2232
 msgid "My contacts"
 msgid "My contacts"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:2165
+#: converse.js:2233
 msgid "Pending contacts"
 msgid "Pending contacts"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:2317
+#: converse.js:2386
 msgid "Custom status"
 msgid "Custom status"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:2323
+#: converse.js:2392
 msgid "Click to change your chat status"
 msgid "Click to change your chat status"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:2326
+#: converse.js:2396
 msgid "Click here to write a custom status message"
 msgid "Click here to write a custom status message"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:2355 converse.js:2363
+#: converse.js:2425 converse.js:2433
 msgid "online"
 msgid "online"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:2357
+#: converse.js:2427
 msgid "busy"
 msgid "busy"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:2359
+#: converse.js:2429
 msgid "away for long"
 msgid "away for long"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:2361
+#: converse.js:2431
 msgid "away"
 msgid "away"
 msgstr ""
 msgstr ""
 
 
 #. For translators: the %1$s part gets replaced with the status
 #. For translators: the %1$s part gets replaced with the status
 #. Example, I am online
 #. Example, I am online
-#: converse.js:2375 converse.js:2409
+#: converse.js:2445 converse.js:2482
 msgid "I am %1$s"
 msgid "I am %1$s"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:2480
+#: converse.js:2553
 msgid "Sign in"
 msgid "Sign in"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:2483
+#: converse.js:2556
 msgid "XMPP/Jabber Username:"
 msgid "XMPP/Jabber Username:"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:2485
+#: converse.js:2558
 msgid "Password:"
 msgid "Password:"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:2487
+#: converse.js:2560
 msgid "Log In"
 msgid "Log In"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:2491
+#: converse.js:2564
 msgid "BOSH Service URL:"
 msgid "BOSH Service URL:"
 msgstr ""
 msgstr ""
 
 
-#: converse.js:2503
-msgid "Connected"
-msgstr ""
-
-#: converse.js:2507
-msgid "Disconnected"
-msgstr ""
-
-#: converse.js:2511
-msgid "Error"
-msgstr ""
-
-#: converse.js:2513
-msgid "Connecting"
-msgstr ""
-
-#: converse.js:2516
-msgid "Connection Failed"
-msgstr ""
-
-#: converse.js:2518
-msgid "Authenticating"
-msgstr ""
-
-#: converse.js:2521
-msgid "Authentication Failed"
-msgstr ""
-
-#: converse.js:2523
-msgid "Disconnecting"
-msgstr ""
-
-#: converse.js:2525
-msgid "Attached"
-msgstr ""
-
-#: converse.js:2656
+#: converse.js:2718
 msgid "Online Contacts"
 msgid "Online Contacts"
 msgstr ""
 msgstr ""

+ 8 - 7
locale/locales.js

@@ -27,12 +27,13 @@
         "it",
         "it",
         "pt_BR"
         "pt_BR"
         ], function (jed, af, en, es, de, it, pt_BR) {
         ], function (jed, af, en, es, de, it, pt_BR) {
-            root.locales = {};
-            root.locales.af = af;
-            root.locales.en = en;
-            root.locales.es = es;
-            root.locales.de = de;
-            root.locales.it = it;
-            root.locales.pt_BR = pt_BR;
+            root.locales = {
+                'af': af,
+                'en': en,
+                'es': es,
+                'de': de,
+                'it': it,
+                'pt-br': pt_BR
+            };
         });
         });
 })(this);
 })(this);

+ 20 - 0
locale/nolocales.js

@@ -0,0 +1,20 @@
+/*
+ * This file can be used if no locale support is required.
+ */
+(function (root, factory) {
+    define("locales", ['jed'], function (Jed) {
+        var translations = {
+            "domain": "converse",
+            "locale_data": {
+                "converse": {
+                    "": {
+                        "domain": "converse",
+                        "lang": "en",
+                        "plural_forms": "nplurals=2; plural=(n != 1);"
+                    }
+                }
+            }
+        };
+        root.locales = { 'en': new Jed(translations) };
+    });
+})(this);

+ 3 - 3
main.js

@@ -2,10 +2,10 @@ require.config({
     paths: {
     paths: {
         "jquery": "components/jquery/jquery",
         "jquery": "components/jquery/jquery",
         "locales": "locale/locales",
         "locales": "locale/locales",
-        "tinysort": "components/tinysort/src/jquery.tinysort",
+        "jquery.tinysort": "components/tinysort/src/jquery.tinysort",
         "underscore": "components/underscore/underscore",
         "underscore": "components/underscore/underscore",
         "backbone": "components/backbone/backbone",
         "backbone": "components/backbone/backbone",
-        "localstorage": "components/backbone.localStorage/backbone.localStorage",
+        "backbone.localStorage": "components/backbone.localStorage/backbone.localStorage",
         "strophe": "components/strophe/strophe",
         "strophe": "components/strophe/strophe",
         "strophe.muc": "components/strophe.muc/index",
         "strophe.muc": "components/strophe.muc/index",
         "strophe.roster": "components/strophe.roster/index",
         "strophe.roster": "components/strophe.roster/index",
@@ -40,6 +40,6 @@ require.config({
     }
     }
 });
 });
 
 
-require(["components/requirejs/require", "jquery", "converse"], function(require, $, converse) {
+require(["jquery", "converse"], function(require, $, converse) {
     window.converse = converse;
     window.converse = converse;
 });
 });

+ 16 - 3
mockup.html

@@ -114,13 +114,13 @@
                         John Smit</a>
                         John Smit</a>
                         <a class="remove-xmpp-contact icon-remove" title="Click to remove this contact" href="#"></a>
                         <a class="remove-xmpp-contact icon-remove" title="Click to remove this contact" href="#"></a>
                     </dd>
                     </dd>
-                    <dd class="dnd current-xmpp-contact">
+                    <dd class="away current-xmpp-contact">
                         <a class="open-chat" title="Click to chat with this contact" href="#">
                         <a class="open-chat" title="Click to chat with this contact" href="#">
                         <span class="icon-away" title="this contact is away"></span>
                         <span class="icon-away" title="this contact is away"></span>
                         Francois Pienaar</a>
                         Francois Pienaar</a>
                         <a class="remove-xmpp-contact icon-remove" title="Click to remove this contact" href="#"></a>
                         <a class="remove-xmpp-contact icon-remove" title="Click to remove this contact" href="#"></a>
                     </dd>
                     </dd>
-                    <dd class="busy current-xmpp-contact">
+                    <dd class="dnd current-xmpp-contact">
                         <a class="open-chat" title="Click to chat with this contact" href="#">
                         <a class="open-chat" title="Click to chat with this contact" href="#">
                         <span class="icon-dnd" title="This contact is busy"></span>
                         <span class="icon-dnd" title="This contact is busy"></span>
                         Gary Teichmann</a>
                         Gary Teichmann</a>
@@ -196,7 +196,7 @@
                 <canvas height="33px" width="33px" class="avatar" style="background-color: black"></canvas>
                 <canvas height="33px" width="33px" class="avatar" style="background-color: black"></canvas>
                 <div class="chat-title"> JC Brand </div>
                 <div class="chat-title"> JC Brand </div>
             </a>
             </a>
-            <p class="user-custom-message"></p>
+            <p class="user-custom-message" title="10000ft in the air">10000ft in the air</p>
             <p></p>
             <p></p>
         </div>
         </div>
         <div class="chat-content">
         <div class="chat-content">
@@ -339,6 +339,19 @@ $(document).ready(function () {
         $(ev.target).parent().parent().siblings('dd').find('ul').toggle('fast');
         $(ev.target).parent().parent().siblings('dd').find('ul').toggle('fast');
     });
     });
 
 
+    $("a.change-xmpp-status-message").click(function (ev) {
+        ev.preventDefault();
+        var form = ''+
+                '<form id="set-custom-xmpp-status">' +
+                    '<input type="text" class="custom-xmpp-status"I am online"'+
+                        'placeholder="I am online"/>' +
+                    '<button type="submit">Save</button>' +
+                '</form>';
+
+        $(ev.target).closest('.xmpp-status').replaceWith(form);
+        $(ev.target).closest('.custom-xmpp-status').focus().focus();
+    });
+
     $('.toggle-xmpp-contact-form').click(function (ev) {
     $('.toggle-xmpp-contact-form').click(function (ev) {
         ev.preventDefault();
         ev.preventDefault();
         $(ev.target).parent().parent().find('.search-xmpp').toggle('fast', function () {
         $(ev.target).parent().parent().find('.search-xmpp').toggle('fast', function () {

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "converse.js",
   "name": "converse.js",
-  "version": "0.5.1",
+  "version": "0.6.2",
   "description": "Browser based XMPP instant messaging client",
   "description": "Browser based XMPP instant messaging client",
   "main": "main.js",
   "main": "main.js",
   "directories": {
   "directories": {

+ 0 - 123
test_minified.html

@@ -1,123 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.01 transitional//en"
-  "http://www.w3.org/tr/html4/loose.dtd">
-<html>
-<head>
-    <title>converse.js tests for minified files</title>
-    <meta name="description" content="converse.js: open source browser-based instant messaging" />
-    <link rel="shortcut icon" type="image/png" href="components/jasmine/images/jasmine_favicon.png">
-    <link rel="stylesheet" type="text/css" href="components/jasmine/src/html/jasmine.css">
-    <link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">
-    <link rel="stylesheet" type="text/css" media="screen" href="converse.min.css">
-    <script src="converse.min.js"></script>
-    <script src="components/jasmine/lib/jasmine-core/jasmine.js"></script>
-    <script src="components/jasmine/lib/jasmine-core/jasmine-html.js"></script>
-    <script src="node_modules/jasmine-reporters/src/jasmine.console_reporter.js"></script>
-    <script src="node_modules/jasmine-reporters/src/jasmine.junit_reporter.js"></script>
-</head>
-
-<body>
-    <div id="header_wrap" class="outer">
-        <header class="inner">
-          <h1 id="project_title"><a href="http://conversejs.org">converse.js</a></h1>
-          <h2 id="project_tagline">tests</h2>
-        </header>
-    </div>
-
-    <div id="chatpanel">
-        <div id="collective-xmpp-chat-data"></div>
-        <div id="toggle-controlbox">
-            <a href="#" class="chat toggle-online-users">
-                <span class="conn-feedback">click here to chat</span> <strong style="display: none" id="online-count">(0)</strong>
-            </a>
-        </div>
-    </div>
-
-<script>
-    var mock_connection = {
-        'muc': {
-            'listRooms': function () {},
-            'join': function () {},
-            'leave': function () {},
-            'removeRoom': function () {},
-            'rooms': {}
-        },
-        'jid': 'dummy@localhost',
-        'addHandler': function (handler, ns, name, type, id, from, options) {
-            return function () {};
-        },
-        'send': function () {},
-        'roster': {
-            'add': function () {},
-            'authorize': function () {},
-            'unauthorize': function () {},
-            'get': function () {},
-            'subscribe': function () {},
-            'registerCallback': function () {}
-        },
-        'vcard': {
-            'get': function (callback, jid) {
-                var firstname, lastname;
-                if (!jid) {
-                    jid = 'dummy@localhost';
-                    firstname = 'Max';
-                    lastname = 'Mustermann';
-                } else {
-                    var name = jid.split('@')[0].replace('.', ' ').split(' ');
-                    firstname = name[0].charAt(0).toUpperCase()+name[0].slice(1);
-                    lastname = name[1].charAt(0).toUpperCase()+name[1].slice(1);
-                }
-                var fullname = firstname+' '+lastname;
-                var vcard = $iq().c('vCard').c('FN').t(fullname);
-                callback(vcard.tree());
-            }
-        },
-        'disco': {
-            'info': function () {},
-            'items': function () {}
-        }
-    };
-    require([
-        "jquery",
-        "converse",
-        ], function($, converse) {
-            // Set up converse.js
-            window.localStorage.clear();
-            converse.initialize({
-                prebind: false,
-                xhr_user_search: false,
-                auto_subscribe: false,
-                animate: false
-            });
-            converse.onConnected(
-                mock_connection, 
-                function (converse) {
-                    window.converse = converse;
-                    require([
-                        "spec/MainSpec",
-                        "spec/ChatRoomSpec"
-                    ], function () {
-                        // Jasmine stuff
-                        var jasmineEnv = jasmine.getEnv();
-                        if (/PhantomJS/.test(navigator.userAgent)) {
-                            jasmineEnv.addReporter(new jasmine.TrivialReporter());
-                            jasmineEnv.addReporter(new jasmine.JUnitXmlReporter('./test-reports/'));
-                            jasmineEnv.addReporter(new jasmine.ConsoleReporter());
-                            jasmineEnv.updateInterval = 0;
-                        } else {
-                            var htmlReporter = new jasmine.HtmlReporter();
-                            jasmineEnv.addReporter(htmlReporter);
-                            jasmineEnv.addReporter(new jasmine.ConsoleReporter());
-                            jasmineEnv.specFilter = function(spec) {
-                                return htmlReporter.specFilter(spec);
-                            };
-                            jasmineEnv.updateInterval = 200;
-                        }
-                        jasmineEnv.execute();
-                    });
-                }
-            );
-        }
-    );
-</script>
-</body>
-</html>

+ 2 - 2
tests_main.js

@@ -3,10 +3,10 @@ require.config({
     paths: {
     paths: {
         "jquery": "components/jquery/jquery",
         "jquery": "components/jquery/jquery",
         "locales": "locale/locales",
         "locales": "locale/locales",
-        "tinysort": "components/tinysort/src/jquery.tinysort",
+        "jquery.tinysort": "components/tinysort/src/jquery.tinysort",
         "underscore": "components/underscore/underscore",
         "underscore": "components/underscore/underscore",
         "backbone": "components/backbone/backbone",
         "backbone": "components/backbone/backbone",
-        "localstorage": "components/backbone.localStorage/backbone.localStorage",
+        "backbone.localStorage": "components/backbone.localStorage/backbone.localStorage",
         "strophe": "components/strophe/strophe",
         "strophe": "components/strophe/strophe",
         "strophe.muc": "components/strophe.muc/index",
         "strophe.muc": "components/strophe.muc/index",
         "strophe.roster": "components/strophe.roster/index",
         "strophe.roster": "components/strophe.roster/index",

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است