Browse Source

- Start remimplementing the popup widget for the future visio-conference window

pull/16/head
Jaussoin Timothée 12 years ago
parent
commit
f7ab3fd8bc
  1. 11
      app/controllers/VisioController.php
  2. 2
      app/views/main.tpl
  3. 5
      app/views/visio.tpl
  4. 4
      app/widgets/ChatExt/chatext.js
  5. 45
      app/widgets/ChatPop/ChatPop.php
  6. 30
      app/widgets/Visio/Visio.php
  7. 0
      app/widgets/Visio/img/cross.png
  8. 0
      app/widgets/Visio/visio.css
  9. 25
      app/widgets/Visio/visio.js
  10. 4
      app/widgets/Visio/visio.tpl
  11. 2
      system/Route.php

11
app/controllers/VisioController.php

@ -0,0 +1,11 @@
<?php
class VisioController extends BaseController {
function load() {
$this->session_only = true;
$this->raw = true;
}
function dispatch() {
}
}

2
app/views/main.tpl

@ -3,7 +3,7 @@
<?php $this->widget('Poller');?>
<?php $this->widget('Presence');?>
<?php $this->widget('Chat');?>
<?php //$this->widget('ChatExt');?>
<?php $this->widget('ChatExt');?>
<div id="main">
<div id="left">

5
app/views/chatpop.tpl → app/views/visio.tpl

@ -4,9 +4,10 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<?php $this->scripts(); ?>
<title><?php echo t('Chat Box');?></title>
<title><?php echo t('Visio-conference');?></title>
</head>
<body>
<?php $this->widget('ChatPop', false);?>
Qualitaÿ
<?php $this->widget('Visio', false);?>
</body>
</html>

4
app/widgets/ChatExt/chatext.js

@ -2,9 +2,9 @@
var popupWin = null;
function openPopup() {
var url = BASE_URI + PAGE_KEY_URI + "chatpop"
var url = BASE_URI + PAGE_KEY_URI + "visio"
if( !popupWin || popupWin.closed ) {
popupWin = window.open( url, "popupWin", "height=400,width=600,directories=0,titlebar=0,toolbar=0,location=0,status=0,menubar=0,resizable=no" );
popupWin = window.open( url, "popupWin", "height=400,width=600,directories=0,titlebar=0,toolbar=0,location=0,status=0, personalbar=0,menubar=0,resizable=no" );
} else popupWin.focus();
}

45
app/widgets/ChatPop/ChatPop.php

@ -1,45 +0,0 @@
<?php
/**
* @package Widgets
*
* @file ChatExt.php
* This file is part of MOVIM.
*
* @brief A jabber chat widget.
*
* @author Guillaume Pasquet <etenil@etenilsrealm.nl>
*
* @version 1.0
* @date 20 October 2010
*
* Copyright (C)2010 MOVIM project
*
* See COPYING for licensing information.
*/
require_once(APP_PATH . "widgets/ChatExt/ChatExt.php");
class ChatPop extends WidgetBase
{
function WidgetLoad()
{
$this->addcss('chatpop.css');
$this->addjs('chatpop.js');
}
function build()
{
$chatext = new ChatExt();
echo '<div id="chatpop">';
echo $chatext->preparePop();
echo '</div>';
?>
<div id="connection">
<?php echo t('Connection').'...'; ?>
</div>
<?php
}
}

30
app/widgets/Visio/Visio.php

@ -0,0 +1,30 @@
<?php
/**
* @package Widgets
*
* @file ChatExt.php
* This file is part of MOVIM.
*
* @brief A jabber chat widget.
*
* @author Guillaume Pasquet <etenil@etenilsrealm.nl>
*
* @version 1.0
* @date 20 October 2010
*
* Copyright (C)2010 MOVIM project
*
* See COPYING for licensing information.
*/
//require_once(APP_PATH . "widgets/ChatExt/ChatExt.php");
class Visio extends WidgetBase
{
function WidgetLoad()
{
$this->addcss('visio.css');
$this->addjs('visio.js');
}
}

0
app/widgets/ChatPop/img/cross.png → app/widgets/Visio/img/cross.png

Before

Width: 11  |  Height: 11  |  Size: 376 B

After

Width: 11  |  Height: 11  |  Size: 376 B

0
app/widgets/ChatPop/chatpop.css → app/widgets/Visio/visio.css

25
app/widgets/ChatPop/chatpop.js → app/widgets/Visio/visio.js

@ -1,4 +1,5 @@
function notifyOpener() {
console.log(self.opener.popupWin);
document.querySelector('#connection').style.display = 'none';
if(self.opener || !self.opener.popupWin)
self.opener.popupWin = self;
@ -8,21 +9,21 @@ setInterval( notifyOpener, 200 );
self.focus();
function doSomething() {
alert("I'm doing something");
}
function handleError() {
document.querySelector('#connection').style.display = 'block';
}
window.onerror = handleError;
/**
* When an error occured
*/
window.onerror = function() {
document.querySelector('#connection').style.display = 'block';
};
/**
* When the popup is closed
*/
window.onunload = function() {
self.opener.Roster_ajaxToggleChat();
//self.opener.Roster_ajaxToggleChat();
};
function scrollAllTalks() {
/*function scrollAllTalks() {
var mes = document.querySelectorAll('.content');
for (var i=0; i<mes.length; i++){
// We add 200px to prevent smiley loading
@ -40,7 +41,7 @@ function sendMessage(n, jid)
// We escape the text to prevent XML errors
return encodeURIComponent(text);
}
}*/
//setInterval( scrollAllTalks, 200 );

4
app/widgets/Visio/visio.tpl

@ -0,0 +1,4 @@
loul
<div id="connection">
{$c->t('Connection')}...
</div>

2
system/Route.php

@ -5,7 +5,7 @@ class Route extends \BaseController {
public function __construct() {
$this->_routes = array(
'account' => array('err'),
'chatpop' => false,
'visio' => false,
'main' => false,
'news' => false,
'loading' => false,

Loading…
Cancel
Save