diff options
-rw-r--r-- | CHANGELOG.md | 6 | ||||
-rw-r--r-- | app.json | 2 | ||||
-rwxr-xr-x | appinfo/info.xml | 2 | ||||
-rwxr-xr-x | appinfo/version | 2 | ||||
-rw-r--r-- | build/appinfo/info.xml | 2 | ||||
-rw-r--r-- | build/appinfo/version | 2 | ||||
-rw-r--r-- | build/css/jsxc.oc.css | 4 | ||||
-rw-r--r-- | build/js/admin.js | 4 | ||||
-rw-r--r-- | build/js/eof.js | 4 | ||||
-rw-r--r-- | build/js/jsxc/jsxc.lib.js | 67 | ||||
-rw-r--r-- | build/js/jsxc/jsxc.lib.webrtc.js | 66 | ||||
-rw-r--r-- | build/js/jsxc/lib/jquery.fullscreen.js | 17 | ||||
-rw-r--r-- | build/js/ojsxc.js | 4 | ||||
m--------- | js/jsxc | 0 |
14 files changed, 126 insertions, 56 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e28fdc..efe1f16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +v0.7.0 / 2014-03-07 +=== +- upgrade jsxc to v0.7.0 +- enable otr debugging +- add oc avatars + v0.6.0 / 2014-02-28 === - upgrade jsxc to v0.6.0 @@ -1,6 +1,6 @@ { "name": "ojsxc", - "version": "0.6.1-alpha3", + "version": "0.7.0", "description": "Real-time chat app for owncloud", "homepage": "http://jsxc.org/", "license": "MIT", diff --git a/appinfo/info.xml b/appinfo/info.xml index d27af29..e1bbb0e 100755 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -3,7 +3,7 @@ <id>ojsxc</id> <name>JavaScript XMPP Chat</name> <description>XMPP Chat with OTR</description> - <version>0.6.0</version> + <version>0.7.0</version> <licence>MIT</licence> <author>Klaus Herberth</author> <require>5</require> diff --git a/appinfo/version b/appinfo/version index 09a3acf..bcaffe1 100755 --- a/appinfo/version +++ b/appinfo/version @@ -1 +1 @@ -0.6.0
\ No newline at end of file +0.7.0
\ No newline at end of file diff --git a/build/appinfo/info.xml b/build/appinfo/info.xml index d27af29..e1bbb0e 100644 --- a/build/appinfo/info.xml +++ b/build/appinfo/info.xml @@ -3,7 +3,7 @@ <id>ojsxc</id> <name>JavaScript XMPP Chat</name> <description>XMPP Chat with OTR</description> - <version>0.6.0</version> + <version>0.7.0</version> <licence>MIT</licence> <author>Klaus Herberth</author> <require>5</require> diff --git a/build/appinfo/version b/build/appinfo/version index 09a3acf..bcaffe1 100644 --- a/build/appinfo/version +++ b/build/appinfo/version @@ -1 +1 @@ -0.6.0
\ No newline at end of file +0.7.0
\ No newline at end of file diff --git a/build/css/jsxc.oc.css b/build/css/jsxc.oc.css index 6ce48b1..f09f698 100644 --- a/build/css/jsxc.oc.css +++ b/build/css/jsxc.oc.css @@ -1,5 +1,5 @@ /** - * ojsxc v0.6.1-alpha3 - 2014-03-06 + * ojsxc v0.7.0 - 2014-03-07 * * Copyright (c) 2014 Klaus Herberth <klaus@jsxc.org> <br> * Released under the MIT license @@ -7,7 +7,7 @@ * Please see http://jsxc.org/ * * @author Klaus Herberth <klaus@jsxc.org> - * @version 0.6.1-alpha3 + * @version 0.7.0 */ .jsxc_online,.jsxc_chat { diff --git a/build/js/admin.js b/build/js/admin.js index 6606d06..04fbe37 100644 --- a/build/js/admin.js +++ b/build/js/admin.js @@ -1,5 +1,5 @@ /** - * ojsxc v0.6.1-alpha3 - 2014-03-06 + * ojsxc v0.7.0 - 2014-03-07 * * Copyright (c) 2014 Klaus Herberth <klaus@jsxc.org> <br> * Released under the MIT license @@ -7,7 +7,7 @@ * Please see http://jsxc.org/ * * @author Klaus Herberth <klaus@jsxc.org> - * @version 0.6.1-alpha3 + * @version 0.7.0 */ $(document).ready(function() { diff --git a/build/js/eof.js b/build/js/eof.js index 836ceb2..a76374f 100644 --- a/build/js/eof.js +++ b/build/js/eof.js @@ -1,5 +1,5 @@ /** - * ojsxc v0.6.1-alpha3 - 2014-03-06 + * ojsxc v0.7.0 - 2014-03-07 * * Copyright (c) 2014 Klaus Herberth <klaus@jsxc.org> <br> * Released under the MIT license @@ -7,7 +7,7 @@ * Please see http://jsxc.org/ * * @author Klaus Herberth <klaus@jsxc.org> - * @version 0.6.1-alpha3 + * @version 0.7.0 */ /** diff --git a/build/js/jsxc/jsxc.lib.js b/build/js/jsxc/jsxc.lib.js index e78437d..45f07e8 100644 --- a/build/js/jsxc/jsxc.lib.js +++ b/build/js/jsxc/jsxc.lib.js @@ -1,5 +1,5 @@ /** - * jsxc v0.6.1-alpha3 - 2014-03-06 + * jsxc v0.7.0 - 2014-03-07 * * Copyright (c) 2014 Klaus Herberth <klaus@jsxc.org> <br> * Released under the MIT license @@ -7,7 +7,7 @@ * Please see http://jsxc.org/ * * @author Klaus Herberth <klaus@jsxc.org> - * @version 0.6.1-alpha3 + * @version 0.7.0 */ var jsxc; @@ -22,7 +22,7 @@ var jsxc; */ jsxc = { /** Version of jsxc */ - version: '0.6.1-alpha3', + version: '0.7.0', /** True if i'm the master */ master: false, @@ -164,15 +164,28 @@ var jsxc; init: function(options) { if (options) { + // override default options $.extend(jsxc.options, options); } + /** + * Getter method for options. Saved options will override default one. + * + * @param {string} key option key + * @returns default or saved option value + */ jsxc.options.get = function(key) { var local = jsxc.storage.getUserItem('options') || {}; return local[key] || options[key]; }; + /** + * Setter method for options. Will write into localstorage. + * + * @param {string} key option key + * @param {object} value option value + */ jsxc.options.set = function(key, value) { jsxc.storage.updateUserItem('options', key, value); }; @@ -184,7 +197,9 @@ var jsxc; // detect language var lang; - if (jsxc.options.autoLang && navigator.language) { + if (jsxc.storage.getItem('lang') !== null){ + lang = jsxc.storage.getItem('lang'); + } else if(jsxc.options.autoLang && navigator.language) { lang = navigator.language.substr(0, 2); } else { lang = jsxc.options.defaultLang; @@ -333,7 +348,7 @@ var jsxc; // Sending keepalive signal jsxc.startKeepAlive(); - // create or load DSA key + // create or load DSA key and call _onMaster jsxc.otr.createDSA(); }, @@ -392,7 +407,7 @@ var jsxc; }, /** - * Sends the keep-alive signal + * Sends the keep-alive signal to signal that the master is still there. */ keepAlive: function() { jsxc.storage.ink('alive'); @@ -581,7 +596,7 @@ var jsxc; jsxc.warn('No translation for: ' + k); } - return jsxc.l[k] || key; + return jsxc.l[k] || key.replace(/_/g, ' '); }); } }; @@ -629,7 +644,7 @@ var jsxc; logoutElement: null, /** - * Debug function: Expects to parameter (msg, debug) + * Debug function: Expects two parameter (msg, debug) * * @memberOf jsxc.options * @param {String} msg Message @@ -2366,12 +2381,12 @@ var jsxc; return uid; }; -// jsxc.xmpp.conn.xmlInput = function(data) { -// console.log('<', data); -// }; -// jsxc.xmpp.conn.xmlOutput = function(data) { -// console.log('>', data); -// }; + // jsxc.xmpp.conn.xmlInput = function(data) { + // console.log('<', data); + // }; + // jsxc.xmpp.conn.xmlOutput = function(data) { + // console.log('>', data); + // }; // Strophe.log = function(level, msg) { // console.log(level + " " + msg); @@ -3003,15 +3018,15 @@ var jsxc; for (i = chat.length - 1; i >= 0; i--) { if (chat[i].uid === receivedId) { chat[i].received = true; - + $('#' + receivedId).addClass('jsxc_received'); - + jsxc.storage.setUserItem('chat_' + cid, chat); break; } } } - + return true; } }; @@ -4317,7 +4332,12 @@ var jsxc; none: 'none', Unknown_instance_tag: 'Unknown instance tag.', Not_of_our_latest_keys: 'Not of our latest key.', - Received_an_unreadable_encrypted_message: 'Received an unreadable encrypted message.' + Received_an_unreadable_encrypted_message: 'Received an unreadable encrypted message.', + Online: 'Online', + Chatty: 'Chatty', + Away: 'Away', + Extended_away: 'Extended away', + Offline: 'Offline' }, de: { please_wait_until_we_logged_you_in: 'Bitte warte bis wir dich eingeloggt haben.', @@ -4396,7 +4416,7 @@ var jsxc; Hide_offline: 'Offline ausblenden', Show_offline: 'Offline einblenden', About: 'Über', - dd: 'Beschäftigt', + dnd: 'Beschäftigt', Mute: 'Ton aus', Unmute: 'Ton an', Subscription: 'Bezug', @@ -4405,12 +4425,17 @@ var jsxc; online: 'online', chat: 'chat', away: 'abwesend', - xa: 'mehr abwesend', + xa: 'länger abwesend', offline: 'offline', none: 'keine', Unknown_instance_tag: 'Unbekannter instance tag.', Not_of_our_latest_keys: 'Nicht einer unserer letzten Schlüssel.', - Received_an_unreadable_encrypted_message: 'Eine unlesbare verschlüsselte Nachricht erhalten.' + Received_an_unreadable_encrypted_message: 'Eine unlesbare verschlüsselte Nachricht erhalten.', + Online: 'Online', + Chatty: 'Gesprächig', + Away: 'Abwesend', + Extended_away: 'Länger abwesend', + Offline: 'Offline' } }; }(jQuery)); diff --git a/build/js/jsxc/jsxc.lib.webrtc.js b/build/js/jsxc/jsxc.lib.webrtc.js index 6d06c39..45834f2 100644 --- a/build/js/jsxc/jsxc.lib.webrtc.js +++ b/build/js/jsxc/jsxc.lib.webrtc.js @@ -1,5 +1,5 @@ /** - * jsxc v0.6.1-alpha3 - 2014-03-06 + * jsxc v0.7.0 - 2014-03-07 * * Copyright (c) 2014 Klaus Herberth <klaus@jsxc.org> <br> * Released under the MIT license @@ -7,7 +7,7 @@ * Please see http://jsxc.org/ * * @author Klaus Herberth <klaus@jsxc.org> - * @version 0.6.1-alpha3 + * @version 0.7.0 */ /* jsxc, Strophe, SDPUtil, getUserMediaWithConstraints, setupRTC, jQuery */ @@ -89,7 +89,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\ */ init: function() { var self = jsxc.webrtc; - + // shortcut self.conn = jsxc.xmpp.conn; @@ -125,7 +125,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\ $(document).on('error.jingle', function(ev, sid, error) { jsxc.error('[JINGLE]', error); }); - + if (self.conn.caps) { $(document).on('caps.strophe', $.proxy(self.onCaps, self)); } @@ -262,7 +262,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\ var duration = (typeof d === 'undefined' || d === null) ? 4000 : d; jsxc.debug('[Webrtc]', txt); - + if (status.html()) { // attach old messages txt = status.html() + '<br />' + txt; @@ -406,7 +406,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\ dialog.find('.jsxc_accept').click(function() { $(document).trigger('accept.call.jsxc'); - + self.reqUserMedia(); }); @@ -429,7 +429,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\ * @param reason Reason for termination * @param [text] Optional explanation */ - onCallTerminated: function(event, sid, reason, text) { + onCallTerminated: function(event, sid, reason, text) { this.setStatus('call terminated ' + sid + (reason ? (': ' + reason + ' ' + text) : '')); if (this.localStream) { @@ -442,7 +442,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\ this.conn.jingle.localStream = null; this.localStream = null; this.remoteStream = null; - + $('#jsxc_windowList > ul').prepend($('#jsxc_dialog .jsxc_chatarea > ul > li').detach()); $(document).off('cleanup.dialog.jsxc'); @@ -599,7 +599,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\ self.conn.jingle.initiate(jid, self.conn.jid.toLowerCase()); }, 'mediafailure.jingle': function() { - + jsxc.gui.dialog.close(); } }); @@ -720,11 +720,11 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\ var toggleMulti = function(elem, open) { $('#jsxc_dialog .jsxc_multi > div').not(elem).slideUp(); - + var opt = { - complete: jsxc.gui.dialog.resize + complete: jsxc.gui.dialog.resize }; - + if (open) { elem.slideDown(opt); } else { @@ -733,9 +733,9 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\ }; var win = jsxc.gui.window.open(jsxc.jidToCid(jid)); - + $('#jsxc_dialog .jsxc_chatarea ul').append(win.detach()); - + $('#jsxc_dialog .jsxc_hangUp').click(function() { jsxc.webrtc.hangUp(); }); @@ -798,4 +798,42 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\ $(document).on('attached.jsxc', jsxc.webrtc.init); } }); + + $.extend(jsxc.l10n.en, { + Please_allow_access_to_microphone_and_camera: 'Please allow access to microphone and camera.', + Incoming_call: 'Incoming call', + from: 'from', + Do_you_want_to_accept_the_call_from: 'Do you want to accept the call from', + Reject: 'Reject', + Accept: 'Accept', + hang_up: 'hang up', + snapshot: 'snapshot', + mute_my_audio: 'mute my audio', + pause_my_video: 'pause my video', + fullscreen: 'fullscreen', + Info: 'Info', + Local_IP: 'Local IP', + Remote_IP: 'Remote IP', + Local_Fingerprint: 'Local fingerprint', + Remote_Fingerprint: 'Remote fingerprint', + }); + + $.extend(jsxc.l10n.de, { + Please_allow_access_to_microphone_and_camera: 'Bitte erlaube den Zugriff auf Kamera und Mikrofon.', + Incoming_call: 'Eingehender Anruf', + from: 'von', + Do_you_want_to_accept_the_call_from: 'Möchtest Du den Anruf annehmen von', + Reject: 'Ablehnen', + Accept: 'Annehmen', + hang_up: 'Auflegen', + snapshot: 'Schnappschuss', + mute_my_audio: 'Mein Ton aus', + pause_my_video: 'Mein Video pausieren', + fullscreen: 'Vollbild', + Info: 'Info', + Local_IP: 'Lokale IP', + Remote_IP: 'Remote IP', + Local_Fingerprint: 'Lokaler Fingerprint', + Remote_Fingerprint: 'Remote Fingerprint', + }); }(jQuery)); diff --git a/build/js/jsxc/lib/jquery.fullscreen.js b/build/js/jsxc/lib/jquery.fullscreen.js index 91162d5..bab35b8 100644 --- a/build/js/jsxc/lib/jquery.fullscreen.js +++ b/build/js/jsxc/lib/jquery.fullscreen.js @@ -14,15 +14,15 @@ var doc = document.documentElement; return ('requestFullscreen' in doc) || - ('mozRequestFullscreen' in doc && document.mozFullscreenEnabled) || + ('mozRequestFullScreen' in doc && document.mozFullScreenEnabled) || ('webkitRequestFullscreen' in doc); } function requestFullscreen(elem) { if (elem.requestFullscreen) { elem.requestFullscreen(); - } else if (elem.mozRequestFullscreen) { - elem.mozRequestFullscreen(); + } else if (elem.mozRequestFullScreen) { + elem.mozRequestFullScreen(); } else if (elem.webkitRequestFullscreen) { elem.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); } @@ -38,7 +38,7 @@ function cancelFullscreen() { if (document.exitFullscreen) { document.exitFullscreen(); - } else if (document.mozCancelFullscreen) { + } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); @@ -61,16 +61,17 @@ var self = this; - $(self).on('fullscreenerror mozfullscreenerror webkitfullscreenerror msfullscreenerror', function() { + // Chrome trigger event on self, Firefox on document + $(self).add(document).on('fullscreenerror mozfullscreenerror webkitfullscreenerror msfullscreenerror', function() { $(document).trigger('error.fullscreen'); }); - $(self).on('fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange', function() { - if (fullscreenStatus()){ + $(self).add(document).on('fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange', function() { + if (fullscreenStatus()){ $(document).trigger('enabled.fullscreen'); }else{ $(document).trigger('disabled.fullscreen'); - $(self).off('fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange'); + $(self).add(document).off('fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange'); } }); diff --git a/build/js/ojsxc.js b/build/js/ojsxc.js index b42274a..e16e463 100644 --- a/build/js/ojsxc.js +++ b/build/js/ojsxc.js @@ -1,5 +1,5 @@ /** - * ojsxc v0.6.1-alpha3 - 2014-03-06 + * ojsxc v0.7.0 - 2014-03-07 * * Copyright (c) 2014 Klaus Herberth <klaus@jsxc.org> <br> * Released under the MIT license @@ -7,7 +7,7 @@ * Please see http://jsxc.org/ * * @author Klaus Herberth <klaus@jsxc.org> - * @version 0.6.1-alpha3 + * @version 0.7.0 */ /* global jsxc, oc_appswebroots, OC, $, oc_requesttoken */ diff --git a/js/jsxc b/js/jsxc -Subproject f6c03beb27244f1e26231b45acb98d4261bc651 +Subproject 01691684b11fc536cceafb9b3f32f4cb2479503 |