Browse Source

- Enable groups history

- Fix some translations
- Enable the videos controls in the groups
pull/16/head
Jaussoin Timothée 11 years ago
parent
commit
1235ced458
  1. 15
      app/widgets/Group/Group.php
  2. 10
      app/widgets/Group/_group_posts.tpl
  3. 11
      app/widgets/Group/group.js
  4. 2
      app/widgets/Hello/hello.tpl
  5. 2
      app/widgets/Hello/locales.ini
  6. 1
      themes/material/css/article.css

15
app/widgets/Group/Group.php

@ -168,6 +168,7 @@ class Group extends WidgetCommon
Header::fill($header);
RPC::call('movim_fill', 'group_widget', $html);
RPC::call('Group.enableVideos');
}
@ -232,6 +233,13 @@ class Group extends WidgetCommon
RPC::call('Group.addLoad');
}
function ajaxGetHistory($server, $node, $page)
{
$html = $this->prepareGroup($server, $node, $page);
RPC::call('movim_append', 'group_widget', $html);
RPC::call('Group.enableVideos');
}
function ajaxGetAffiliations($server, $node){
if(!$this->validateServerNode($server, $node)) return;
@ -352,12 +360,15 @@ class Group extends WidgetCommon
return $view->draw('_group_header', true);
}
private function prepareGroup($server, $node)
private function prepareGroup($server, $node, $page = 0)
{
$pd = new \Modl\PostnDAO();
$posts = $pd->getNodeUnfiltered($server, $node, 0, $this->_paging);
$posts = $pd->getNodeUnfiltered($server, $node, $page*$this->_paging, $this->_paging);
$view = $this->tpl();
$view->assign('server', $server);
$view->assign('node', $node);
$view->assign('page', $page);
$view->assign('posts', $posts);
$html = $view->draw('_group_posts', true);

10
app/widgets/Group/_group_posts.tpl

@ -76,3 +76,13 @@
</footer>
</article>
{/loop}
{if="$posts != null"}
<ul class="active thick">
<li onclick="Group_ajaxGetHistory('{$server}', '{$node}', {$page+1}); this.parentNode.removeChild(this);">
<span class="icon">
<i class="md md-history"></i>
</span>
{$c->__('post.older')}
</li>
</ul>
{/if}

11
app/widgets/Group/group.js

@ -5,5 +5,16 @@ var Group = {
clearLoad: function() {
movim_remove_class('#group_widget', 'on');
},
enableVideos: function() {
var items = document.querySelectorAll('video');
var i = 0;
while(i < items.length)
{
items[i].setAttribute('controls', 'controls');
i++;
}
}
}

2
app/widgets/Hello/hello.tpl

@ -112,7 +112,7 @@
<br/>
</a>
</ul>
<ul class="thick flex">
<ul class="thick flex on_desktop">
<li class="condensed block">
<span class="icon bubble color blue">
<i class="md md-share"></i>

2
app/widgets/Hello/locales.ini

@ -4,5 +4,5 @@ hello.blog_title= 'Visit your public blog'
hello.blog_text = 'See your public posts and share them with all your contacts'
hello.contact_post = 'Contact post'
hello.share_title = 'Universal share button'
hello.share_text = 'Right click on or drag and drop the following button in your toolbar and use it on all the pages you want to share on Movim'
hello.share_text = 'Bookmark or drag and drop the following button in your toolbar and use it on all the pages you want to share on Movim'
hello.share_button = 'Share on Movim'

1
themes/material/css/article.css

@ -23,7 +23,6 @@ article section {
line-height: 3rem;
font-weight: 500;
padding: 0 2rem;
text-align: justify;
}
article img {

Loading…
Cancel
Save