Browse Source
- Merge with nodpounod
- Merge with nodpounod
- Add inhibit function in Notification (to disable the notifications for n seconds) - Clean the CSS - Fix a JS error in movim_websocket - Inhibit the notifications on login - Fix fatar error in Avatarpull/16/head
18 changed files with 100 additions and 91 deletions
-
14app/assets/js/movim_websocket.js
-
4app/helpers/StringHelper.php
-
7app/views/login.tpl
-
4app/widgets/Avatar/Avatar.php
-
11app/widgets/Chat/Chat.php
-
4app/widgets/Config/Config.php
-
35app/widgets/Config/_config_form.tpl
-
4app/widgets/Config/locales.ini
-
15app/widgets/Notification/notification.js
-
4app/widgets/Presence/Presence.php
-
3app/widgets/Presence/presence.js
-
3app/widgets/Roster/Roster.php
-
4app/widgets/Roster/roster.js
-
12app/widgets/Roster/roster.tpl
-
3bootstrap.php
-
56lib/Lazy.php
-
5themes/material/css/list.css
-
3themes/material/css/style.css
@ -1,8 +1,9 @@ |
|||
<?php /* -*- mode: html -*- */ |
|||
?> |
|||
<?php $this->widget('Notification'); ?> |
|||
<?php $this->widget('Presence'); ?> |
|||
<main> |
|||
<section> |
|||
<div> <?php $this->widget('Login'); ?> |
|||
<div> |
|||
<?php $this->widget('Login'); ?> |
|||
</div> |
|||
</section> |
|||
|
|||
|
|||
@ -1,56 +0,0 @@ |
|||
<?php |
|||
|
|||
/** |
|||
* @file Lazy.php |
|||
* This file is part of Movim. |
|||
* |
|||
* @brief Refresh only parts of the new page |
|||
* |
|||
* @author Timothée jaussoin |
|||
*/ |
|||
|
|||
class Lazy { |
|||
private $_current; |
|||
private $_next; |
|||
private $_widgets = array(); |
|||
|
|||
public function __construct($current, $next) { |
|||
$this->_current = $current; |
|||
$this->_next = $next; |
|||
|
|||
// We grab the widgets from the current view
|
|||
$current_path = VIEWS_PATH . '/' . $this->_current . '.tpl'; |
|||
require_once $current_path; |
|||
ob_clean(); |
|||
|
|||
$current_widgets = $this->_widgets; |
|||
$this->_widgets = array(); |
|||
|
|||
// We grab the widgets from the next view
|
|||
$next_path = VIEWS_PATH . '/' . $this->_next . '.tpl'; |
|||
require_once $next_path; |
|||
ob_clean(); |
|||
|
|||
$next_widgets = $this->_widgets; |
|||
$this->_widgets = array(); |
|||
|
|||
// We compare the two lists
|
|||
$diff_widgets_current = array_diff($next_widgets, $current_widgets); |
|||
$diff_widgets_next = array_diff($current_widgets, $next_widgets); |
|||
|
|||
\movim_log($diff_widgets_current); |
|||
\movim_log($diff_widgets_next); |
|||
|
|||
$widgets = WidgetWrapper::getInstance(false); |
|||
|
|||
foreach($diff_widgets as $key => $name) { |
|||
RPC::call('movim_fill', strtolower($name) . '_widget', $widgets->runWidget($name, 'build')); |
|||
} |
|||
|
|||
RPC::commit(); |
|||
} |
|||
|
|||
private function widget($name) { |
|||
array_push($this->_widgets, $name); |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue