Browse Source

- Rename two widgets

pull/16/head
Jaussoin Timothée 13 years ago
parent
commit
718c61d798
  1. 4
      app/widgets/Location/Location.php
  2. 1
      app/widgets/Location/location.js
  3. 3
      app/widgets/Logout/logout.js
  4. 35
      app/widgets/Presence/Presence.php
  5. 0
      app/widgets/Presence/img/away.png
  6. 0
      app/widgets/Presence/img/dnd.png
  7. 0
      app/widgets/Presence/img/door_open.png
  8. 0
      app/widgets/Presence/img/online.png
  9. 0
      app/widgets/Presence/img/xa.png
  10. 0
      app/widgets/Presence/presence.css
  11. 6
      themes/movim/conf.tpl
  12. 6
      themes/movim/explore.tpl
  13. 3
      themes/movim/friend.tpl
  14. 6
      themes/movim/help.tpl
  15. 4
      themes/movim/main.tpl
  16. 6
      themes/movim/media.tpl
  17. 6
      themes/movim/node.tpl
  18. 6
      themes/movim/profile.tpl
  19. 6
      themes/movim/server.tpl

4
app/widgets/ProfileData/ProfileData.php → app/widgets/Location/Location.php

@ -18,11 +18,11 @@
* See COPYING for licensing information.
*/
class ProfileData extends WidgetBase
class Location extends WidgetBase
{
function WidgetLoad()
{
$this->addjs('profiledata.js');
$this->addjs('location.js');
$this->registerEvent('locationpublished', 'onLocationPublished');
$this->registerEvent('locationpublisherror', 'onLocationPublishError');
}

1
app/widgets/ProfileData/profiledata.js → app/widgets/Location/location.js

@ -14,6 +14,7 @@ function hidePositionChoice()
}
function getMyPosition() {
console.log(navigator.geolocation);
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(
function (position) {

3
app/widgets/Logout/logout.js

@ -1,3 +0,0 @@
function showLogoutList() {
movim_toggle_class('#logoutlist', 'show');
}

35
app/widgets/Logout/Logout.php → app/widgets/Presence/Presence.php

@ -18,13 +18,12 @@
* See COPYING for licensing information.
*/
class Logout extends WidgetBase
class Presence extends WidgetBase
{
function WidgetLoad()
{
$this->addcss('logout.css');
$this->addjs('logout.js');
$this->addcss('presence.css');
$this->registerEvent('mypresence', 'onMyPresence');
}
@ -40,19 +39,6 @@ class Logout extends WidgetBase
RPC::call('movim_reload',
BASE_URI."index.php?q=disconnect");
}
function ajaxLogout()
{
$presence = Cache::c('presence');
Cache::c(
'presence',
array(
'status' => $presence['status'],
'show' => $presence['show']
)
);
$this->xmpp->logout();
}
function ajaxSetStatus($show)
{
@ -98,7 +84,22 @@ class Logout extends WidgetBase
$pd = new \modl\PresenceDAO();
$p = $pd->getPresence($this->user->getLogin(), $session['ressource']);
$html = '<div id="logouttab" class="'.$txts[$p->presence].'" onclick="showLogoutList();">'.$txt[$p->presence].'</div>';
if($p)
$html = '
<div
id="logouttab"
class="'.$txts[$p->presence].'"
onclick="movim_toggle_class(\'#logoutlist\', \'show\');">'.
$txt[$p->presence].'
</div>';
else
$html = '
<div
id="logouttab"
class="'.$txts[1].'"
onclick="movim_toggle_class(\'#logoutlist\', \'show\');">'.
$txt[1].'
</div>';
$html .= '
<div id="logoutlist">

0
app/widgets/Logout/img/away.png → app/widgets/Presence/img/away.png

Before

Width: 10  |  Height: 10  |  Size: 436 B

After

Width: 10  |  Height: 10  |  Size: 436 B

0
app/widgets/Logout/img/dnd.png → app/widgets/Presence/img/dnd.png

Before

Width: 10  |  Height: 10  |  Size: 398 B

After

Width: 10  |  Height: 10  |  Size: 398 B

0
app/widgets/Logout/img/door_open.png → app/widgets/Presence/img/door_open.png

Before

Width: 16  |  Height: 16  |  Size: 367 B

After

Width: 16  |  Height: 16  |  Size: 367 B

0
app/widgets/Logout/img/online.png → app/widgets/Presence/img/online.png

Before

Width: 10  |  Height: 10  |  Size: 391 B

After

Width: 10  |  Height: 10  |  Size: 391 B

0
app/widgets/Logout/img/xa.png → app/widgets/Presence/img/xa.png

Before

Width: 10  |  Height: 10  |  Size: 432 B

After

Width: 10  |  Height: 10  |  Size: 432 B

0
app/widgets/Logout/logout.css → app/widgets/Presence/presence.css

6
themes/movim/conf.tpl

@ -1,8 +1,7 @@
<?php /* -*- mode: html -*- */
?>
<?php $this->widget('Poller');?>
<?php $this->widget('Logout');?>
<?php //$this->widget('Notifs');?>
<?php $this->widget('Presence');?>
<?php $this->widget('Chat');?>
<?php $this->widget('ChatExt');?>
@ -13,7 +12,8 @@
<div id="left">
<?php $this->widget('Profile');?>
<?php $this->widget('Bookmark');?>
<?php $this->widget('ProfileData');?>
<?php $this->widget('Notifs');?>
<?php $this->widget('Location');?>
</div>
<div id="center">
<div title="<?php echo getFlagTitle("white"); ?>" class="protect white"></div>

6
themes/movim/explore.tpl

@ -1,8 +1,7 @@
<?php /* -*- mode: html -*- */
?>
<?php $this->widget('Poller');?>
<?php $this->widget('Logout');?>
<?php //$this->widget('Notifs');?>
<?php $this->widget('Presence');?>
<?php $this->widget('Chat');?>
<?php $this->widget('ChatExt');?>
@ -14,7 +13,8 @@
<div id="left">
<?php $this->widget('Profile');?>
<?php $this->widget('Bookmark');?>
<?php $this->widget('ProfileData');?>
<?php $this->widget('Notifs');?>
<?php $this->widget('Location');?>
</div>
<div id="center">
<div class="protect black" title="<?php echo getFlagTitle("black"); ?>"></div>

3
themes/movim/friend.tpl

@ -2,8 +2,7 @@
?>
<?php $this->widget('Poller');?>
<?php $this->widget('Logout');?>
<?php //$this->widget('Notifs');?>
<?php $this->widget('Presence');?>
<?php $this->widget('Chat');?>
<?php $this->widget('ChatExt');?>

6
themes/movim/help.tpl

@ -1,8 +1,7 @@
<?php /* -*- mode: html -*- */
?>
<?php $this->widget('Poller');?>
<?php $this->widget('Logout');?>
<?php //$this->widget('Notifs');?>
<?php $this->widget('Presence');?>
<?php $this->widget('Chat');?>
<?php $this->widget('ChatExt');?>
@ -13,7 +12,8 @@
<div id="left">
<?php $this->widget('Profile');?>
<?php $this->widget('Bookmark');?>
<?php $this->widget('ProfileData');?>
<?php $this->widget('Notifs');?>
<?php $this->widget('Location');?>
</div>
<div id="center">
<?php $this->widget('Tabs');?>

4
themes/movim/main.tpl

@ -1,7 +1,7 @@
<?php /* -*- mode: html -*- */
?>
<?php $this->widget('Poller');?>
<?php $this->widget('Logout');?>
<?php $this->widget('Presence');?>
<?php $this->widget('Chat');?>
<?php $this->widget('ChatExt');?>
@ -11,7 +11,7 @@
<?php $this->widget('Profile');?>
<?php $this->widget('Bookmark');?>
<?php $this->widget('Notifs');?>
<?php $this->widget('ProfileData');?>
<?php $this->widget('Location');?>
</div>
<div id="center">

6
themes/movim/media.tpl

@ -2,8 +2,7 @@
?>
<?php $this->widget('Poller');?>
<?php $this->widget('Logout');?>
<?php //$this->widget('Notifs');?>
<?php $this->widget('Presence');?>
<?php $this->widget('Chat');?>
<?php $this->widget('ChatExt');?>
@ -14,7 +13,8 @@
<div id="left">
<?php $this->widget('Profile');?>
<?php $this->widget('Bookmark');?>
<?php $this->widget('ProfileData');?>
<?php $this->widget('Notifs');?>
<?php $this->widget('Location');?>
</div>
<div id="center">

6
themes/movim/node.tpl

@ -2,8 +2,7 @@
?>
<?php $this->widget('Poller');?>
<?php $this->widget('Logout');?>
<?php //$this->widget('Notifs');?>
<?php $this->widget('Presence');?>
<?php $this->widget('Chat');?>
<?php $this->widget('ChatExt');?>
@ -15,7 +14,8 @@
<div id="left">
<?php $this->widget('Profile');?>
<?php $this->widget('Bookmark');?>
<?php $this->widget('ProfileData');?>
<?php $this->widget('Notifs');?>
<?php $this->widget('Location');?>
</div>
<div id="center">

6
themes/movim/profile.tpl

@ -2,8 +2,7 @@
?>
<?php $this->widget('Poller');?>
<?php $this->widget('Logout');?>
<?php //$this->widget('Notifs');?>
<?php $this->widget('Presence');?>
<?php $this->widget('Chat');?>
<?php $this->widget('ChatExt');?>
@ -13,7 +12,8 @@
<div id="left">
<?php $this->widget('Profile');?>
<?php $this->widget('Bookmark');?>
<?php $this->widget('ProfileData');?>
<?php $this->widget('Notifs');?>
<?php $this->widget('Location');?>
</div>
<div id="center">
<h1><?php echo t('Edit my profile'); ?></h1>

6
themes/movim/server.tpl

@ -2,8 +2,7 @@
?>
<?php $this->widget('Poller');?>
<?php $this->widget('Logout');?>
<?php //$this->widget('Notifs');?>
<?php $this->widget('Presence');?>
<?php $this->widget('Chat');?>
<?php $this->widget('ChatExt');?>
@ -14,7 +13,8 @@
<div id="left">
<?php $this->widget('Profile');?>
<?php $this->widget('Bookmark');?>
<?php $this->widget('ProfileData');?>
<?php $this->widget('Notifs');?>
<?php $this->widget('Location');?>
</div>
<div id="center">

Loading…
Cancel
Save