Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/jsxc.nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md5
-rw-r--r--Gruntfile.js2
-rw-r--r--app.json2
-rwxr-xr-xappinfo/app.php2
-rwxr-xr-xappinfo/info.xml2
-rw-r--r--build/appinfo/app.php2
-rw-r--r--build/appinfo/info.xml2
-rw-r--r--build/css/jsxc.oc.css (renamed from build/css/main.css)151
-rw-r--r--build/js/admin.js4
-rw-r--r--build/js/eof.js4
-rw-r--r--build/js/jsxc/jsxc.lib.js108
-rw-r--r--build/js/jsxc/jsxc.lib.webrtc.js81
-rw-r--r--build/js/jsxc/lib/strophe.js6
-rw-r--r--build/js/ojsxc.js4
-rw-r--r--css/jsxc.oc.css (renamed from css/main.css)141
m---------js/jsxc0
16 files changed, 220 insertions, 296 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0859763..6fadaf2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+v0.5.1 / 2014-01-27
+===
+- downgrade required oc version
+- upgrade jsxc to v0.5.1
+
v0.5.0 / 2014-01-13
===
- add hide offline buddy function
diff --git a/Gruntfile.js b/Gruntfile.js
index d9c3ecd..34d6237 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -38,7 +38,7 @@ module.exports = function(grunt) {
banner: '<%= meta.banner %>'
},
files: {
- src: [ 'build/js/*.js' ]
+ src: [ 'build/js/*.js', 'build/css/jsxc.oc.css' ]
}
}
}
diff --git a/app.json b/app.json
index 427974e..506d885 100644
--- a/app.json
+++ b/app.json
@@ -1,6 +1,6 @@
{
"name": "ojsxc",
- "version": "0.6.0a",
+ "version": "0.5.1",
"description": "Real-time chat app for owncloud",
"homepage": "http://jsxc.org/",
"license": "MIT",
diff --git a/appinfo/app.php b/appinfo/app.php
index dd87c8e..2016efd 100755
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -41,7 +41,7 @@ OCP\Util::addScript ( 'ojsxc', 'ojsxc' );
// ############# CSS #############
OCP\Util::addStyle ( 'ojsxc', 'jquery.mCustomScrollbar' );
OCP\Util::addStyle ( 'ojsxc', 'jquery.colorbox' );
-OCP\Util::addStyle ( 'ojsxc', 'main' );
+OCP\Util::addStyle ( 'ojsxc', 'jsxc.oc' );
OCP\Util::addStyle ( 'ojsxc', 'webrtc' );
OCP\Util::addStyle ( 'ojsxc', 'muc' );
// OCP\Util::addStyle ( 'ojsxc', 'log' );
diff --git a/appinfo/info.xml b/appinfo/info.xml
index faaf7e0..20e1f2a 100755
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -6,5 +6,5 @@
<version>0.5.0</version>
<licence>MIT</licence>
<author>Klaus Herberth</author>
- <require>6</require>
+ <require>5</require>
</info>
diff --git a/build/appinfo/app.php b/build/appinfo/app.php
index dd87c8e..2016efd 100644
--- a/build/appinfo/app.php
+++ b/build/appinfo/app.php
@@ -41,7 +41,7 @@ OCP\Util::addScript ( 'ojsxc', 'ojsxc' );
// ############# CSS #############
OCP\Util::addStyle ( 'ojsxc', 'jquery.mCustomScrollbar' );
OCP\Util::addStyle ( 'ojsxc', 'jquery.colorbox' );
-OCP\Util::addStyle ( 'ojsxc', 'main' );
+OCP\Util::addStyle ( 'ojsxc', 'jsxc.oc' );
OCP\Util::addStyle ( 'ojsxc', 'webrtc' );
OCP\Util::addStyle ( 'ojsxc', 'muc' );
// OCP\Util::addStyle ( 'ojsxc', 'log' );
diff --git a/build/appinfo/info.xml b/build/appinfo/info.xml
index faaf7e0..20e1f2a 100644
--- a/build/appinfo/info.xml
+++ b/build/appinfo/info.xml
@@ -6,5 +6,5 @@
<version>0.5.0</version>
<licence>MIT</licence>
<author>Klaus Herberth</author>
- <require>6</require>
+ <require>5</require>
</info>
diff --git a/build/css/main.css b/build/css/jsxc.oc.css
index a4a8a54..9913917 100644
--- a/build/css/main.css
+++ b/build/css/jsxc.oc.css
@@ -1,7 +1,14 @@
-body {
- font-family: Arial;
- font-size: 0.8em;
-}
+/**
+ * ojsxc v0.5.1 - 2014-01-27
+ *
+ * Copyright (c) 2014 Klaus Herberth <klaus@jsxc.org> <br>
+ * Released under the MIT license
+ *
+ * Please see http://jsxc.org/
+ *
+ * @author Klaus Herberth <klaus@jsxc.org>
+ * @version 0.5.1
+ */
.jsxc_online {
border-left: 4px solid #00BFFF;
@@ -19,14 +26,6 @@ body {
display: none;
}
-.chief {
- background-color: blue;
-}
-
-.sidekick {
- background-color: orange;
-}
-
.jsxc_invalid {
border: 2px solid red !important;
}
@@ -67,50 +66,7 @@ p.jsxc_center {
padding-top: 10px;
}
-#status {
- position: fixed;
- bottom: 10px;
- left: 10px;
- z-index: 1000;
- width: 20px;
- height: 20px;
- border-radius: 10px;
-}
-
-#jsxc_waitAlert {
- position: fixed;
- width: 300px;
- left: 50%;
- top: 20%;
- margin-left: -150px;
- background-color: #fff;
- z-index: 1200;
-}
-
-#jsxc_overlay {
- position: fixed;
- height: 100%;
- width: 100%;
- left: 0px;
- top: 0px;
- opacity: 0.7;
- background-color: #777;
- z-index: 1100;
-}
-
div#jsxc_roster {
- /*position:fixed;
- top:0px;
- right:0px;
- width:200px;
- overflow:visible;
- height:100%;
- border-left:4px solid #A4A4A4;
- z-index:80;
- padding-top: 40px;
- padding-bottom: 30px;
- background: url("http://localhost/owncloud/core/img/noise.png") #383C43;
- box-shadow: 0px 0px 7px #000000;*/
position: fixed;
top: 0px;
right: 0px;
@@ -134,10 +90,9 @@ div#jsxc_roster .jsxc_wait{
position:absolute;
top:45px;
left:0px;
- width:170px;
+ width:160px;
height: 100%;
- padding: 10px;
- padding-right: 20px;
+ padding: 20px;
background-color:#fff;
}
@@ -151,6 +106,22 @@ div#jsxc_roster .jsxc_wait h3 {
font-weight:bold;
}
+#jsxc_roster input{
+ position:absolute;
+ left: 31px;
+ top: 2px;
+ width: 157px;
+ height: 22px;
+ padding: 2px;
+ border:0px;
+ background-image:none;
+ background-color:#fff;
+ border-radius:3px;
+ -moz-box-shadow: inset 0 0 5px #888;
+ -webkit-box-shadow: inset 0 0 5px#888;
+ box-shadow: inner 0 0 5px #888;
+}
+
ul#jsxc_buddylist {
list-style: none;
padding: 0px;
@@ -181,8 +152,7 @@ ul#jsxc_buddylist li.jsxc_oneway {
opacity: 0.7;
}
-ul#jsxc_buddylist li .jsxc_name {
- width: 160px;
+li .jsxc_name {
overflow: hidden;
height: 30px;
cursor: pointer;
@@ -190,10 +160,6 @@ ul#jsxc_buddylist li .jsxc_name {
white-space: nowrap;
}
-ul#jsxc_buddylist li:hover .jsxc_name {
- width: 130px;
-}
-
ul#jsxc_buddylist.jsxc_hideOffline .jsxc_offline {
display: none;
}
@@ -203,7 +169,7 @@ ul#jsxc_buddylist.jsxc_hideOffline .jsxc_offline {
height: 25px;
line-height: 25px;
margin-top: 2px;
- margin-right: 2px;
+ margin-right: 4px;
background-color: #a3a3a3;
border-radius: 2px;
float: left;
@@ -277,10 +243,13 @@ div#jsxc_menu ul li:last-child {
}
ul#jsxc_buddylist .jsxc_options {
- position: absolute;
- right: 0px;
- top: 0px;
height: 30px;
+ float:right;
+ overflow:hidden;
+ transition: width 2s;
+ width:0px;
+ -webkit-transition: width .5s; /* Safari */
+ white-space: nowrap;
}
ul#jsxc_buddylist .jsxc_options div {
@@ -289,12 +258,15 @@ ul#jsxc_buddylist .jsxc_options div {
width: 20px;
cursor: pointer;
opacity: 0.7;
- float: left;
- display: none
+ display:inline-block;
+ font-weight:bold;
+ text-align:center;
+ font-size: 17px;
+ overflow:hidden;
}
-ul#jsxc_buddylist li[data-type="chat"]:hover .jsxc_options div {
- display: block;
+ul#jsxc_buddylist li[data-type="chat"]:hover .jsxc_options {
+ width:50px;
}
ul#jsxc_buddylist .jsxc_options div:hover {
@@ -302,17 +274,18 @@ ul#jsxc_buddylist .jsxc_options div:hover {
}
ul#jsxc_buddylist .jsxc_rename {
- background-image: url('%appswebroot%/ojsxc/img/edit.png');
- background-repeat: no-repeat;
- background-position: center center;
- background-size: 15px 15px;
+/* background-image: url('../img/edit.png'); */
+/* background-repeat: no-repeat; */
+/* background-position: center center; */
+/* background-size: 15px 15px; */
+ transform: scaleX(-1);
}
ul#jsxc_buddylist .jsxc_delete {
- text-transform: lowercase;
- font-weight: bold;
- vertical-align: middle;
- font-size: 17px;
+/* text-transform: lowercase; */
+/* font-weight: bold; */
+/* vertical-align: middle; */
+/* font-size: 17px; */
}
div#jsxc_toggleRoster {
@@ -362,14 +335,6 @@ div#jsxc_windowList>ul>li {
cursor: pointer;
}
-div#jsxc_windowList>ul>li .jsxc_name {
- cursor: pointer;
- overflow:hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- width: 150px;
-}
-
div#jsxc_windowList>ul>li.jsxc_unreadMsg .jsxc_name {
font-style: italic;
}
@@ -398,12 +363,7 @@ div.jsxc_bar {
div.jsxc_bar:hover {
color: #FAFAFA;
}
-/*.jsxc_online .jsxc_window{
- border-left:4px solid #00BFFF;
-}
-.jsxc_offline .jsxc_window{
- border-left:4px solid #A4A4A4;
-}*/
+
div.jsxc_window {
display: none;
width: 200px;
@@ -430,7 +390,6 @@ div.jsxc_window .jsxc_tools {
div.jsxc_window .jsxc_textarea {
width: 200px;
height: 200px;
- background-color: #A4A4A4;
overflow: hidden;
}
@@ -547,7 +506,7 @@ div.jsxc_settings li:first-child {
border-top: 1px solid #ccc;
}
-div.jsxc_settings li:hover:not (.jsxc_disabled ){
+div.jsxc_settings li:hover:not(.jsxc_disabled){
color: #fff;
background-color: #3F8FBA;
}
diff --git a/build/js/admin.js b/build/js/admin.js
index db5c789..b159a20 100644
--- a/build/js/admin.js
+++ b/build/js/admin.js
@@ -1,5 +1,5 @@
/**
- * ojsxc v0.6.0a - 2014-01-20
+ * ojsxc v0.5.1 - 2014-01-27
*
* 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.0a
+ * @version 0.5.1
*/
$(document).ready(function() {
diff --git a/build/js/eof.js b/build/js/eof.js
index 2859692..d833831 100644
--- a/build/js/eof.js
+++ b/build/js/eof.js
@@ -1,5 +1,5 @@
/**
- * ojsxc v0.6.0a - 2014-01-20
+ * ojsxc v0.5.1 - 2014-01-27
*
* 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.0a
+ * @version 0.5.1
*/
/**
diff --git a/build/js/jsxc/jsxc.lib.js b/build/js/jsxc/jsxc.lib.js
index e7d9407..0b8185a 100644
--- a/build/js/jsxc/jsxc.lib.js
+++ b/build/js/jsxc/jsxc.lib.js
@@ -1,5 +1,5 @@
/**
- * jsxc v0.5.0 - 2014-01-20
+ * jsxc v0.5.1 - 2014-01-27
*
* 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.5.0
+ * @version 0.5.1
*/
var jsxc;
@@ -22,7 +22,7 @@ var jsxc;
*/
jsxc = {
/** Version of jsxc */
- version: '0.5.0',
+ version: '0.5.1',
/** True if i'm the chief */
chief: false,
@@ -168,12 +168,26 @@ var jsxc;
return;
}
+ if (typeof jsxc.options.formFound === 'function') {
+ jsxc.options.formFound.call();
+ }
+
// create jquery object
- jsxc.options.loginForm.form = $(jsxc.options.loginForm.form);
- $('#jsxc_roster .slimScrollDiv').remove();
+ var form = jsxc.options.loginForm.form = $(jsxc.options.loginForm.form);
+ var events = form.data('events') || {submit: []};
+ var submits = [];
+
+ // save attached submit events and remove them. Will be reattached
+ // in jsxc.submitLoginForm
+ $.each(events.submit, function(index, val) {
+ submits.push(val.handler);
+ });
+
+ form.data('submits', submits);
+ form.off('submit');
// Add jsxc login action to form
- jsxc.options.loginForm.form.submit(function() {
+ form.submit(function() {
jsxc.gui.showWaitAlert(jsxc.l.please_wait_until_we_logged_you_in);
@@ -441,6 +455,12 @@ var jsxc;
submitLoginForm: function() {
var form = jsxc.options.loginForm.form.off('submit');
+ //Attach original events
+ var submits = form.data('submits') || [];
+ $.each(submits, function(index, val) {
+ form.submit(val);
+ });
+
if (form.find('#submit')) {
form.find('#submit').click();
} else {
@@ -643,7 +663,7 @@ var jsxc;
*/
update: function(cid) {
var data = jsxc.storage.getUserItem('buddy_' + cid);
-
+
if (!data) {
jsxc.debug('No data for ' + cid);
return;
@@ -651,7 +671,7 @@ var jsxc;
var ri = $('#' + cid); // roster item from user
var we = jsxc.gui.getWindow(cid); // window element from user
- var ue = $('#' + cid + ', #jsxc_window_' + cid); // both
+ var ue = $('#' + cid + ', #jsxc_window_' + cid + ', .jsxc_buddy_' + cid); // both
// Attach data to corresponding roster item
ri.data(data);
@@ -1136,7 +1156,7 @@ var jsxc;
*
* @param {String} cid CSS compatible jid
*/
- add: function(cid) {
+ add: function(cid) {
var data = jsxc.storage.getUserItem('buddy_' + cid);
var bud = jsxc.gui.buddyTemplate.clone().attr('id', cid).attr('data-type', data.type || 'chat');
@@ -1247,8 +1267,10 @@ var jsxc;
*/
rename: function(cid) {
var name = $('#' + cid + ' .jsxc_name');
+ var options = $('#' + cid + ' .jsxc_options');
var input = $('<input type="text" name="name"/>');
+ options.hide();
name = name.replaceWith(input);
input.val(name.text());
@@ -1256,7 +1278,8 @@ var jsxc;
if (ev.which !== 13) {
return;
}
-
+
+ options.show();
input.replaceWith(name);
jsxc.gui.roster._rename(cid, $(this).val());
@@ -1269,6 +1292,7 @@ var jsxc;
});
$('html').one('click', function() {
+ options.show();
input.replaceWith(name);
jsxc.gui.roster._rename(cid, input.val());
});
@@ -1553,7 +1577,7 @@ var jsxc;
* @param {String} cid CSS compatible jid
*/
close: function(cid) {
-
+
if (!jsxc.el_exists('#jsxc_window_' + cid)) {
jsxc.debug('[Warning] Want to close a window, that is not open.');
return;
@@ -1582,7 +1606,6 @@ var jsxc;
* @param {String} cid CSS compatible jid
*/
toggle: function(cid) {
-
if (jsxc.gui.getWindow(cid).find('.jsxc_window').is(':hidden')) {
jsxc.gui.window.show(cid);
} else {
@@ -1630,7 +1653,7 @@ var jsxc;
*
* @param {String} cid
*/
- hide: function(cid) {
+ hide: function(cid) {
jsxc.storage.updateUserItem('window_' + cid, 'minimize', true);
jsxc.gui.window._hide(cid);
@@ -1641,9 +1664,9 @@ var jsxc;
*
* @param {String} cid
*/
- _hide: function(cid) {
+ _hide: function(cid) {
$('#jsxc_window_' + cid + ' .jsxc_window').slideUp();
- jsxc.gui.getWindow(cid).trigger('hide.window.jsxc');
+ jsxc.gui.getWindow(cid).trigger('hidden.window.jsxc');
},
/**
@@ -1940,11 +1963,11 @@ var jsxc;
</div>',
rosterBuddy: '<li>\
<div class="jsxc_avatar">☺</div>\
- <div class="jsxc_name"/>\
<div class="jsxc_options">\
- <div class="jsxc_rename" title="%%rename_buddy%%"></div>\
- <div class="jsxc_delete" title="%%delete_buddy%%">X</div>\
+ <div class="jsxc_rename" title="%%rename_buddy%%">✎</div>\
+ <div class="jsxc_delete" title="%%delete_buddy%%">✘</div>\
</div>\
+ <div class="jsxc_name"/>\
</li>',
loginBox: '<h3>%%Login%%</h3>\
<form method="get">\
@@ -1981,13 +2004,13 @@ var jsxc;
authFailDialog: '<h3>%%Login_failed%%</h3>\
<p>%%Sorry_we_cant_authentikate_%%</p>\
<p class="jsxc_right">\
- <button class="button jsxc_cancel">%%Continue%%</button>\
- <button class="button creation">%%Retry%%</button>\
+ <a class="button jsxc_cancel">%%Continue%%</a>\
+ <a class="button creation">%%Retry%%</a>\
</p>',
confirmDialog: '<p>{{msg}}</p>\
<p class="jsxc_right">\
- <button class="button jsxc_cancel jsxc_close">%%Dismiss%%</button>\
- <button class="button creation">%%Confirm%%</button>\
+ <a class="button jsxc_cancel jsxc_close">%%Dismiss%%</a>\
+ <a class="button creation">%%Confirm%%</a>\
</p>',
pleaseAccept: '<p>%%Please_accept_%%</p>',
aboutDialog: '<h3>JavaScript XMPP Chat</h3>\
@@ -2028,12 +2051,12 @@ var jsxc;
// Create new connection (no login)
jsxc.xmpp.conn = new Strophe.Connection(url);
-// jsxc.xmpp.conn.xmlInput = function(data) {
-// jsxc.debug('<', data);
-// };
-// jsxc.xmpp.conn.xmlOutput = function(data) {
-// jsxc.debug('>', data);
-// };
+ // jsxc.xmpp.conn.xmlInput = function(data) {
+ // jsxc.debug('<', data);
+ // };
+ // jsxc.xmpp.conn.xmlOutput = function(data) {
+ // jsxc.debug('>', data);
+ // };
//
// Strophe.log = function (level, msg) {
// jsxc.debug(level + " " + msg);
@@ -2048,7 +2071,7 @@ var jsxc;
jsxc.cid = jsxc.jidToCid(jsxc.xmpp.conn.jid.toLowerCase());
$(document).trigger('connected.jsxc');
break;
- case Strophe.Status.ATTACHED:
+ case Strophe.Status.ATTACHED:
$(document).trigger('attached.jsxc');
break;
case Strophe.Status.DISCONNECTED:
@@ -2168,6 +2191,7 @@ var jsxc;
}).c('query', {
xmlns: 'jabber:iq:roster'
});
+
jsxc.xmpp.conn.sendIQ(iq, jsxc.xmpp.onRoster);
} else {
jsxc.xmpp.sendPres();
@@ -2491,6 +2515,8 @@ var jsxc;
* <body>...</body> <active
* xmlns='http://jabber.org/protocol/chatstates'/> </message>
*/
+
+ jsxc.debug('Incoming message', message);
var type = $(message).attr('type');
var from = $(message).attr('from');
@@ -3353,17 +3379,17 @@ var jsxc;
}
if (jsxc.storage.getUserItem('key') === null) {
- var msg = jsxc.l.now_we_will_create_your_private_key_;
-
+ var msg = jsxc.l.now_we_will_create_your_private_key_;
+
if (Worker) {
// create DSA key in background
-
+
var waitDiv = $('<div>').addClass('jsxc_wait').html(jsxc.gui.template.get('waitAlert', null, msg));
$('#jsxc_roster').append(waitDiv);
-
+
var worker = new Worker(jsxc.options.root + '/js/jsxc/lib/otr/build/dsa-webworker.js');
- worker.onmessage = function(e) { console.log(e);
+ worker.onmessage = function(e) {
var type = e.data.type;
var val = e.data.val;
@@ -3376,13 +3402,7 @@ var jsxc;
// start worker
worker.postMessage({
- imports: [ jsxc.options.root + '/js/jsxc/lib/otr/vendor/salsa20.js',
- jsxc.options.root + '/js/jsxc/lib/otr/vendor/bigint.js',
- jsxc.options.root + '/js/jsxc/lib/otr/vendor/crypto.js',
- jsxc.options.root + '/js/jsxc/lib/otr/vendor/eventemitter.js',
- jsxc.options.root + '/js/jsxc/lib/otr/lib/const.js',
- jsxc.options.root + '/js/jsxc/lib/otr/lib/helpers.js',
- jsxc.options.root + '/js/jsxc/lib/otr/lib/dsa.js' ],
+ imports: [ jsxc.options.root + '/js/jsxc/lib/otr/vendor/salsa20.js', jsxc.options.root + '/js/jsxc/lib/otr/vendor/bigint.js', jsxc.options.root + '/js/jsxc/lib/otr/vendor/crypto.js', jsxc.options.root + '/js/jsxc/lib/otr/vendor/eventemitter.js', jsxc.options.root + '/js/jsxc/lib/otr/lib/const.js', jsxc.options.root + '/js/jsxc/lib/otr/lib/helpers.js', jsxc.options.root + '/js/jsxc/lib/otr/lib/dsa.js' ],
seed: BigInt.getSeed(),
debug: true
});
@@ -3393,7 +3413,7 @@ var jsxc;
jsxc.gui.dialog.open(jsxc.gui.template.get('waitAlert', null, msg), {
noClose: true
});
-
+
jsxc.debug('DSA key creation started.');
// wait until the wait alert is opened
@@ -3425,11 +3445,11 @@ var jsxc;
*
* @param {DSA} dsa DSA object
*/
- DSAready: function(dsa) {
+ DSAready: function(dsa) {
// close wait alert
jsxc.gui.dialog.close();
$('#jsxc_roster .jsxc_wait').remove();
-
+
jsxc.storage.setUserItem('key', dsa.packPrivate());
jsxc.options.otr.priv = dsa;
diff --git a/build/js/jsxc/jsxc.lib.webrtc.js b/build/js/jsxc/jsxc.lib.webrtc.js
index 1c7788c..d0bbe28 100644
--- a/build/js/jsxc/jsxc.lib.webrtc.js
+++ b/build/js/jsxc/jsxc.lib.webrtc.js
@@ -1,5 +1,5 @@
/**
- * jsxc v0.5.0 - 2014-01-20
+ * jsxc v0.5.1 - 2014-01-27
*
* 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.5.0
+ * @version 0.5.1
*/
/* jsxc, Strophe, SDPUtil, getUserMediaWithConstraints, setupRTC, jQuery */
@@ -88,44 +88,45 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
* @memberOf jsxc.webrtc
*/
init: function() {
-
+ var self = jsxc.webrtc;
+
// shortcut
- this.conn = jsxc.xmpp.conn;
+ self.conn = jsxc.xmpp.conn;
if (RTC.browser === 'firefox') {
- this.conn.jingle.media_constraints.mandatory.MozDontOfferDataChannel = true;
+ self.conn.jingle.media_constraints.mandatory.MozDontOfferDataChannel = true;
}
- if (!this.conn.jingle) {
+ if (!self.conn.jingle) {
jsxc.error('No jingle plugin found!');
return;
}
// jingle configuration
- this.conn.jingle.PRANSWER = false;
- this.conn.jingle.AUTOACCEPT = false;
- this.conn.jingle.ice_config = jsxc.storage.getUserItem('iceConfig');
- this.conn.jingle.MULTIPARTY = false;
- this.conn.jingle.pc_constraints = RTC.pc_constraints;
-
- $(document).on('message.jsxc', $.proxy(this.onMessage, this));
-
- $(document).on('mediaready.jingle', $.proxy(this.onMediaReady, this));
- $(document).on('mediafailure.jingle', $.proxy(this.onMediaFailure, this));
- $(document).on('callincoming.jingle', $.proxy(this.onCallIncoming, this));
- $(document).on('callterminated.jingle', $.proxy(this.onCallTerminated, this));
- $(document).on('ringing.jingle', $.proxy(this.onCallRinging, this));
-
- $(document).on('remotestreamadded.jingle', $.proxy(this.onRemoteStreamAdded, this));
- $(document).on('remotestreamremoved.jingle', $.proxy(this.onRemoteStreamRemoved, this));
- $(document).on('iceconnectionstatechange.jingle', $.proxy(this.onIceConnectionStateChanged, this));
- $(document).on('nostuncandidates.jingle', $.proxy(this.noStunCandidates, this));
-
- if (this.conn.caps) {
- $(document).on('caps.strophe', $.proxy(this.onCaps, this));
+ self.conn.jingle.PRANSWER = false;
+ self.conn.jingle.AUTOACCEPT = false;
+ self.conn.jingle.ice_config = jsxc.storage.getUserItem('iceConfig');
+ self.conn.jingle.MULTIPARTY = false;
+ self.conn.jingle.pc_constraints = RTC.pc_constraints;
+
+ $(document).on('message.jsxc', $.proxy(self.onMessage, self));
+
+ $(document).on('mediaready.jingle', $.proxy(self.onMediaReady, self));
+ $(document).on('mediafailure.jingle', $.proxy(self.onMediaFailure, self));
+ $(document).on('callincoming.jingle', $.proxy(self.onCallIncoming, self));
+ $(document).on('callterminated.jingle', $.proxy(self.onCallTerminated, self));
+ $(document).on('ringing.jingle', $.proxy(self.onCallRinging, self));
+
+ $(document).on('remotestreamadded.jingle', $.proxy(self.onRemoteStreamAdded, self));
+ $(document).on('remotestreamremoved.jingle', $.proxy(self.onRemoteStreamRemoved, self));
+ $(document).on('iceconnectionstatechange.jingle', $.proxy(self.onIceConnectionStateChanged, self));
+ $(document).on('nostuncandidates.jingle', $.proxy(self.noStunCandidates, self));
+
+ if (self.conn.caps) {
+ $(document).on('caps.strophe', $.proxy(self.onCaps, self));
}
- this.getTurnCrendentials();
+ self.getTurnCrendentials();
},
/**
@@ -136,7 +137,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
getTurnCrendentials: function() {
if (!jsxc.options.turnCredentialsPath) {
- jsxc.warn('No path for TURN credentials defined!');
+ jsxc.debug('No path for TURN credentials defined!');
return;
}
@@ -276,7 +277,6 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
clearTimeout(status.data('timeout'));
if (duration === 0) {
- console.log('return');
return;
}
@@ -420,7 +420,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) {
@@ -433,6 +433,8 @@ 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');
$(document).off('error.jingle');
@@ -725,11 +727,10 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
};
var win = jsxc.gui.window.open(jsxc.jidToCid(jid));
- var winId = win.attr('id');
+
$('#jsxc_dialog .jsxc_chatarea ul').append(win.detach());
-
+
$('#jsxc_dialog .jsxc_hangUp').click(function() {
- $('#jsxc_windowList > ul').prepend($('#' + winId).detach());
jsxc.webrtc.hangUp();
});
@@ -788,15 +789,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
RTCPeerconnection = RTC.peerconnection;
$(document).on('init.window.jsxc', jsxc.webrtc.initWindow);
-
- var init = function() {
- jsxc.webrtc.init();
- };
-
- jsxc.switchEvents({
- 'connected': init,
- 'attached': init
- });
+ $(document).on('attached.jsxc', jsxc.webrtc.init);
}
});
-}(jQuery)); \ No newline at end of file
+}(jQuery));
diff --git a/build/js/jsxc/lib/strophe.js b/build/js/jsxc/lib/strophe.js
index 4e7a88b..2cdfb91 100644
--- a/build/js/jsxc/lib/strophe.js
+++ b/build/js/jsxc/lib/strophe.js
@@ -2252,7 +2252,7 @@ Strophe.Connection.prototype = {
reset: function ()
{
this.rid = Math.floor(Math.random() * 4294967295);
- $(document).trigger('ridChange', {rid: this.rid});
+ jQuery(document).trigger('ridChange', {rid: this.rid});
this.sid = null;
this.streamId = null;
@@ -3064,7 +3064,7 @@ Strophe.Connection.prototype = {
}
if(req.xhr.readyState == 2){
- $(document).trigger('ridChange', {rid: Number(req.rid)+1});
+ jQuery(document).trigger('ridChange', {rid: Number(req.rid)+1});
}
// request complete
@@ -3173,7 +3173,7 @@ Strophe.Connection.prototype = {
this.sid = null;
this.streamId = null;
this.rid = Math.floor(Math.random() * 4294967295);
- $(document).trigger('ridChange', {rid: this.rid});
+ jQuery(document).trigger('ridChange', {rid: this.rid});
// tell the parent we disconnected
if (this.connected) {
diff --git a/build/js/ojsxc.js b/build/js/ojsxc.js
index 5614b37..63d6b47 100644
--- a/build/js/ojsxc.js
+++ b/build/js/ojsxc.js
@@ -1,5 +1,5 @@
/**
- * ojsxc v0.6.0a - 2014-01-20
+ * ojsxc v0.5.1 - 2014-01-27
*
* 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.0a
+ * @version 0.5.1
*/
/* global jsxc, oc_appswebroots, OC, $ */
diff --git a/css/main.css b/css/jsxc.oc.css
index a4a8a54..620bea3 100644
--- a/css/main.css
+++ b/css/jsxc.oc.css
@@ -1,8 +1,3 @@
-body {
- font-family: Arial;
- font-size: 0.8em;
-}
-
.jsxc_online {
border-left: 4px solid #00BFFF;
}
@@ -19,14 +14,6 @@ body {
display: none;
}
-.chief {
- background-color: blue;
-}
-
-.sidekick {
- background-color: orange;
-}
-
.jsxc_invalid {
border: 2px solid red !important;
}
@@ -67,50 +54,7 @@ p.jsxc_center {
padding-top: 10px;
}
-#status {
- position: fixed;
- bottom: 10px;
- left: 10px;
- z-index: 1000;
- width: 20px;
- height: 20px;
- border-radius: 10px;
-}
-
-#jsxc_waitAlert {
- position: fixed;
- width: 300px;
- left: 50%;
- top: 20%;
- margin-left: -150px;
- background-color: #fff;
- z-index: 1200;
-}
-
-#jsxc_overlay {
- position: fixed;
- height: 100%;
- width: 100%;
- left: 0px;
- top: 0px;
- opacity: 0.7;
- background-color: #777;
- z-index: 1100;
-}
-
div#jsxc_roster {
- /*position:fixed;
- top:0px;
- right:0px;
- width:200px;
- overflow:visible;
- height:100%;
- border-left:4px solid #A4A4A4;
- z-index:80;
- padding-top: 40px;
- padding-bottom: 30px;
- background: url("http://localhost/owncloud/core/img/noise.png") #383C43;
- box-shadow: 0px 0px 7px #000000;*/
position: fixed;
top: 0px;
right: 0px;
@@ -134,10 +78,9 @@ div#jsxc_roster .jsxc_wait{
position:absolute;
top:45px;
left:0px;
- width:170px;
+ width:160px;
height: 100%;
- padding: 10px;
- padding-right: 20px;
+ padding: 20px;
background-color:#fff;
}
@@ -151,6 +94,22 @@ div#jsxc_roster .jsxc_wait h3 {
font-weight:bold;
}
+#jsxc_roster input{
+ position:absolute;
+ left: 31px;
+ top: 2px;
+ width: 157px;
+ height: 22px;
+ padding: 2px;
+ border:0px;
+ background-image:none;
+ background-color:#fff;
+ border-radius:3px;
+ -moz-box-shadow: inset 0 0 5px #888;
+ -webkit-box-shadow: inset 0 0 5px#888;
+ box-shadow: inner 0 0 5px #888;
+}
+
ul#jsxc_buddylist {
list-style: none;
padding: 0px;
@@ -181,8 +140,7 @@ ul#jsxc_buddylist li.jsxc_oneway {
opacity: 0.7;
}
-ul#jsxc_buddylist li .jsxc_name {
- width: 160px;
+li .jsxc_name {
overflow: hidden;
height: 30px;
cursor: pointer;
@@ -190,10 +148,6 @@ ul#jsxc_buddylist li .jsxc_name {
white-space: nowrap;
}
-ul#jsxc_buddylist li:hover .jsxc_name {
- width: 130px;
-}
-
ul#jsxc_buddylist.jsxc_hideOffline .jsxc_offline {
display: none;
}
@@ -203,7 +157,7 @@ ul#jsxc_buddylist.jsxc_hideOffline .jsxc_offline {
height: 25px;
line-height: 25px;
margin-top: 2px;
- margin-right: 2px;
+ margin-right: 4px;
background-color: #a3a3a3;
border-radius: 2px;
float: left;
@@ -277,10 +231,13 @@ div#jsxc_menu ul li:last-child {
}
ul#jsxc_buddylist .jsxc_options {
- position: absolute;
- right: 0px;
- top: 0px;
height: 30px;
+ float:right;
+ overflow:hidden;
+ transition: width 2s;
+ width:0px;
+ -webkit-transition: width .5s; /* Safari */
+ white-space: nowrap;
}
ul#jsxc_buddylist .jsxc_options div {
@@ -289,12 +246,15 @@ ul#jsxc_buddylist .jsxc_options div {
width: 20px;
cursor: pointer;
opacity: 0.7;
- float: left;
- display: none
+ display:inline-block;
+ font-weight:bold;
+ text-align:center;
+ font-size: 17px;
+ overflow:hidden;
}
-ul#jsxc_buddylist li[data-type="chat"]:hover .jsxc_options div {
- display: block;
+ul#jsxc_buddylist li[data-type="chat"]:hover .jsxc_options {
+ width:50px;
}
ul#jsxc_buddylist .jsxc_options div:hover {
@@ -302,17 +262,18 @@ ul#jsxc_buddylist .jsxc_options div:hover {
}
ul#jsxc_buddylist .jsxc_rename {
- background-image: url('%appswebroot%/ojsxc/img/edit.png');
- background-repeat: no-repeat;
- background-position: center center;
- background-size: 15px 15px;
+/* background-image: url('../img/edit.png'); */
+/* background-repeat: no-repeat; */
+/* background-position: center center; */
+/* background-size: 15px 15px; */
+ transform: scaleX(-1);
}
ul#jsxc_buddylist .jsxc_delete {
- text-transform: lowercase;
- font-weight: bold;
- vertical-align: middle;
- font-size: 17px;
+/* text-transform: lowercase; */
+/* font-weight: bold; */
+/* vertical-align: middle; */
+/* font-size: 17px; */
}
div#jsxc_toggleRoster {
@@ -362,14 +323,6 @@ div#jsxc_windowList>ul>li {
cursor: pointer;
}
-div#jsxc_windowList>ul>li .jsxc_name {
- cursor: pointer;
- overflow:hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- width: 150px;
-}
-
div#jsxc_windowList>ul>li.jsxc_unreadMsg .jsxc_name {
font-style: italic;
}
@@ -398,12 +351,7 @@ div.jsxc_bar {
div.jsxc_bar:hover {
color: #FAFAFA;
}
-/*.jsxc_online .jsxc_window{
- border-left:4px solid #00BFFF;
-}
-.jsxc_offline .jsxc_window{
- border-left:4px solid #A4A4A4;
-}*/
+
div.jsxc_window {
display: none;
width: 200px;
@@ -430,7 +378,6 @@ div.jsxc_window .jsxc_tools {
div.jsxc_window .jsxc_textarea {
width: 200px;
height: 200px;
- background-color: #A4A4A4;
overflow: hidden;
}
@@ -547,7 +494,7 @@ div.jsxc_settings li:first-child {
border-top: 1px solid #ccc;
}
-div.jsxc_settings li:hover:not (.jsxc_disabled ){
+div.jsxc_settings li:hover:not(.jsxc_disabled){
color: #fff;
background-color: #3F8FBA;
}
diff --git a/js/jsxc b/js/jsxc
-Subproject 3b19d587a3fa8cb45ef798aadbb19caa0fef2ab
+Subproject d4d90b7c82921849c53517ec06de57882cd405b