Browse Source

- Add tag element in posts display

- CSS/UI fix
- Add "registered" in contact status
pull/16/head
Jaussoin Timothée 13 years ago
parent
commit
2155d6b7be
  1. 1
      app/widgets/ContactInfo/ContactInfo.php
  2. 1
      app/widgets/ContactManage/ContactManage.php
  3. 2
      app/widgets/NodeAffiliations/NodeAffiliations.php
  4. 8
      app/widgets/NodeConfig/NodeConfig.php
  5. 1
      app/widgets/Profile/profile.css
  6. 2
      system/Utils.php
  7. 21
      system/widget/WidgetCommon.php
  8. 17
      themes/movim/css/posts.css

1
app/widgets/ContactInfo/ContactInfo.php

@ -130,6 +130,7 @@ class ContactInfo extends WidgetCommon
'phone' => t('Phone'),
'handheld' => t('Phone'),
'web' => t('Web'),
'registered' => t('Registered')
);
if(isset($caps) && $caps->name != '' && $caps->type != '' ) {

1
app/widgets/ContactManage/ContactManage.php

@ -26,6 +26,7 @@ class ContactManage extends WidgetCommon
public function ajaxContactManage($form) {
$rd = new \moxl\RosterUpdateItem();
$rd->setTo(echapJid($form['jid']))
->setFrom($this->user->getLogin())
->setName(htmlspecialchars($form['alias']))
->setGroup(htmlspecialchars($form['group']))
->request();

2
app/widgets/NodeAffiliations/NodeAffiliations.php

@ -95,7 +95,7 @@ class NodeAffiliations extends WidgetBase
</a>
</div>
<div id="memberlist" class="padded"></div>
<div id="memberlist" class="paddedtop"></div>
</div>
<?php
}

8
app/widgets/NodeConfig/NodeConfig.php

@ -39,7 +39,7 @@ class NodeConfig extends WidgetBase
RPC::commit();
}
function onGroupConfig($stanza) {
function onGroupConfig($stanza) {
Notification::appendNotification(t('Group configuration saved'), 'success');
RPC::commit();
}
@ -54,7 +54,11 @@ class NodeConfig extends WidgetBase
<a
class="button color green icon yes"
style="float: right;"
onclick="'.$submit.' this.onclick=null;"
onclick="
'.$submit.'
this.onclick=null;
this.style.display = \'none\'
"
>
'.t('Validate').'
</a>

1
app/widgets/Profile/profile.css

@ -30,6 +30,7 @@
#profile .textbubble textarea {
background-color: transparent;
border: 1px solid transparent;
border-bottom: 1px solid #333;
font-size: 0.9em;
width: 100%;
resize: none;

2
system/Utils.php

@ -99,7 +99,7 @@ function prepareString($string) {
$string = preg_replace('/(^|[ ])('.$key.')/', $replace, $string);
}
return trim($string);
return rtrim(trim($string), '<br />');
}
/**

21
system/widget/WidgetCommon.php

@ -74,6 +74,9 @@ class WidgetCommon extends WidgetBase {
if($post->links)
$enc = $this->printEnclosures($post->links);
if($post->tags)
$tags = $this->printTags($post->tags);
if($enc)
$enc = '
@ -109,22 +112,32 @@ class WidgetCommon extends WidgetBase {
</span>
</div>
<div class="content">
'.$content.'
'.$content.'<br />
</div>
'.$tags.'
'.$toolbox.'
'.$enc.'
'.$comments.'
'.$place.'
'.$recycle.'
'.$group.'
</div>
<div class="clear"></div>
</div>
</div>
';
return $html;
}
private function printTags($tags) {
$html = '<br />';
$tags = unserialize($tags);
foreach($tags as $t)
$html .= '<span class="tag">'.$t.'</span>';
return $html;
}
private function printEnclosures($links) {
$enc = '';
$links = unserialize($links);

17
themes/movim/css/posts.css

@ -10,7 +10,7 @@
-moz-box-sizing: border-box;
}
.posthead:after {
.post:after, .posthead:after {
content: ""; /* Important, sinon l'élément n'est pas généré. */
display: block;
clear: both;
@ -94,6 +94,21 @@
color: #777;
}
.post span.tag {
font-weight: normal;
background-color: #4C5A61;
color: white;
margin-right: 1em;
font-size: 0.8em;
padding: 0 1em;
position: relative;
border-radius: 0.2em;
}
.post span.tag:first-child {
display: block;
}
.post span.delete {
font-weight: normal;
margin-left: 1em;

Loading…
Cancel
Save