13 changed files with 229 additions and 32 deletions
-
79system/Widget/WidgetCommon.php
-
14system/Widget/widgets/Config/Config.php
-
104system/Widget/widgets/ConfigData/ConfigData.php
-
3system/Widget/widgets/ConfigData/configdata.css
-
10system/Widget/widgets/Feed/Feed.php
-
5system/Widget/widgets/Login/Login.php
-
1system/Widget/widgets/Logout/Logout.php
-
4system/Widget/widgets/Roster/Roster.php
-
7themes/movim/config.tpl
-
4themes/movim/css/forms.css
-
4themes/movim/css/mobile.css
-
13themes/movim/css/posts.css
-
13themes/movim/css/style2.css
@ -0,0 +1,104 @@ |
|||
<?php |
|||
|
|||
/** |
|||
* @package Widgets |
|||
* |
|||
* @file Wall.php |
|||
* This file is part of MOVIM. |
|||
* |
|||
* @brief The configuration form |
|||
* |
|||
* @author Timothée Jaussoin <edhelas_at_gmail_dot_com> |
|||
* |
|||
* @version 1.0 |
|||
* @date 28 October 2010 |
|||
* |
|||
* Copyright (C)2010 MOVIM project |
|||
* |
|||
* See COPYING for licensing information. |
|||
*/ |
|||
|
|||
class ConfigData extends WidgetBase |
|||
{ |
|||
function WidgetLoad() |
|||
{ |
|||
$this->addcss('configdata.css'); |
|||
} |
|||
|
|||
function ajaxClearRosterLink() { |
|||
$rd = new \modl\RosterLinkDAO(); |
|||
$rd->clearRosterLink(); |
|||
|
|||
$this->refresh(); |
|||
} |
|||
|
|||
function ajaxClearMessage() { |
|||
$md = new \modl\MessageDAO(); |
|||
$md->clearMessage(); |
|||
|
|||
$this->refresh(); |
|||
} |
|||
|
|||
function ajaxClearPost() { |
|||
$pd = new \modl\PostDAO(); |
|||
$pd->clearPost(); |
|||
|
|||
$this->refresh(); |
|||
} |
|||
|
|||
function refresh() { |
|||
$html = $this->prepareConfigData(); |
|||
RPC::call('movim_fill', 'configdata', RPC::cdata($html)); |
|||
RPC::commit(); |
|||
} |
|||
|
|||
function prepareConfigData() { |
|||
$cd = new \modl\ContactDAO(); |
|||
$stats = $cd->getStatistics(); |
|||
|
|||
$clearrosterlink = $this->genCallAjax('ajaxClearRosterLink'); |
|||
$clearmessage = $this->genCallAjax('ajaxClearMessage'); |
|||
$clearpost = $this->genCallAjax('ajaxClearPost'); |
|||
|
|||
$html = ' |
|||
<form enctype="multipart/form-data" method="post" action="index.php" name="general"> |
|||
<fieldset> |
|||
<legend>'.t('Cache').'</legend> |
|||
<div class="clear"></div> |
|||
<div class="element thin"> |
|||
<label for="name">'.t('Post'). ' - '.$stats['Post'].'</label><br /> |
|||
<a |
|||
type="button" |
|||
name="email" |
|||
class="button icon back" |
|||
onclick="'.$clearpost.'">'.t('Clear').'</a> |
|||
</div> |
|||
<div class="element thin"> |
|||
<label for="name">'.t('Messages'). ' - '.$stats['Message'].'</label><br /> |
|||
<a |
|||
type="button" |
|||
name="email" |
|||
class="button icon back" |
|||
onclick="'.$clearmessage.'">'.t('Clear').'</a> |
|||
</div> |
|||
<div class="element thin"> |
|||
<label for="name">'.t('Contacts'). ' - '.$stats['RosterLink'].'</label><br /> |
|||
<a |
|||
type="button" |
|||
class="button icon back" |
|||
onclick="'.$clearrosterlink.'">'.t('Clear').'</a> |
|||
</div> |
|||
</fieldset> |
|||
</form>'; |
|||
return $html; |
|||
} |
|||
|
|||
function build() |
|||
{ |
|||
?>
|
|||
<div class="tabelem" title="<?php echo t('Data'); ?>" id="configdata" > |
|||
<?php echo $this->prepareConfigData(); ?>
|
|||
</div> |
|||
<?php |
|||
} |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
#configdata { |
|||
padding: 1.5em; |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue