Commit 4bbf5b05 authored by Alexandru Ghica's avatar Alexandru Ghica

Feature: added "Connecting to chat ..." info

- Feature: added spining image and "Connecting to chat ..." info under chat panel
  when the user is not (yet) binded to the jabber server
  [alecghica]
parent 3224a8c5
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
$msg:false, Strophe:false, setTimeout:false, navigator:false, jarn:false, google:false, jarnxmpp:false, jQuery:false, sessionStorage:false, $iq:false, $pres:false, Image:false, */ $msg:false, Strophe:false, setTimeout:false, navigator:false, jarn:false, google:false, jarnxmpp:false, jQuery:false, sessionStorage:false, $iq:false, $pres:false, Image:false, */
(function (jarnxmpp, $, portal_url) { (function (jarnxmpp, $, portal_url) {
portal_url = portal_url || ''; portal_url = portal_url || '';
jarnxmpp.Storage = { jarnxmpp.Storage = {
...@@ -230,9 +230,9 @@ $msg:false, Strophe:false, setTimeout:false, navigator:false, jarn:false, google ...@@ -230,9 +230,9 @@ $msg:false, Strophe:false, setTimeout:false, navigator:false, jarn:false, google
data = {}; data = {};
} }
$.ajax({ $.ajax({
'url':portal_url + '/@@xmpp-loader', 'url':portal_url + '/@@xmpp-loader',
'dataType': 'json', 'dataType': 'json',
'data': data, 'data': data,
'success': function (data) { 'success': function (data) {
if (!(('rid' in data) && ('sid' in data) && ('BOSH_SERVICE' in data))) { if (!(('rid' in data) && ('sid' in data) && ('BOSH_SERVICE' in data))) {
return; return;
......
...@@ -590,7 +590,7 @@ var MD5 = (function () { ...@@ -590,7 +590,7 @@ var MD5 = (function () {
* This Function object extension method creates a bound method similar * This Function object extension method creates a bound method similar
* to those in Python. This means that the 'this' object will point * to those in Python. This means that the 'this' object will point
* to the instance you want. See * to the instance you want. See
* <a href='https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind'>MDC's bind() documentation</a> and * <a href='https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind'>MDC's bind() documentation</a> and
* <a href='http://benjamin.smedbergs.us/blog/2007-01-03/bound-functions-and-function-imports-in-javascript/'>Bound Functions and Function Imports in JavaScript</a> * <a href='http://benjamin.smedbergs.us/blog/2007-01-03/bound-functions-and-function-imports-in-javascript/'>Bound Functions and Function Imports in JavaScript</a>
* for a complete explanation. * for a complete explanation.
* *
...@@ -599,7 +599,7 @@ var MD5 = (function () { ...@@ -599,7 +599,7 @@ var MD5 = (function () {
* *
* Parameters: * Parameters:
* (Object) obj - The object that will become 'this' in the bound function. * (Object) obj - The object that will become 'this' in the bound function.
* (Object) argN - An option argument that will be prepended to the * (Object) argN - An option argument that will be prepended to the
* arguments given for the function call * arguments given for the function call
* *
* Returns: * Returns:
...@@ -763,8 +763,8 @@ Strophe = { ...@@ -763,8 +763,8 @@ Strophe = {
}, },
/** Constants: XHTML_IM Namespace /** Constants: XHTML_IM Namespace
* contains allowed tags, tag attributes, and css properties. * contains allowed tags, tag attributes, and css properties.
* Used in the createHtml function to filter incoming html into the allowed XHTML-IM subset. * Used in the createHtml function to filter incoming html into the allowed XHTML-IM subset.
* See http://xmpp.org/extensions/xep-0071.html#profile-summary for the list of recommended * See http://xmpp.org/extensions/xep-0071.html#profile-summary for the list of recommended
* allowed tags and their attributes. * allowed tags and their attributes.
...@@ -818,7 +818,7 @@ Strophe = { ...@@ -818,7 +818,7 @@ Strophe = {
} }
}, },
/** Function: addNamespace /** Function: addNamespace
* This function is used to extend the current namespaces in * This function is used to extend the current namespaces in
* Strophe.NS. It takes a key and a value with the key being the * Strophe.NS. It takes a key and a value with the key being the
* name of the new namespace, with its actual value. * name of the new namespace, with its actual value.
...@@ -968,9 +968,9 @@ Strophe = { ...@@ -968,9 +968,9 @@ Strophe = {
var doc; var doc;
// IE9 does implement createDocument(); however, using it will cause the browser to leak memory on page unload. // IE9 does implement createDocument(); however, using it will cause the browser to leak memory on page unload.
// Here, we test for presence of createDocument() plus IE's proprietary documentMode attribute, which would be // Here, we test for presence of createDocument() plus IE's proprietary documentMode attribute, which would be
// less than 10 in the case of IE9 and below. // less than 10 in the case of IE9 and below.
if (document.implementation.createDocument === undefined || if (document.implementation.createDocument === undefined ||
document.implementation.createDocument && document.documentMode && document.documentMode < 10) { document.implementation.createDocument && document.documentMode && document.documentMode < 10) {
doc = this._getIEXmlDom(); doc = this._getIEXmlDom();
doc.appendChild(doc.createElement('strophe')); doc.appendChild(doc.createElement('strophe'));
...@@ -1839,7 +1839,7 @@ Strophe.Handler = function (handler, ns, name, type, id, from, options) ...@@ -1839,7 +1839,7 @@ Strophe.Handler = function (handler, ns, name, type, id, from, options)
this.type = type; this.type = type;
this.id = id; this.id = id;
this.options = options || {matchbare: false}; this.options = options || {matchbare: false};
// default matchBare to false if undefined // default matchBare to false if undefined
if (!this.options.matchBare) { if (!this.options.matchBare) {
this.options.matchBare = false; this.options.matchBare = false;
...@@ -1869,7 +1869,7 @@ Strophe.Handler.prototype = { ...@@ -1869,7 +1869,7 @@ Strophe.Handler.prototype = {
{ {
var nsMatch; var nsMatch;
var from = null; var from = null;
if (this.options.matchBare) { if (this.options.matchBare) {
from = Strophe.getBareJidFromJid(elem.getAttribute('from')); from = Strophe.getBareJidFromJid(elem.getAttribute('from'));
} else { } else {
...@@ -2641,7 +2641,7 @@ Strophe.Connection.prototype = { ...@@ -2641,7 +2641,7 @@ Strophe.Connection.prototype = {
message: "Cannot queue non-DOMElement." message: "Cannot queue non-DOMElement."
}; };
} }
this._data.push(element); this._data.push(element);
}, },
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment