Comparar commits

..

17 Commits

Autor SHA1 Mensagem Data
sualko 9153a45933 build v2.1.4 2015-09-10 11:05:01 +02:00
sualko bda4267def remove leading at sign from comments in build file
- fix ie10 (#221)
2015-09-10 10:57:27 +02:00
sualko 49ecac9f7b build v2.1.3 2015-09-08 14:26:31 +02:00
Klaus 736119b375 show unread notifications only if the chat window has no focus (fix #212) 2015-08-29 17:54:08 +02:00
Klaus d8733e73d3 fix bookmark loading (fix #211) 2015-08-29 17:29:33 +02:00
Klaus 7f73c45af0 remove deprecated dependencies from example 2015-08-29 17:15:17 +02:00
sualko f8c4bf1d3b build v2.1.2 2015-08-12 10:50:10 +02:00
sualko 3c5ff959e5 update grunt-sass
fix #203

recreate deprecated image-url function with grunt-text-replace
2015-08-12 10:34:06 +02:00
sualko 49cf0eebca build v2.1.1 2015-08-10 13:33:39 +02:00
sualko 4efa02e4ae do not stringify jquery objects
otherwise safari will fail
2015-08-10 13:33:09 +02:00
sualko 3b51e7d7a5 update favico.js 2015-08-10 12:34:23 +02:00
sualko c46e9fc534 add option for online user manual 2015-08-10 12:17:10 +02:00
sualko 03e423f439 fix placeholder replacement 2015-08-10 12:05:35 +02:00
sualko 2f432667e9 rearrange bootstrap import
fix #203
2015-08-10 12:01:13 +02:00
sualko 087e5c819c fix handling of escaped jids
#196
2015-08-07 13:57:15 +02:00
sualko fab9257282 fix undefined error variable in ie 2015-08-05 10:31:48 +02:00
sualko 3feb97b119 update strophe.jinglejs
fix #204
2015-08-05 10:13:47 +02:00
61 arquivos alterados com 10291 adições e 6164 exclusões
+23
Ver Arquivo
@@ -1,3 +1,26 @@
v2.1.4 / 2015-09-10
===
- remove leading at sign from comments in build file
v2.1.3 / 2015-09-08
===
- fix bookmark loading
- show unread notifications only if the chat window has no focus
v2.1.2 / 2015-08-12
===
- update grunt-sass (fix invalid css)
v2.1.1 / 2015-08-10
===
- update strophe.jingle (fix login with safari and older versions of ie, ff, chrome)
- update favico.js
- fix undefined error variable in ie
- fix handling of escaped jids (e.g. used in transports)
- fix placeholder replacement
- rearrange bootstrap import
- add option for custom online user manual
v2.1.0 / 2015-07-31
===
- add bookmark feature for rooms (XEP-0048)
+20 -6
Ver Arquivo
@@ -68,7 +68,7 @@ module.exports = function(grunt) {
src: ['<%= target %>/jsxc.js'],
overwrite: true,
replacements: [{
from: '< $ dep.libraries $ >',
from: '<$ dep.libraries $>',
to: function() {
var i, d, libraries = '';
@@ -101,6 +101,23 @@ module.exports = function(grunt) {
from: 'var jsxc.gui.template = {};',
to: ''
}]
},
imageUrl: {
src: ['<%= target %>/css/*.css'],
overwrite: true,
replacements: [{
from: /image-url\(["'](.+)["']\)/g,
to: 'url(\'../img/$1\')'
}]
},
// IE 10 does not like comments starting with @
todo: {
src: ['build/jsxc.js'],
overwrite: true,
replacements: [{
from: /\/\/@(.*)/g,
to: '//$1'
}]
}
},
merge_data: {
@@ -228,9 +245,6 @@ module.exports = function(grunt) {
},
},
sass: {
options: {
imagePath: '../img'
},
dist: {
files: {
'<%= target %>/css/jsxc.css': 'scss/jsxc.scss',
@@ -353,12 +367,12 @@ module.exports = function(grunt) {
//Default task
grunt.registerTask('default', ['build', 'watch']);
grunt.registerTask('build', ['jshint', 'clean', 'sass', 'autoprefixer', 'copy', 'merge_data', 'replace:locales', 'htmlConvert', 'replace:template', 'concat']);
grunt.registerTask('build', ['jshint', 'clean', 'sass', 'replace:imageUrl', 'autoprefixer', 'copy', 'merge_data', 'replace:locales', 'htmlConvert', 'replace:template', 'concat']);
grunt.registerTask('build:prerelease', 'Build a new pre-release', function() {
grunt.config.set('target', 'build');
grunt.task.run(['search:console', 'build', 'dataUri', 'usebanner', 'replace:version', 'replace:libraries', 'uglify', 'compress']);
grunt.task.run(['search:console', 'build', 'dataUri', 'usebanner', 'replace:version', 'replace:libraries', 'replace:todo', 'uglify', 'compress']);
});
grunt.registerTask('build:release', 'Build a new release', function() {
+2 -2
Ver Arquivo
@@ -1,6 +1,6 @@
{
"name": "jsxc",
"version": "2.0.1",
"version": "2.1.2",
"homepage": "https://www.jsxc.org",
"authors": [
"sualko <klaus@jsxc.org>"
@@ -25,7 +25,7 @@
],
"private": true,
"dependencies": {
"favico.js": "~0.3.7",
"favico.js": "~0.3.9",
"strophe.bookmarks": "https://raw.githubusercontent.com/sualko/strophejs-plugins/bookmarks/bookmarks/strophe.bookmarks.js",
"strophe.x": "https://raw.githubusercontent.com/strophe/strophejs-plugins/master/dataforms/src/strophe.x.js"
}
+1819 -1483
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+9 -4
Ver Arquivo
@@ -46,6 +46,7 @@
color: #fff;
width: 100%;
z-index: 100; }
.jsxc_noRemoteVideo > div {
width: 200px;
height: 200px;
@@ -88,18 +89,22 @@ div:full-screen {
background-color: #000; }
div:full-screen.jsxc_localvideo {
border: 1px solid #fff; }
div:-webkit-full-screen {
width: 100%;
height: 100%;
background-color: #000; }
div:-moz-full-screen {
width: 100%;
height: 100%;
background-color: #000; }
div:-ms-fullscreen {
width: 100%;
height: 100%;
background-color: #000; }
div:fullscreen {
width: 100%;
height: 100%;
@@ -112,13 +117,14 @@ div:fullscreen {
border: 1px solid #fff; }
div:fullscreen.jsxc_localvideo {
border: 1px solid #fff; }
div.jsxc_video {
background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICBpZD0ic3ZnMiIKICAgd2lkdGg9IjIwIgogICBoZWlnaHQ9IjIwIj4KICA8bWV0YWRhdGEKICAgICBpZD0ibWV0YWRhdGExMCI+CiAgICA8cmRmOlJERj4KICAgICAgPGNjOldvcmsKICAgICAgICAgcmRmOmFib3V0PSIiPgogICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0PgogICAgICAgIDxkYzp0eXBlCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4KICAgICAgICA8ZGM6dGl0bGU+PC9kYzp0aXRsZT4KICAgICAgPC9jYzpXb3JrPgogICAgPC9yZGY6UkRGPgogIDwvbWV0YWRhdGE+CiAgPGRlZnMKICAgICBpZD0iZGVmczgiIC8+CiAgPGcKICAgICBpZD0ibGF5ZXIxIgogICAgIHRyYW5zZm9ybT0ibWF0cml4KDAuMDM3ODg1OTQsMCwwLDAuMDM3ODg1OTQsLTAuNDEzNDA3OTMsLTIuNjMxMDcxNikiPgogICAgPHBhdGgKICAgICAgIGlkPSJwYXRoMzkwNiIKICAgICAgIHN0eWxlPSJmaWxsOiM4MDgwODA7c3Ryb2tlOm5vbmUiCiAgICAgICBkPSJtIDM2MS42NTE0OCwzMTMuNTE3NjggMTc3LjE2MDc0LC0xMzEuNzg1MTYgMCwzMDIuMjI5OTkgTCAzNTguOTczMzgsMzUwLjE4NTE3IFogTSAxMC45MTE5MjIsMTgyLjQwNjM0IGwgMzc4LjM3MjY3OCwwIDAsMzAyLjY1NTgyIC0zNzguMzcyNjc4LDAgeiIgLz4KICA8L2c+Cjwvc3ZnPgo=");
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICBpZD0ic3ZnMiIKICAgd2lkdGg9IjIwIgogICBoZWlnaHQ9IjIwIj4KICA8bWV0YWRhdGEKICAgICBpZD0ibWV0YWRhdGExMCI+CiAgICA8cmRmOlJERj4KICAgICAgPGNjOldvcmsKICAgICAgICAgcmRmOmFib3V0PSIiPgogICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0PgogICAgICAgIDxkYzp0eXBlCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4KICAgICAgICA8ZGM6dGl0bGU+PC9kYzp0aXRsZT4KICAgICAgPC9jYzpXb3JrPgogICAgPC9yZGY6UkRGPgogIDwvbWV0YWRhdGE+CiAgPGRlZnMKICAgICBpZD0iZGVmczgiIC8+CiAgPGcKICAgICBpZD0ibGF5ZXIxIgogICAgIHRyYW5zZm9ybT0ibWF0cml4KDAuMDM3ODg1OTQsMCwwLDAuMDM3ODg1OTQsLTAuNDEzNDA3OTMsLTIuNjMxMDcxNikiPgogICAgPHBhdGgKICAgICAgIGlkPSJwYXRoMzkwNiIKICAgICAgIHN0eWxlPSJmaWxsOiM4MDgwODA7c3Ryb2tlOm5vbmUiCiAgICAgICBkPSJtIDM2MS42NTE0OCwzMTMuNTE3NjggMTc3LjE2MDc0LC0xMzEuNzg1MTYgMCwzMDIuMjI5OTkgTCAzNTguOTczMzgsMzUwLjE4NTE3IFogTSAxMC45MTE5MjIsMTgyLjQwNjM0IGwgMzc4LjM3MjY3OCwwIDAsMzAyLjY1NTgyIC0zNzguMzcyNjc4LDAgeiIgLz4KICA8L2c+Cjwvc3ZnPgo=');
background-repeat: no-repeat;
background-position: center center;
background-size: 15px 15px; }
div.jsxc_video:not(.jsxc_disabled):hover {
background-image: url("../img/camera_icon_white.svg"); }
background-image: url('../img/camera_icon_white.svg'); }
.jsxc_controlbar {
width: 640px;
@@ -221,7 +227,6 @@ div.jsxc_video {
background-color: #000;
-webkit-transform: translateY(0);
transform: translateY(0); }
100% {
width: 39px;
height: 39px;
@@ -236,6 +241,6 @@ div.jsxc_video {
font-style: italic; }
#jsxc_buddylist .jsxc_options .jsxc_video {
background-image: url("../img/camera_icon_white.svg"); }
background-image: url('../img/camera_icon_white.svg'); }
#jsxc_buddylist .jsxc_options .jsxc_video.jsxc_disabled {
opacity: 0.2; }
+81 -20
Ver Arquivo
@@ -1,5 +1,5 @@
/*!
* jsxc v2.1.0 - 2015-07-31
* jsxc v2.1.4 - 2015-09-10
*
* Copyright (c) 2015 Klaus Herberth <klaus@jsxc.org> <br>
* Released under the MIT license
@@ -7,7 +7,7 @@
* Please see http://www.jsxc.org/
*
* @author Klaus Herberth <klaus@jsxc.org>
* @version 2.1.0
* @version 2.1.4
* @license MIT
*/
@@ -25,7 +25,7 @@ var jsxc = null, RTC = null, RTCPeerconnection = null;
*/
jsxc = {
/** Version of jsxc */
version: '2.1.0',
version: '2.1.4',
/** True if i'm the master */
master: false,
@@ -649,7 +649,7 @@ jsxc = {
* @returns comparable bar jid
*/
jidToBid: function(jid) {
return Strophe.getBareJidFromJid(jid).toLowerCase();
return Strophe.unescapeNode(Strophe.getBareJidFromJid(jid).toLowerCase());
},
/**
@@ -1495,7 +1495,7 @@ jsxc.xmpp = {
var error = $(presence).find('error');
//@TODO display error message
//TODO display error message
jsxc.error('[XMPP] ' + error.attr('code') + ' ' + error.find(">:first-child").prop('tagName'));
return true;
}
@@ -1923,6 +1923,57 @@ jsxc.xmpp = {
return knownCapabilities[jidVerIndex[jid]];
}
return null;
},
/**
* Test if jid has given features
*
* @param {string} jid Jabber id
* @param {string[]} feature Single feature or list of features
* @param {Function} cb Called with the result as first param.
* @return {boolean} True, if jid has all given features. Null, if we do not know it currently.
*/
hasFeatureByJid: function(jid, feature, cb) {
var conn = jsxc.xmpp.conn;
cb = cb || function() {};
if (!feature) {
return false;
}
if (!$.isArray(feature)) {
feature = $.makeArray(feature);
}
var check = function(knownCapabilities) {
if (!knownCapabilities) {
return null;
}
var i;
for (i = 0; i < feature.length; i++) {
if (knownCapabilities['features'].indexOf(feature[i]) < 0) {
return false;
}
}
return true;
};
if (conn.caps._jidVerIndex[jid] && conn.caps._knownCapabilities[conn.caps._jidVerIndex[jid]]) {
var hasFeature = check(conn.caps._knownCapabilities[conn.caps._jidVerIndex[jid]]);
cb(hasFeature);
return hasFeature;
}
$(document).on('strophe.caps', function(ev, j, capabilities) {
if (j === jid) {
cb(check(capabilities));
$(document).off(ev);
}
});
return null;
}
};
@@ -3448,7 +3499,7 @@ jsxc.gui.roster = {
});
$('#jsxc_roster .jsxc_onlineHelp').click(function() {
window.open("http://www.jsxc.org/manual.html", "onlineHelp");
window.open(jsxc.options.onlineHelp, 'onlineHelp');
});
$('#jsxc_roster .jsxc_about').click(function() {
@@ -4262,7 +4313,7 @@ jsxc.gui.window = {
encrypted = encrypted || data.msgstate === OTR.CONST.MSGSTATE_ENCRYPTED;
var post = jsxc.storage.saveMessage(bid, direction, msg, encrypted, forwarded, stamp, sender);
if (direction === 'in') {
if (direction === 'in' && !jsxc.gui.window.get(bid).find('.jsxc_textinput').is(":focus")) {
jsxc.gui.unreadMsg(bid);
$(document).trigger('postmessagein.jsxc', [bid, html_msg]);
@@ -4809,7 +4860,7 @@ jsxc.muc = {
var roomName = $(stanza).find('identity').attr('name');
var subject = $(stanza).find('field[var="muc#roominfo_subject"]').attr('label');
//@TODO display subject, number of occupants, etc.
//TODO display subject, number of occupants, etc.
discoReceived(roomName, subject);
}, function() {
@@ -4868,7 +4919,7 @@ jsxc.muc = {
}, function() {
jsxc.debug('Could not load room configuration');
//@TODO show error
//TODO show error
});
},
@@ -4914,7 +4965,7 @@ jsxc.muc = {
}, function() {
jsxc.warn('Could not save room configuration.');
//@TODO display error
//TODO display error
});
jsxc.gui.dialog.close();
@@ -5422,7 +5473,7 @@ jsxc.muc = {
}, function() {
jsxc.warn('Could not save cached room configuration.');
//@TODO display error
//TODO display error
});
} else {
jsxc.gui.showSelectionDialog({
@@ -6594,7 +6645,10 @@ jsxc.options = {
iceServers: [{
urls: 'stun:stun.stunprotocol.org'
}]
}
},
/** Link to an online user manual */
onlineHelp: 'http://www.jsxc.org/manual.html'
};
/**
@@ -7136,7 +7190,12 @@ jsxc.storage = {
}
if (typeof(value) === 'object') {
value = JSON.stringify(value);
// exclude jquery objects, because otherwise safari will fail
value = JSON.stringify(value, function(key, val) {
if (!(val instanceof jQuery)) {
return val;
}
});
}
localStorage.setItem(jsxc.storage.getPrefix(uk) + key, value);
@@ -8184,6 +8243,9 @@ jsxc.webrtc = {
*/
onMediaFailure: function(ev, err) {
var self = jsxc.webrtc;
err = err || {
name: 'Undefined'
};
self.setStatus('media failure');
@@ -8356,7 +8418,7 @@ jsxc.webrtc = {
onRemoteStreamRemoved: function(session) {
this.setStatus('Remote stream for ' + session.jid + ' removed.');
//@TODO clean up
//TODO clean up
},
/**
@@ -8713,7 +8775,7 @@ jsxc.xmpp.bookmarks = {};
* @return {boolean} True: Server supports bookmark storage
*/
jsxc.xmpp.bookmarks.remote = function() {
return jsxc.xmpp.conn.caps && jsxc.xmpp.conn.caps.hasFeatureByJid(jsxc.xmpp.conn.domain, Strophe.NS.PUBSUB + "#publish");
return jsxc.xmpp.conn.caps && jsxc.xmpp.hasFeatureByJid(jsxc.xmpp.conn.domain, Strophe.NS.PUBSUB + "#publish");
};
/**
@@ -8728,12 +8790,11 @@ jsxc.xmpp.bookmarks.load = function() {
if (!ver || !caps._knownCapabilities[ver]) {
// wait until we know server capabilities
$(document).on('caps.strophe', function(ev, from) {
if (from === jsxc.xmpp.conn.domain) {
jsxc.xmpp.bookmarks.load();
if (from !== jsxc.xmpp.conn.domain) {
return;
$(document).off(ev);
}
jsxc.xmpp.bookmarks.load();
});
}
@@ -9062,7 +9123,7 @@ jsxc.gui.template['aboutDialog'] = '<h3>JavaScript XMPP Chat</h3>\n' +
'</p>\n' +
'<p class="jsxc_libraries">\n' +
' <b>Libraries: </b>\n' +
' < $ dep.libraries $>\n' +
' <a href="http://strophe.im/strophejs/">strophe.js</a> (multiple), <a href="https://github.com/strophe/strophejs-plugins">strophe.js/muc</a> (MIT), <a href="https://github.com/strophe/strophejs-plugins">strophe.js/disco</a> (MIT), <a href="https://github.com/strophe/strophejs-plugins">strophe.js/caps</a> (MIT), <a href="https://github.com/strophe/strophejs-plugins">strophe.js/vcard</a> (MIT), <a href="https://github.com/strophe/strophejs-plugins/tree/master/bookmarks">strophe.js/bookmarks</a> (MIT), <a href="https://github.com/strophe/strophejs-plugins/tree/master/dataforms">strophe.js/x</a> (MIT), <a href="https://github.com/sualko/strophe.jinglejs">strophe.jinglejs</a> (MIT), <a href="https://github.com/neoatlantis/node-salsa20">Salsa20</a> (AGPL3), <a href="www.leemon.com">bigint</a> (public domain), <a href="code.google.com/p/crypto-js">cryptojs</a> (code.google.com/p/crypto-js/wiki/license), <a href="http://git.io/ee">eventemitter</a> (MIT), <a href="https://arlolra.github.io/otr/">otr.js</a> (MPL v2.0), <a href="http://i18next.com/">i18next</a> (MIT), <a href="http://dimsemenov.com/plugins/magnific-popup/">Magnific Popup</a> (MIT), <a href="https://github.com/ejci/favico.js">favico.js</a> (MIT)\n' +
'</p>\n' +
'\n' +
'<button class="btn btn-default pull-right jsxc_debuglog">Show debug log</button>\n' +
+8 -7
Ver Arquivo
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
+26 -18
Ver Arquivo
@@ -2,7 +2,7 @@
* @license MIT
* @fileOverview Favico animations
* @author Miroslav Magda, http://blog.ejci.net
* @version 0.3.6
* @version 0.3.9
*/
/**
@@ -18,7 +18,8 @@
* position : 'down',
* type : 'circle',
* animation : 'slide',
* dataUrl: function(url){}
* dataUrl: function(url){},
* win: top
* });
*/
(function() {
@@ -35,9 +36,10 @@
position : 'down', // down, up, left, leftup (upleft)
animation : 'slide',
elementId : false,
dataUrl : false
dataUrl : false,
win: window
};
var _opt, _orig, _h, _w, _canvas, _context, _img, _ready, _lastBadge, _running, _readyCb, _stop, _browser, _animTimeout, _drawTimeout;
var _opt, _orig, _h, _w, _canvas, _context, _img, _ready, _lastBadge, _running, _readyCb, _stop, _browser, _animTimeout, _drawTimeout, _doc;
_browser = {};
_browser.ff = typeof InstallTrigger != 'undefined';
@@ -62,6 +64,8 @@
_opt.position = _opt.position.toLowerCase();
_opt.animation = (animation.types['' + _opt.animation]) ? _opt.animation : _def.animation;
_doc = _opt.win.document;
var isUp = _opt.position.indexOf('up') > -1;
var isLeft = _opt.position.indexOf('left') > -1;
@@ -97,6 +101,7 @@
//create temp image
_img = document.createElement('img');
if (_orig.hasAttribute('href')) {
_img.setAttribute('crossOrigin', 'anonymous');
_img.setAttribute('src', _orig.getAttribute('href'));
//get width/height
_img.onload = function() {
@@ -320,14 +325,14 @@
});
_queue.push(q);
if (_queue.length > 100) {
throw 'Too many badges requests in queue.';
throw new Error('Too many badges requests in queue.');
}
icon.start();
} else {
icon.reset();
}
} catch(e) {
throw 'Error setting badge. Message: ' + e.message;
throw new Error('Error setting badge. Message: ' + e.message);
}
};
if (_ready) {
@@ -345,6 +350,7 @@
var h = imageElement.height;
var newImg = document.createElement('img');
var ratio = (w / _w < h / _h) ? (w / _w) : (h / _h);
newImg.setAttribute('crossOrigin', 'anonymous');
newImg.setAttribute('src', imageElement.getAttribute('src'));
newImg.height = (h / ratio);
newImg.width = (w / ratio);
@@ -352,7 +358,7 @@
_context.drawImage(newImg, 0, 0, _w, _h);
link.setIcon(_canvas);
} catch(e) {
throw 'Error setting image. Message: ' + e.message;
throw new Error('Error setting image. Message: ' + e.message);
}
};
if (_ready) {
@@ -379,7 +385,7 @@
}, false);
} catch(e) {
throw 'Error setting video. Message: ' + e.message;
throw new Error('Error setting video. Message: ' + e.message);
}
};
if (_ready) {
@@ -421,7 +427,7 @@
}, function() {
});
} catch(e) {
throw 'Error setting webcam. Message: ' + e.message;
throw new Error('Error setting webcam. Message: ' + e.message);
}
};
if (_ready) {
@@ -457,7 +463,7 @@
var elm = false;
//get link element
var getLink = function() {
var link = document.getElementsByTagName('head')[0].getElementsByTagName('link');
var link = _doc.getElementsByTagName('head')[0].getElementsByTagName('link');
for (var l = link.length, i = (l - 1); i >= 0; i--) {
if ((/(^|\s)icon(\s|$)/i).test(link[i].getAttribute('rel'))) {
return link[i];
@@ -469,15 +475,15 @@
elm = _opt.element;
} else if (_opt.elementId) {
//if img element identified by elementId
elm = document.getElementById(_opt.elementId);
elm = _doc.getElementById(_opt.elementId);
elm.setAttribute('href', elm.getAttribute('src'));
} else {
//if link element
elm = getLink();
if (elm === false) {
elm = document.createElement('link');
elm = _doc.createElement('link');
elm.setAttribute('rel', 'icon');
document.getElementsByTagName('head')[0].appendChild(elm);
_doc.getElementsByTagName('head')[0].appendChild(elm);
}
}
elm.setAttribute('type', 'image/png');
@@ -490,24 +496,27 @@
_opt.dataUrl(url);
}
if (_opt.element) {
_opt.element.setAttribute('href', url);
_opt.element.setAttribute('src', url);
} else if (_opt.elementId) {
//if is attached to element (image)
document.getElementById(_opt.elementId).setAttribute('src', url);
var elm = _doc.getElementById(_opt.elementId);
elm.setAttribute('href', url);
elm.setAttribute('src', url);
} else {
//if is attached to fav icon
if (_browser.ff || _browser.opera) {
//for FF we need to "recreate" element, atach to dom and remove old <link>
//var originalType = _orig.getAttribute('rel');
var old = _orig;
_orig = document.createElement('link');
_orig = _doc.createElement('link');
//_orig.setAttribute('rel', originalType);
if (_browser.opera) {
_orig.setAttribute('rel', 'icon');
}
_orig.setAttribute('rel', 'icon');
_orig.setAttribute('type', 'image/png');
document.getElementsByTagName('head')[0].appendChild(_orig);
_doc.getElementsByTagName('head')[0].appendChild(_orig);
_orig.setAttribute('href', url);
if (old.parentNode) {
old.parentNode.removeChild(old);
@@ -553,7 +562,7 @@
* http://stackoverflow.com/questions/12536562/detect-whether-a-window-is-visible
*/
function isPageHidden() {
return document.hidden || document.msHidden || document.webkitHidden || document.mozHidden;
return _doc.hidden || _doc.msHidden || _doc.webkitHidden || _doc.mozHidden;
}
/**
@@ -840,4 +849,3 @@
}
})();
+3822 -2260
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+31 -20
Ver Arquivo
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
+10 -5
Ver Arquivo
@@ -124,12 +124,17 @@
if (this._jidVerIndex[jid] && feature !== null && typeof feature !== 'undefined') {
if(!$.isArray(feature)){
feature = $.makeArray(feature);
};
}
var i;
var i, knownCapabilities;
knownCapabilities = this._knownCapabilities[this._jidVerIndex[jid]];
if (!knownCapabilities) {
return null;
}
for (i = 0; i < feature.length; i++) {
if (this._knownCapabilities[this._jidVerIndex[jid]]['features'].indexOf(feature[i]) < 0)
if (knownCapabilities['features'].indexOf(feature[i]) < 0) {
return false;
}
}
return true;
}
@@ -156,7 +161,7 @@
}
localStorage.setItem('strophe.caps._jidVerIndex', JSON.stringify(this._jidVerIndex));
$(document).trigger('caps.strophe', [ from ]);
$(document).trigger('caps.strophe', [ from, this._knownCapabilities[ver], ver]);
return true;
},
@@ -223,7 +228,7 @@
localStorage.setItem('strophe.caps._jidVerIndex', JSON.stringify(this._jidVerIndex));
localStorage.setItem('strophe.caps._knownCapabilities', JSON.stringify(this._knownCapabilities));
$(document).trigger('caps.strophe', [ from ]);
$(document).trigger('caps.strophe', [ from, this._knownCapabilities[ver], ver ]);
return false;
},
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+1 -1
Ver Arquivo
@@ -344,7 +344,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:43 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:21 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+1 -1
Ver Arquivo
@@ -54,7 +54,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:43 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:21 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+1 -1
Ver Arquivo
@@ -547,7 +547,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:44 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:22 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+2 -2
Ver Arquivo
@@ -2440,7 +2440,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line852">line 852</a>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line855">line 855</a>
</li></ul></dd>
@@ -3404,7 +3404,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:44 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:22 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+1 -1
Ver Arquivo
@@ -464,7 +464,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:44 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:22 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+1 -1
Ver Arquivo
@@ -1533,7 +1533,7 @@ alphabetical of the name
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:44 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:22 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+1 -1
Ver Arquivo
@@ -2529,7 +2529,7 @@ created.
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:44 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:22 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+1 -1
Ver Arquivo
@@ -4443,7 +4443,7 @@ normal signal
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:43 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:22 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+3 -3
Ver Arquivo
@@ -1467,7 +1467,7 @@ jsxc.gui.roster = {
});
$('#jsxc_roster .jsxc_onlineHelp').click(function() {
window.open("http://www.jsxc.org/manual.html", "onlineHelp");
window.open(jsxc.options.onlineHelp, 'onlineHelp');
});
$('#jsxc_roster .jsxc_about').click(function() {
@@ -2281,7 +2281,7 @@ jsxc.gui.window = {
encrypted = encrypted || data.msgstate === OTR.CONST.MSGSTATE_ENCRYPTED;
var post = jsxc.storage.saveMessage(bid, direction, msg, encrypted, forwarded, stamp, sender);
if (direction === 'in') {
if (direction === 'in' && !jsxc.gui.window.get(bid).find('.jsxc_textinput').is(":focus")) {
jsxc.gui.unreadMsg(bid);
$(document).trigger('postmessagein.jsxc', [bid, html_msg]);
@@ -2531,7 +2531,7 @@ jsxc.gui.template.get = function(name, bid, msg) {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:43 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:21 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+2 -2
Ver Arquivo
@@ -656,7 +656,7 @@ jsxc = {
* @returns comparable bar jid
*/
jidToBid: function(jid) {
return Strophe.getBareJidFromJid(jid).toLowerCase();
return Strophe.unescapeNode(Strophe.getBareJidFromJid(jid).toLowerCase());
},
/**
@@ -880,7 +880,7 @@ jsxc = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:43 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:21 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+1 -1
Ver Arquivo
@@ -1516,7 +1516,7 @@ $(document).one('connected.jsxc', function() {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:43 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:21 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+1 -1
Ver Arquivo
@@ -157,7 +157,7 @@ jsxc.notice = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:43 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:21 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+1 -1
Ver Arquivo
@@ -315,7 +315,7 @@ jsxc.notification = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:43 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:21 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+5 -2
Ver Arquivo
@@ -254,7 +254,10 @@ jsxc.options = {
iceServers: [{
urls: 'stun:stun.stunprotocol.org'
}]
}
},
/** Link to an online user manual */
onlineHelp: 'http://www.jsxc.org/manual.html'
};
</code></pre>
</article>
@@ -272,7 +275,7 @@ jsxc.options = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:43 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:21 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+1 -1
Ver Arquivo
@@ -527,7 +527,7 @@ jsxc.otr = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:43 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:21 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+7 -2
Ver Arquivo
@@ -77,7 +77,12 @@ jsxc.storage = {
}
if (typeof(value) === 'object') {
value = JSON.stringify(value);
// exclude jquery objects, because otherwise safari will fail
value = JSON.stringify(value, function(key, val) {
if (!(val instanceof jQuery)) {
return val;
}
});
}
localStorage.setItem(jsxc.storage.getPrefix(uk) + key, value);
@@ -665,7 +670,7 @@ jsxc.storage = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:43 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:21 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+4 -1
Ver Arquivo
@@ -500,6 +500,9 @@ jsxc.webrtc = {
*/
onMediaFailure: function(ev, err) {
var self = jsxc.webrtc;
err = err || {
name: 'Undefined'
};
self.setStatus('media failure');
@@ -1031,7 +1034,7 @@ $(document).ready(function() {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:43 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:21 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+5 -6
Ver Arquivo
@@ -38,7 +38,7 @@ jsxc.xmpp.bookmarks = {};
* @return {boolean} True: Server supports bookmark storage
*/
jsxc.xmpp.bookmarks.remote = function() {
return jsxc.xmpp.conn.caps && jsxc.xmpp.conn.caps.hasFeatureByJid(jsxc.xmpp.conn.domain, Strophe.NS.PUBSUB + "#publish");
return jsxc.xmpp.conn.caps && jsxc.xmpp.hasFeatureByJid(jsxc.xmpp.conn.domain, Strophe.NS.PUBSUB + "#publish");
};
/**
@@ -53,12 +53,11 @@ jsxc.xmpp.bookmarks.load = function() {
if (!ver || !caps._knownCapabilities[ver]) {
// wait until we know server capabilities
$(document).on('caps.strophe', function(ev, from) {
if (from === jsxc.xmpp.conn.domain) {
jsxc.xmpp.bookmarks.load();
if (from !== jsxc.xmpp.conn.domain) {
return;
$(document).off(ev);
}
jsxc.xmpp.bookmarks.load();
});
}
@@ -383,7 +382,7 @@ jsxc.xmpp.bookmarks.showDialog = function(room) {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:43 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:21 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+52 -1
Ver Arquivo
@@ -1090,6 +1090,57 @@ jsxc.xmpp = {
return knownCapabilities[jidVerIndex[jid]];
}
return null;
},
/**
* Test if jid has given features
*
* @param {string} jid Jabber id
* @param {string[]} feature Single feature or list of features
* @param {Function} cb Called with the result as first param.
* @return {boolean} True, if jid has all given features. Null, if we do not know it currently.
*/
hasFeatureByJid: function(jid, feature, cb) {
var conn = jsxc.xmpp.conn;
cb = cb || function() {};
if (!feature) {
return false;
}
if (!$.isArray(feature)) {
feature = $.makeArray(feature);
}
var check = function(knownCapabilities) {
if (!knownCapabilities) {
return null;
}
var i;
for (i = 0; i &lt; feature.length; i++) {
if (knownCapabilities['features'].indexOf(feature[i]) &lt; 0) {
return false;
}
}
return true;
};
if (conn.caps._jidVerIndex[jid] && conn.caps._knownCapabilities[conn.caps._jidVerIndex[jid]]) {
var hasFeature = check(conn.caps._knownCapabilities[conn.caps._jidVerIndex[jid]]);
cb(hasFeature);
return hasFeature;
}
$(document).on('strophe.caps', function(ev, j, capabilities) {
if (j === jid) {
cb(check(capabilities));
$(document).off(ev);
}
});
return null;
}
};
@@ -1188,7 +1239,7 @@ jsxc.xmpp.carbons = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:43 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:21 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+1 -1
Ver Arquivo
@@ -3353,7 +3353,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:44 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:22 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+1 -1
Ver Arquivo
@@ -1256,7 +1256,7 @@ messages.
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:44 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:23 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+55 -1
Ver Arquivo
@@ -737,6 +737,60 @@
</dl>
</dd>
<dt>
<h4 class="name" id="onlineHelp"><span class="type-signature">&lt;static> </span>onlineHelp<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Link to an online user manual
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line233">line 233</a>
</li></ul></dd>
</dl>
@@ -2144,7 +2198,7 @@ connection is found.
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:44 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:23 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+1 -1
Ver Arquivo
@@ -2024,7 +2024,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:44 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:23 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+12 -12
Ver Arquivo
@@ -270,7 +270,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line80">line 80</a>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line85">line 85</a>
</li></ul></dd>
@@ -517,7 +517,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line97">line 97</a>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line102">line 102</a>
</li></ul></dd>
@@ -667,7 +667,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line209">line 209</a>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line214">line 214</a>
</li></ul></dd>
@@ -901,7 +901,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line259">line 259</a>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line264">line 264</a>
</li></ul></dd>
@@ -1064,7 +1064,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line222">line 222</a>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line227">line 227</a>
</li></ul></dd>
@@ -1222,7 +1222,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line116">line 116</a>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line121">line 121</a>
</li></ul></dd>
@@ -1334,7 +1334,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line134">line 134</a>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line139">line 139</a>
</li></ul></dd>
@@ -1464,7 +1464,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line601">line 601</a>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line606">line 606</a>
</li></ul></dd>
@@ -1688,7 +1688,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line567">line 567</a>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line572">line 572</a>
</li></ul></dd>
@@ -2087,7 +2087,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line156">line 156</a>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line161">line 161</a>
</li></ul></dd>
@@ -2282,7 +2282,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line188">line 188</a>
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line193">line 193</a>
</li></ul></dd>
@@ -2329,7 +2329,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:44 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:23 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+12 -12
Ver Arquivo
@@ -597,7 +597,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line630">line 630</a>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line633">line 633</a>
</li></ul></dd>
@@ -925,7 +925,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line734">line 734</a>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line737">line 737</a>
</li></ul></dd>
@@ -1420,7 +1420,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line491">line 491</a>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line494">line 494</a>
</li></ul></dd>
@@ -1489,7 +1489,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line592">line 592</a>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line595">line 595</a>
</li></ul></dd>
@@ -1691,7 +1691,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line557">line 557</a>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line560">line 560</a>
</li></ul></dd>
@@ -1969,7 +1969,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line660">line 660</a>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line663">line 663</a>
</li></ul></dd>
@@ -2576,7 +2576,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line605">line 605</a>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line608">line 608</a>
</li></ul></dd>
@@ -2724,7 +2724,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line645">line 645</a>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line648">line 648</a>
</li></ul></dd>
@@ -2793,7 +2793,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line746">line 746</a>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line749">line 749</a>
</li></ul></dd>
@@ -3035,7 +3035,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line811">line 811</a>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line814">line 814</a>
</li></ul></dd>
@@ -3165,7 +3165,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line690">line 690</a>
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line693">line 693</a>
</li></ul></dd>
@@ -3324,7 +3324,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:44 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:23 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+11 -11
Ver Arquivo
@@ -258,7 +258,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line236">line 236</a>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line235">line 235</a>
</li></ul></dd>
@@ -444,7 +444,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line280">line 280</a>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line279">line 279</a>
</li></ul></dd>
@@ -630,7 +630,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line253">line 253</a>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line252">line 252</a>
</li></ul></dd>
@@ -802,7 +802,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line166">line 166</a>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line165">line 165</a>
</li></ul></dd>
@@ -974,7 +974,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line211">line 211</a>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line210">line 210</a>
</li></ul></dd>
@@ -1146,7 +1146,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line186">line 186</a>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line185">line 185</a>
</li></ul></dd>
@@ -1284,7 +1284,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line50">line 50</a>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line49">line 49</a>
</li></ul></dd>
@@ -1353,7 +1353,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line77">line 77</a>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line76">line 76</a>
</li></ul></dd>
@@ -1470,7 +1470,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line147">line 147</a>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line146">line 146</a>
</li></ul></dd>
@@ -1740,7 +1740,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line300">line 300</a>
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line299">line 299</a>
</li></ul></dd>
@@ -1787,7 +1787,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:44 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:23 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+5 -5
Ver Arquivo
@@ -66,7 +66,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1070">line 1070</a>
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1121">line 1121</a>
</li></ul></dd>
@@ -184,7 +184,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1110">line 1110</a>
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1161">line 1161</a>
</li></ul></dd>
@@ -296,7 +296,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1084">line 1084</a>
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1135">line 1135</a>
</li></ul></dd>
@@ -408,7 +408,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1136">line 1136</a>
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1187">line 1187</a>
</li></ul></dd>
@@ -455,7 +455,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:44 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:23 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
+186 -1
Ver Arquivo
@@ -957,6 +957,191 @@
</dd>
<dt>
<h4 class="name" id="hasFeatureByJid"><span class="type-signature">&lt;static> </span>hasFeatureByJid<span class="signature">(jid, feature, cb)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
</dt>
<dd>
<div class="description">
Test if jid has given features
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>jid</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Jabber id</td>
</tr>
<tr>
<td class="name"><code>feature</code></td>
<td class="type">
<span class="param-type">string[]</span>
</td>
<td class="description last">Single feature or list of features</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Called with the result as first param.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1077">line 1077</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
True, if jid has all given features. Null, if we do not know it currently.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
@@ -2572,7 +2757,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri Jul 31 2015 11:10:44 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Sep 10 2015 11:03:23 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
-2
Ver Arquivo
@@ -11,8 +11,6 @@
<!-- require:dependencies -->
<link href="../build/css/jquery-ui.min.css" media="all" rel="stylesheet" type="text/css" />
<link href="../build/css/jquery.mCustomScrollbar.css" media="all" rel="stylesheet" type="text/css" />
<link href="../build/css/jquery.colorbox.css" media="all" rel="stylesheet" type="text/css" />
<link href="../dev/css/jsxc.css" media="all" rel="stylesheet" type="text/css" />
<link href="../dev/css/jsxc.webrtc.css" media="all" rel="stylesheet" type="text/css" />
<!-- endrequire -->
-2
Ver Arquivo
@@ -11,8 +11,6 @@
<!-- require:dependencies -->
<link href="../build/css/jquery-ui.min.css" media="all" rel="stylesheet" type="text/css" />
<link href="../build/css/jquery.mCustomScrollbar.css" media="all" rel="stylesheet" type="text/css" />
<link href="../build/css/jquery.colorbox.css" media="all" rel="stylesheet" type="text/css" />
<link href="../build/css/jsxc.css" media="all" rel="stylesheet" type="text/css" />
<link href="../build/css/jsxc.webrtc.css" media="all" rel="stylesheet" type="text/css" />
<!-- endrequire -->
+10 -5
Ver Arquivo
@@ -124,12 +124,17 @@
if (this._jidVerIndex[jid] && feature !== null && typeof feature !== 'undefined') {
if(!$.isArray(feature)){
feature = $.makeArray(feature);
};
}
var i;
var i, knownCapabilities;
knownCapabilities = this._knownCapabilities[this._jidVerIndex[jid]];
if (!knownCapabilities) {
return null;
}
for (i = 0; i < feature.length; i++) {
if (this._knownCapabilities[this._jidVerIndex[jid]]['features'].indexOf(feature[i]) < 0)
if (knownCapabilities['features'].indexOf(feature[i]) < 0) {
return false;
}
}
return true;
}
@@ -156,7 +161,7 @@
}
localStorage.setItem('strophe.caps._jidVerIndex', JSON.stringify(this._jidVerIndex));
$(document).trigger('caps.strophe', [ from ]);
$(document).trigger('caps.strophe', [ from, this._knownCapabilities[ver], ver]);
return true;
},
@@ -223,7 +228,7 @@
localStorage.setItem('strophe.caps._jidVerIndex', JSON.stringify(this._jidVerIndex));
localStorage.setItem('strophe.caps._knownCapabilities', JSON.stringify(this._knownCapabilities));
$(document).trigger('caps.strophe', [ from ]);
$(document).trigger('caps.strophe', [ from, this._knownCapabilities[ver], ver ]);
return false;
},
+2 -2
Ver Arquivo
@@ -1,6 +1,6 @@
{
"name": "jsxc",
"version": "2.1.0",
"version": "2.1.4",
"description": "Real-time chat app",
"homepage": "http://www.jsxc.org/",
"bugs": "https://github.com/jsxc/jsxc/issues",
@@ -32,7 +32,7 @@
"grunt-merge-data": "^0.4.3",
"grunt-postcss": "^0.2.0",
"grunt-prettysass": "^0.2.3",
"grunt-sass": "^0.17.0",
"grunt-sass": "^1.0.0",
"grunt-search": "^0.1.6",
"grunt-shell": "^1.1.2",
"grunt-text-replace": "~0.4.0"
+25
Ver Arquivo
@@ -5,6 +5,7 @@
padding: 0;
margin: 0;
width: 204px;
li {
padding: 0;
margin: 0;
@@ -19,20 +20,25 @@
padding-left: 3px;
z-index: 85;
overflow: hidden;
&.jsxc_expand {
height: 54px;
.jsxc_avatar {
width: 48px;
height: 48px;
img {
width: 48px;
height: 48px;
}
}
}
&:hover .jsxc_avatar {
@extend %avatar-icon;
}
&.jsxc_bookmarked {
.jsxc_avatar:after {
content: " ";
@@ -45,6 +51,7 @@
background-repeat: no-repeat;
background-image: image-url("bookmark_red.svg");
}
.jsxc_bookmarkOptions {
text-indent: 9999px;
background-image: image-url("gear_white.svg");
@@ -52,35 +59,43 @@
}
}
}
.jsxc_name {
padding-right: 30px;
}
.jsxc_unreadMsg {
.jsxc_name {
padding-right: 0px;
}
}
.jsxc_oneway {
opacity: 0.7;
}
.jsxc_right {
float: right;
margin-right: 6px;
div {
font-weight: bold;
text-align: center;
font-size: 13px;
line-height: 20px;
color: $white;
&:hover {
opacity: 1.0;
}
}
}
.jsxc_unread {
margin-right: 30px;
margin-top: 6px;
}
.jsxc_control {
position: absolute;
width: 30px;
@@ -88,6 +103,7 @@
top: 0;
right: 0;
cursor: pointer;
&:after {
content: '';
position: absolute;
@@ -105,16 +121,19 @@
opacity: 0.6;
transition: transform 0.5s;
}
&:hover:after {
color: $white;
opacity: 1.0;
}
}
.jsxc_options {
height: 20px;
float: left;
border-radius: 2px;
background-color: $roster_icon_bg;
> div {
height: 20px;
width: 20px;
@@ -124,19 +143,23 @@
background-position: center center;
opacity: 0.6;
cursor: pointer;
&:hover {
opacity: 1;
}
}
}
.jsxc_chaticon {
background-image: image-url("speech_balloon_white.svg");
background-size: 15px 15px;
}
.jsxc_videoicon {
background-image: image-url("camera_icon_white.svg");
background-size: 13px 13px;
}
.jsxc_vcardicon {
font-size: 15px;
line-height: 20px;
@@ -145,9 +168,11 @@
font-weight: bold;
font-family: $font_serif;
}
li.jsxc_expand .jsxc_control:after {
transform: rotate(180deg);
}
&.jsxc_hideOffline {
.jsxc_offline {
display: none;
+5 -1
Ver Arquivo
@@ -10,11 +10,15 @@
from {
background-position: 40px 0;
}
to {
background-position: 0 0;
}
}
#jsxc_dialog {
@import "../lib/bootstrap/assets/stylesheets/bootstrap/progress-bars";
}
#jsxc_dialog {
@import "../lib/bootstrap/assets/stylesheets/bootstrap/utilities";
@@ -24,7 +28,7 @@
@import "../lib/bootstrap/assets/stylesheets/bootstrap/buttons";
@import "../lib/bootstrap/assets/stylesheets/bootstrap/button-groups";
@import "../lib/bootstrap/assets/stylesheets/bootstrap/forms";
@import "../lib/bootstrap/assets/stylesheets/bootstrap/progress-bars";
.progress {
margin-bottom: 0px;
}
+91 -1
Ver Arquivo
@@ -16,6 +16,7 @@
cursor: pointer;
text-overflow: ellipsis;
white-space: nowrap;
&:hover {
color: $name_hover;
}
@@ -34,79 +35,99 @@
background: #FFF;
width: auto;
border-radius: 5px;
* {
box-sizing: border-box;
}
ul {
list-style: none;
margin: 0;
padding: 0;
}
li {
margin: 0;
padding: 0;
}
p {
margin-bottom: 1em;
input {
margin-bottom: 5px;
width: 60%;
outline: none;
}
input[type="submit"] {
width: auto;
}
}
hr {
border: 0;
border-top: 1px solid #eee;
margin-top: 20px;
margin-bottom: 20px;
}
h3 {
font-size: 120%;
font-weight: bold;
margin-bottom: 10px;
margin-top: 20px;
}
.jsxc_right {
margin-top: 20px;
}
form {
fieldset {
margin-bottom: 30px;
}
}
fieldset {
border-bottom: 1px solid #eee;
}
legend {
border: 0;
font-size: 20px;
}
input {
outline: none;
&:invalid {
border: 1px solid $dialog_input_invalid;
}
}
.btn-group button {
margin-right: 0;
}
input[type="range"] {
display: inline;
height: 34px;
vertical-align: bottom;
}
.jsxc_fieldset {}
input[readonly] {
background-color: $dialog_input_readonly_bg;
}
.jsxc_inputinfo {
padding-left: 30%;
font-style: italic;
margin-top: -1em;
}
.jsxc_waiting {
&:before {
content: " ";
@@ -118,6 +139,7 @@
background-image: image-url("loading.gif");
}
}
.jsxc_libraries {
max-width: 300px;
}
@@ -125,6 +147,7 @@
.jsxc_avatar {
@extend %avatar-icon;
img {
display: block;
width: 25px;
@@ -137,12 +160,15 @@
ul.jsxc_vCard {
min-width: 400px;
ul {
margin-left: 20px;
}
li {
cursor: default !important;
}
strong {}
}
@@ -158,21 +184,27 @@ ul.jsxc_vCard {
border: 1px solid $spot_border !important;
line-height: 100%;
cursor: pointer;
&.jsxc_online {
background-color: $state_online;
}
&.jsxc_chat {
background-color: $state_chat;
}
&.jsxc_away {
background-color: $state_away;
}
&.jsxc_xa {
background-color: $state_xa;
}
&.jsxc_dnd {
background-color: $state_dnd;
}
&.jsxc_offline {
background-color: $state_offline;
}
@@ -186,6 +218,7 @@ ul.jsxc_vCard {
.jsxc_name {
font-style: italic;
}
.jsxc_unread {
display: block;
background-color: $unread_bg;
@@ -206,6 +239,7 @@ ul.jsxc_vCard {
cursor: pointer;
float: right;
text-align: center;
&:hover > span {
opacity: 1;
}
@@ -224,6 +258,7 @@ ul.jsxc_vCard {
float: right;
text-align: center;
line-height: 30px;
span {
background-color: $notice_bg;
border-radius: 11px;
@@ -251,28 +286,32 @@ ul.jsxc_vCard {
bottom: 0;
animation-timing-function: ease-in;
}
12% {
bottom: 5px;
animation-timing-function: ease-out;
}
25% {
bottom: 0;
animation-timing-function: ease-in;
}
37% {
bottom: 5px;
animation-timing-function: ease-out;
}
50% {
bottom: 0;
animation-timing-function: ease-in;
}
100% {
bottom: 0;
}
}
#jsxc_presence {
cursor: pointer;
padding-left: 2px;
@@ -286,6 +325,7 @@ ul.jsxc_vCard {
left: 0;
z-index: 50;
clip: rect(-10000px, 10000px, 30px, 30px);
& > ul {
list-style: none;
padding: 0;
@@ -297,6 +337,7 @@ ul.jsxc_vCard {
overflow: visible;
white-space: nowrap;
transition: right 0.5s;
& > li {
padding: 0;
margin: 0;
@@ -308,6 +349,7 @@ ul.jsxc_vCard {
margin-right: 5px;
cursor: pointer;
white-space: normal;
&.jsxc_min {
width: 200px !important;
}
@@ -321,6 +363,7 @@ ul.jsxc_vCard {
bottom: 0;
width: 30px;
height: 30px;
> {
div {
box-sizing: border-box;
@@ -333,10 +376,12 @@ ul.jsxc_vCard {
float: left;
cursor: pointer;
user-select: none;
&:hover {
background-color: $windowListSB_bg_hover;
}
}
.jsxc_disabled {
background-color: $windowListSB_bg_disabled !important;
color: $windowListSB_color_disabled;
@@ -367,6 +412,7 @@ ul.jsxc_vCard {
background-color: $window_bg;
z-index: 80;
cursor: default;
.jsxc_emoticons {
height: 30px;
width: 30px;
@@ -374,6 +420,7 @@ ul.jsxc_vCard {
top: 240px;
right: 0;
cursor: pointer;
&:after {
content: ' ';
background-image: image-url("smiley.png");
@@ -386,6 +433,7 @@ ul.jsxc_vCard {
top: 0;
left: 0;
}
ul {
display: none;
position: absolute;
@@ -397,6 +445,7 @@ ul.jsxc_vCard {
border-radius: 3px;
z-index: 200;
list-style-type: none;
&:after {
content: '';
position: absolute;
@@ -410,27 +459,33 @@ ul.jsxc_vCard {
bottom: -6px;
}
}
li {
float: right;
cursor: pointer;
}
div {
cursor: pointer;
border-radius: 3px;
background-size: 30px 30px;
width: 30px;
height: 30px;
&:hover {
background-color: $emoticon_selection_hover;
}
}
&:hover:after {
opacity: 0.5;
}
}
.jsxc_fade {
position: relative;
}
.jsxc_gradient {
display: none;
position: absolute;
@@ -441,19 +496,23 @@ ul.jsxc_vCard {
z-index: 100;
background: linear-gradient(to bottom, $window_gradient 0, rgba(0, 0, 0, 0) 100%);
}
.jsxc_avatar {
margin-top: 1px;
}
.jsxc_textarea {
width: 100%;
overflow: hidden;
padding: 3px;
}
.slimScrollDiv {
margin: 0 0 6px 0;
left: auto !important;
top: auto !important;
}
input {
&.jsxc_textinput {
width: 100%;
@@ -466,14 +525,17 @@ ul.jsxc_vCard {
box-sizing: border-box;
text-align: right;
}
&::placeholder {
color: $window_placeholder;
opacity: 0.3;
}
}
.jsxc_tools {
height: 26px;
float: right;
> div {
width: 17px;
height: 26px;
@@ -486,15 +548,19 @@ ul.jsxc_vCard {
text-align: center;
}
}
.jsxc_close {
font-size: 20px;
&:hover {
color: $window_close_hover;
}
}
.ui-resizable-w {
left: 0;
}
.ui-resizable-nw {
top: 0;
left: 0;
@@ -503,6 +569,7 @@ ul.jsxc_vCard {
z-index: 95 !important;
background-image: image-url("resize_gray.svg");
}
.ui-resizable-n {
position: absolute;
top: 0;
@@ -524,15 +591,18 @@ ul.jsxc_vCard {
position: relative;
outline: none;
clear: both;
a {
color: $chatmessage_a;
text-decoration: underline;
}
img {
width: 19px;
height: 19px;
background-size: 19px 19px;
}
.jsxc_avatar {
display: none;
}
@@ -555,6 +625,7 @@ ul.jsxc_vCard {
background: $chatmessage_in_bg;
border: solid 1px $chatmessage_in_border;
border-radius: 3px;
&:after {
content: '';
position: absolute;
@@ -567,6 +638,7 @@ ul.jsxc_vCard {
left: -6px;
bottom: 10px;
}
.jsxc_timestamp {
float: left;
}
@@ -579,6 +651,7 @@ ul.jsxc_vCard {
background: $chatmessage_out_bg;
border: solid 1px $chatmessage_out_border;
border-radius: 3px;
&:after {
content: '';
position: absolute;
@@ -591,6 +664,7 @@ ul.jsxc_vCard {
right: -6px;
bottom: 10px;
}
&.jsxc_received {
&:before {
content: '';
@@ -601,10 +675,12 @@ ul.jsxc_vCard {
line-height: 12px;
color: $chatmessage_received;
}
.jsxc_timestamp {
margin-right: 4px;
}
}
.jsxc_timestamp {
float: right;
}
@@ -625,9 +701,11 @@ div.jsxc_settings {
background-repeat: no-repeat;
background-position: center center;
overflow: visible;
&:hover, .hover {
background-image: image-url("gear_white.svg");
}
ul {
list-style: none;
padding: 0;
@@ -641,6 +719,7 @@ div.jsxc_settings {
background-color: $window_settings_bg;
display: none;
}
li {
width: 170px;
margin-left: 20px;
@@ -649,13 +728,16 @@ div.jsxc_settings {
line-height: 30px;
text-align: left;
cursor: pointer;
&:first-child {
border-top: 1px solid $window_settings_border_top;
}
&.jsxc_disabled {
color: $window_settings_disabled;
cursor: default;
}
&:hover:not(.jsxc_disabled) {
color: $window_settings_color_hover;
background-color: $window_settings_bg_hover;
@@ -665,18 +747,23 @@ div.jsxc_settings {
div.jsxc_transfer {
@extend %padlock-icon;
&:hover {
background-image: image-url("padlock_open_white.svg");
}
&.jsxc_fin {
background-image: image-url("padlock_close_grey.svg");
}
&.jsxc_enc {
background-image: image-url("padlock_close_orange.svg");
&.jsxc_trust {
background-image: image-url("padlock_close_green.svg");
}
}
&.jsxc_disabled:hover {
@extend %padlock-icon;
}
@@ -750,6 +837,7 @@ img.jsxc_vCard {
margin-bottom: 20px;
border: 1px solid transparent;
border-radius: 4px;
&.jsxc_alert-warning {
color: #8a6d3b;
background-color: #fcf8e3;
@@ -766,11 +854,13 @@ img.jsxc_vCard {
color: #555;
border: 1px solid rgba(190, 190, 190, 0.9);
cursor: pointer;
&.jsxc_btn-primary {
color: #fff;
background-color: #337ab7;
border-color: #2e6da4;
}
&[disabled], &[disabled]:hover {
opacity: 0.65;
cursor: not-allowed;
+20
Ver Arquivo
@@ -10,26 +10,33 @@
.jsxc_fade {
padding-top: 30px;
}
.jsxc_video {
display: none;
}
.jsxc_transfer {
display: none;
}
.jsxc_fingerprints, .jsxc_verification, .jsxc_transfer {
display: none;
}
.jsxc_members {
background-image: image-url("group_grey.svg");
background-size: 90%;
background-repeat: no-repeat;
background-position: center;
&:hover {
background-image: image-url("group_white.svg");
}
}
.jsxc_chatmessage.jsxc_in {
margin-left: 40px;
.jsxc_avatar {
display: block;
position: absolute;
@@ -38,12 +45,14 @@
background-color: #777;
}
}
.jsxc_bar {
.jsxc_avatar {
@extend %muc-avatar-icon;
}
}
}
.jsxc_memberlist {
height: 30px;
width: 100%;
@@ -53,6 +62,7 @@
top: 0px;
transition: height 400ms;
z-index: 100;
ul {
white-space: nowrap;
position: absolute;
@@ -61,36 +71,45 @@
overflow: hidden;
transition: left 400ms;
padding: 0px;
& > li {
display: inline-block;
white-space: normal;
&:last-child {
margin-right: 2px;
}
.jsxc_name {
display: none;
}
.jsxc_avatar {
margin-left: 2px;
margin-right: 0px;
}
}
}
&.jsxc_expand {
ul {
white-space: normal;
& > li {
display: block;
width: 100%;
height: 27px;
line-height: 27px;
.jsxc_name {
display: block;
cursor: default;
&:hover {
color: inherit;
}
}
.jsxc_avatar {
margin-right: 4px;
}
@@ -104,6 +123,7 @@ li[data-type="groupchat"] {
.jsxc_avatar {
@extend %muc-avatar-icon;
}
.jsxc_video {
display: none;
}
+23
Ver Arquivo
@@ -10,14 +10,17 @@
margin-left: 10px;
box-shadow: 0px 0px 7px $shadow;
background-color: $roster_bg;
a {
cursor: pointer;
}
.slimScrollDiv {
left: -4px;
margin-bottom: 30px;
z-index: 40;
}
.jsxc_wait {
position: absolute;
top: 0;
@@ -27,15 +30,18 @@
padding: 20px;
background-color: $white;
z-index: 60;
img {
padding: 5px;
}
h3 {
margin-bottom: 5px;
font-size: 1.13em;
font-weight: bold;
}
}
input {
position: absolute;
top: 50%;
@@ -51,33 +57,41 @@
box-shadow: inner 0 0 5px $roster_input_shadow;
outline: none;
}
p {
color: $roster_color;
padding: 10px;
a {
color: $roster_a;
text-decoration: underline;
}
}
.jsxc_avatar {
position: relative;
cursor: pointer;
img {
cursor: pointer;
}
}
.jsxc_expand input {
left: 51px;
width: 137px;
}
&.jsxc_noConnection {
.slimScrollDiv {
display: none;
}
> .jsxc_bottom {
display: none;
}
}
&.jsxc_state_hidden {
#jsxc_toggleRoster {
&:before {
@@ -96,9 +110,11 @@
z-index: 110;
background-color: transparent;
cursor: pointer;
&:hover {
background-color: $roster_toggle_hover;
}
&:before {
content: '';
position: absolute;
@@ -128,6 +144,7 @@
cursor: pointer;
line-height: 30px;
z-index: 50;
ul {
width: 190px;
position: absolute;
@@ -138,10 +155,12 @@
padding-left: 10px;
background-color: $roster_bottom_bg;
margin: 0;
li:last-child {
border-bottom: 1px solid $roster_bottom_border_top;
}
}
li {
height: 30px;
background-color: $roster_bottom_bg;
@@ -154,19 +173,23 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
&.jsxc_disabled {
color: $roster_bottom_disabled;
cursor: default;
}
&:hover:not(.jsxc_disabled) {
color: $roster_bottom_color_hover;
background-color: $roster_bottom_bg_hover;
}
}
}
&.jsxc_bottom > div > span {
cursor: pointer;
}
&.jsxc_bottom > div:hover {
color: $roster_bottom_color_hover;
}
+29 -1
Ver Arquivo
@@ -12,6 +12,7 @@
.jsxc_webrtc {
width: 900px;
.jsxc_status {
z-index: 9999;
border-radius: 20px;
@@ -25,11 +26,14 @@
font-weight: bold;
text-align: center;
}
.slimScrollDiv {
opacity: 1 !important;
}
li .jsxc_name {
cursor: auto;
&:hover {
color: $window_bar_color;
}
@@ -41,9 +45,11 @@
height: 480px;
position: relative;
background-color: $video_bg;
video {
display: none;
}
.jsxc_noRemoteVideo {
display: none;
}
@@ -55,6 +61,7 @@
.jsxc_noRemoteVideo {
@extend %fullscreen;
p {
position: absolute;
bottom: 0;
@@ -64,6 +71,7 @@
width: 100%;
z-index: 100;
}
> div {
width: 200px;
height: 200px;
@@ -73,8 +81,10 @@
margin-top: -100px;
left: 50%;
margin-left: -100px;
> div {
background-color: $novideo_bg;
&:first-child {
width: 50%;
height: 50%;
@@ -84,6 +94,7 @@
margin-left: -25%;
top: 10%;
}
&:last-child {
position: absolute;
bottom: -50%;
@@ -111,23 +122,28 @@ div {
width: 100%;
height: 100%;
background-color: $black;
&.jsxc_localvideo {
border: 1px solid $white;
}
}
&:fullscreen {
width: 100%;
height: 100%;
background-color: $black;
&.jsxc_localvideo {
border: 1px solid $white;
}
}
&.jsxc_video {
background-image: image-url("camera_icon_grey.svg");
background-repeat: no-repeat;
background-position: center center;
background-size: 15px 15px;
&:not(.jsxc_disabled) {
&:hover {
background-image: image-url("camera_icon_white.svg");
@@ -139,6 +155,7 @@ div {
.jsxc_controlbar {
width: 640px;
margin-top: 10px;
.jsxc_showchat {
float: right;
}
@@ -151,6 +168,7 @@ div {
.jsxc_snapshotbar {
width: 100%;
display: none;
img {
height: 50px;
}
@@ -158,12 +176,14 @@ div {
.jsxc_buttongroup {
display: inline;
button {
&:first-child {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
margin-right: 0;
}
&:last-child {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
@@ -178,20 +198,26 @@ div {
height: 480px;
width: 250px;
background-color: $window_bg;
.jsxc_settings {
display: none !important;
}
.jsxc_close {
display: none !important;
}
.jsxc_video {
display: none !important;
}
.jsxc_bar {}
.jsxc_window {
bottom: 0;
box-shadow: none;
}
> ul {
width: 250px;
height: 480px;
@@ -208,6 +234,7 @@ div {
top: 40%;
left: 50%;
margin-left: -64px;
span {
display: inline-block;
vertical-align: middle;
@@ -239,6 +266,7 @@ div {
background-color: $bubbling_start_bg;
transform: translateY(0);
}
100% {
width: 39px;
height: 39px;
@@ -247,7 +275,6 @@ div {
}
}
.jsxc_fullscreen.jsxc_localvideo {
border: 1px solid $white;
}
@@ -258,6 +285,7 @@ div {
#jsxc_buddylist .jsxc_options .jsxc_video {
background-image: image-url("camera_icon_white.svg");
&.jsxc_disabled {
opacity: 0.2;
}
+2 -2
Ver Arquivo
@@ -1440,7 +1440,7 @@ jsxc.gui.roster = {
});
$('#jsxc_roster .jsxc_onlineHelp').click(function() {
window.open("http://www.jsxc.org/manual.html", "onlineHelp");
window.open(jsxc.options.onlineHelp, 'onlineHelp');
});
$('#jsxc_roster .jsxc_about').click(function() {
@@ -2254,7 +2254,7 @@ jsxc.gui.window = {
encrypted = encrypted || data.msgstate === OTR.CONST.MSGSTATE_ENCRYPTED;
var post = jsxc.storage.saveMessage(bid, direction, msg, encrypted, forwarded, stamp, sender);
if (direction === 'in') {
if (direction === 'in' && !jsxc.gui.window.get(bid).find('.jsxc_textinput').is(":focus")) {
jsxc.gui.unreadMsg(bid);
$(document).trigger('postmessagein.jsxc', [bid, html_msg]);
+1 -1
Ver Arquivo
@@ -629,7 +629,7 @@ jsxc = {
* @returns comparable bar jid
*/
jidToBid: function(jid) {
return Strophe.getBareJidFromJid(jid).toLowerCase();
return Strophe.unescapeNode(Strophe.getBareJidFromJid(jid).toLowerCase());
},
/**
+4 -1
Ver Arquivo
@@ -227,5 +227,8 @@ jsxc.options = {
iceServers: [{
urls: 'stun:stun.stunprotocol.org'
}]
}
},
/** Link to an online user manual */
onlineHelp: 'http://www.jsxc.org/manual.html'
};
+6 -1
Ver Arquivo
@@ -50,7 +50,12 @@ jsxc.storage = {
}
if (typeof(value) === 'object') {
value = JSON.stringify(value);
// exclude jquery objects, because otherwise safari will fail
value = JSON.stringify(value, function(key, val) {
if (!(val instanceof jQuery)) {
return val;
}
});
}
localStorage.setItem(jsxc.storage.getPrefix(uk) + key, value);
+3
Ver Arquivo
@@ -473,6 +473,9 @@ jsxc.webrtc = {
*/
onMediaFailure: function(ev, err) {
var self = jsxc.webrtc;
err = err || {
name: 'Undefined'
};
self.setStatus('media failure');
+4 -5
Ver Arquivo
@@ -11,7 +11,7 @@ jsxc.xmpp.bookmarks = {};
* @return {boolean} True: Server supports bookmark storage
*/
jsxc.xmpp.bookmarks.remote = function() {
return jsxc.xmpp.conn.caps && jsxc.xmpp.conn.caps.hasFeatureByJid(jsxc.xmpp.conn.domain, Strophe.NS.PUBSUB + "#publish");
return jsxc.xmpp.conn.caps && jsxc.xmpp.hasFeatureByJid(jsxc.xmpp.conn.domain, Strophe.NS.PUBSUB + "#publish");
};
/**
@@ -26,12 +26,11 @@ jsxc.xmpp.bookmarks.load = function() {
if (!ver || !caps._knownCapabilities[ver]) {
// wait until we know server capabilities
$(document).on('caps.strophe', function(ev, from) {
if (from === jsxc.xmpp.conn.domain) {
jsxc.xmpp.bookmarks.load();
if (from !== jsxc.xmpp.conn.domain) {
return;
$(document).off(ev);
}
jsxc.xmpp.bookmarks.load();
});
}
+51
Ver Arquivo
@@ -1063,6 +1063,57 @@ jsxc.xmpp = {
return knownCapabilities[jidVerIndex[jid]];
}
return null;
},
/**
* Test if jid has given features
*
* @param {string} jid Jabber id
* @param {string[]} feature Single feature or list of features
* @param {Function} cb Called with the result as first param.
* @return {boolean} True, if jid has all given features. Null, if we do not know it currently.
*/
hasFeatureByJid: function(jid, feature, cb) {
var conn = jsxc.xmpp.conn;
cb = cb || function() {};
if (!feature) {
return false;
}
if (!$.isArray(feature)) {
feature = $.makeArray(feature);
}
var check = function(knownCapabilities) {
if (!knownCapabilities) {
return null;
}
var i;
for (i = 0; i < feature.length; i++) {
if (knownCapabilities['features'].indexOf(feature[i]) < 0) {
return false;
}
}
return true;
};
if (conn.caps._jidVerIndex[jid] && conn.caps._knownCapabilities[conn.caps._jidVerIndex[jid]]) {
var hasFeature = check(conn.caps._knownCapabilities[conn.caps._jidVerIndex[jid]]);
cb(hasFeature);
return hasFeature;
}
$(document).on('strophe.caps', function(ev, j, capabilities) {
if (j === jid) {
cb(check(capabilities));
$(document).off(ev);
}
});
return null;
}
};
+1 -1
Ver Arquivo
@@ -15,7 +15,7 @@
</p>
<p class="jsxc_libraries">
<b>Libraries: </b>
< $ dep.libraries $>
<$ dep.libraries $>
</p>
<button class="btn btn-default pull-right jsxc_debuglog">Show debug log</button>