Browse Source
- Clean the Visio widget to fit with the new WebSocket system
- Clean the Visio widget to fit with the new WebSocket system
- Rewrite the Presence CSS and fix minur issues - Use the browser cookies to set the daemon SID - Clean the WebSocket Javascript handler - Clean old and commented sourcecodepull/16/head
37 changed files with 553 additions and 315 deletions
-
2app/assets/js/movim_base.js
-
24app/assets/js/movim_websocket.js
-
6app/views/visio.tpl
-
4app/widgets/Ack/ack.tpl
-
2app/widgets/Bookmark/_bookmark_list.tpl
-
9app/widgets/Bookmark/bookmark.css
-
4app/widgets/ContactInfo/contactinfo.css
-
1app/widgets/ContactSummary/contactsummary.css
-
2app/widgets/Login/Login.php
-
1app/widgets/Notification/Notification.php
-
23app/widgets/Notification/notification.js
-
4app/widgets/Notifs/notifs.css
-
3app/widgets/Presence/Presence.php
-
4app/widgets/Presence/presence.css
-
10app/widgets/Presence/presence.js
-
2app/widgets/PubsubSubscriptionConfig/PubsubSubscriptionConfig.php
-
2app/widgets/Roster/_roster_contact.tpl
-
198app/widgets/Visio/Visio.php
-
3app/widgets/Visio/_visio_contact.tpl
-
6app/widgets/Visio/locales.ini
-
80app/widgets/Visio/turn.js
-
2app/widgets/Visio/visio.css
-
140app/widgets/Visio/visio.js
-
8app/widgets/Visio/visio.tpl
-
25app/widgets/Visio/webrtc.js
-
17app/widgets/VisioExt/VisioExt.php
-
111app/widgets/VisioExt/visioext.js
-
6bootstrap.php
-
8daemon.php
-
24lib/JingletoSDP.php
-
2lib/SDPtoJingle.php
-
8linker.php
-
112src/Movim/Daemon/Behaviour.php
-
5system/Event.php
-
4system/RPC.php
-
4system/Sessionx.php
-
2system/widget/WidgetWrapper.php
@ -1,7 +1,5 @@ |
|||
<script type="text/javascript"> |
|||
function ackRequest(arg) { |
|||
var to = arg[0]; |
|||
var id = arg[1]; |
|||
function ackRequest(to, id) { |
|||
{$ack} |
|||
} |
|||
</script> |
|||
@ -1,21 +1,16 @@ |
|||
function removeDiff(id, html, id2) { |
|||
var wrapper= document.createElement('div'); |
|||
wrapper.innerHTML = html; |
|||
var nodes = wrapper.childNodes; |
|||
|
|||
function removeDiff(id, html, id2) { |
|||
target = document.getElementById(id); |
|||
if(target) { |
|||
target.insertAdjacentHTML('beforeend', html); |
|||
|
|||
var nodes = target.childNodes; |
|||
|
|||
for(i = 0; i < nodes.length; i++) { |
|||
var n = nodes[i]; |
|||
|
|||
// The notification is already here ?
|
|||
if(document.getElementById(id2) == null) { |
|||
target.appendChild(n); |
|||
setTimeout(function() { |
|||
n.parentNode.removeChild(n); |
|||
}, |
|||
6000); |
|||
} |
|||
setTimeout(function() { |
|||
n.parentNode.removeChild(n); |
|||
}, |
|||
6000); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
<img src="{$contact->getPhoto('l')}"/> |
|||
<span class="name">{$contact->getTrueName()}</span> |
|||
<div id="status"></div> |
|||
@ -1,3 +1,9 @@ |
|||
visio.call = 'Call' |
|||
visio.hang_up = 'Hang up' |
|||
visio.connection= 'Connection' |
|||
visio.hung_up = 'Hung up' |
|||
visio.busy = 'Your contact is busy' |
|||
visio.declined = 'Declined' |
|||
visio.remote_incompatible = 'Remote application incompatible' |
|||
visio.unknown_error = 'Unknown error' |
|||
visio.calling = 'Is calling you' |
|||
@ -1,56 +1,59 @@ |
|||
var Popup = { |
|||
win : null, |
|||
jid : null, |
|||
|
|||
setJid: function(jid) { |
|||
this.jid = jid; |
|||
}, |
|||
|
|||
open: function(jid) { |
|||
console.log('Popup already opened'); |
|||
var url = BASE_URI + PAGE_KEY_URI + "visio&f="+jid |
|||
|
|||
this.setJid(jid); |
|||
|
|||
if( !this.win || this.win.closed ) { |
|||
console.log('Opening the Popup'); |
|||
this.win = window.open( url, "win", "height=480,width=640,directories=0,titlebar=0,toolbar=0,location=0,status=0, personalbar=0,menubar=0,resizable=0" ); |
|||
} else this.win.focus(); |
|||
}, |
|||
|
|||
close: function() { |
|||
if(this.win) |
|||
this.win.close(); |
|||
}, |
|||
|
|||
focus: function() { |
|||
this.win.focus(); |
|||
}, |
|||
|
|||
send: function(args) { |
|||
var func = args[0]; |
|||
args.shift(); |
|||
var params = args; |
|||
|
|||
console.log('Calling the Popup'); |
|||
this.win[func](params); |
|||
}, |
|||
|
|||
hangUp: function(args) { |
|||
console.log('Your friend just hung up'); |
|||
}, |
|||
|
|||
call: function(args) { |
|||
if( this.win && !this.win.closed ) { |
|||
// The popup is open so call it
|
|||
Popup.send(args); |
|||
} else if(this.jid) { |
|||
// The popup is closed so open it
|
|||
console.log('We open the Popup'); |
|||
this.open(this.jid); |
|||
|
|||
console.log('We wait a little'); |
|||
this.win.addEventListener('load', function() { Popup.send(args); }, false); |
|||
} |
|||
/** |
|||
* @brief Definition of the MovimWebsocket object |
|||
* @param string error |
|||
*/ |
|||
function Popup() { |
|||
var stack; |
|||
var win; |
|||
} |
|||
|
|||
Popup.prototype.init = function() { |
|||
this.stack = {}; |
|||
} |
|||
|
|||
Popup.prototype.open = function() { |
|||
console.log('Popup already opened'); |
|||
var url = BASE_URI + PAGE_KEY_URI + 'visio'; |
|||
|
|||
//this.setJid(jid);
|
|||
console.log(url); |
|||
if( !this.win || this.win.closed ) { |
|||
console.log('Opening the Popup'); |
|||
this.win = window.open( url, "win", "height=480,width=640,directories=0,titlebar=0,toolbar=0,location=0,status=0, personalbar=0,menubar=0,resizable=0" ); |
|||
} else this.win.focus(); |
|||
} |
|||
|
|||
Popup.prototype.close = function() { |
|||
if(this.win) { this.win.close(); } |
|||
} |
|||
|
|||
Popup.prototype.focus = function() { |
|||
if(this.win) { this.win.focus(); } |
|||
} |
|||
|
|||
Popup.prototype.setJid = function(jid) { |
|||
this.stack.jid = jid; |
|||
} |
|||
|
|||
Popup.prototype.call = function(func, param) { |
|||
if(!this.win || this.win.closed ) { |
|||
/*if(this.stack == null) { |
|||
this.stack = {}; |
|||
}*/ |
|||
this.stack[func] = param; |
|||
this.open(); |
|||
} |
|||
} |
|||
|
|||
function remoteCall(func, param) { |
|||
console.log('HOP'); |
|||
console.log(popup); |
|||
popup.call(func, param); |
|||
} |
|||
|
|||
function remoteSetJid(jid) { |
|||
popup.setJid(jid); |
|||
} |
|||
|
|||
var popup = new Popup; |
|||
popup.init(); |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue