1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/movim_ynh.git synced 2024-09-03 19:46:19 +02:00

update to movim 0.9 git2015-12-23

This commit is contained in:
Xavier ROOT 2015-12-23 22:14:25 +01:00
parent d29e686d12
commit dd11b17d34
18 changed files with 186 additions and 35 deletions

View file

@ -10,7 +10,7 @@
- script/install : new SSO policy - script/install : new SSO policy
- script/upgrade : removed "addaccess" parameter and added "clearaccess" (reset) - script/upgrade : removed "addaccess" parameter and added "clearaccess" (reset)
- script/upgrade : new SSO policy - script/upgrade : new SSO policy
- update to movim 0.9 git2015-12-21 - update to movim 0.9 git2015-12-23
1.3 2015-12-15 1.3 2015-12-15
- Update to Movim 0.9 git2015-12-15 - Update to Movim 0.9 git2015-12-15

View file

@ -5,7 +5,7 @@ Movim is a decentralized social network, written in PHP and HTML5 and based on t
It is recommended to use a "valid" certificate to use Movim, auto-signed is sometimes problematic. You might want to take a look a StartSSL or Let's Encrypt. It is recommended to use a "valid" certificate to use Movim, auto-signed is sometimes problematic. You might want to take a look a StartSSL or Let's Encrypt.
Current Movim version : 0.9 git2015-12-21 Current Movim version : 0.9 git2015-12-23
Please read CHANGELOG. Please read CHANGELOG.

View file

@ -4,7 +4,7 @@
</nav> </nav>
<main> <main>
<?php $this->widget('Header'); ?> <?php //$this->widget('Header'); ?>
<section> <section>
<div> <div>
<?php $this->widget('Chats');?> <?php $this->widget('Chats');?>

View file

@ -52,7 +52,7 @@ class Blog extends WidgetBase {
$pd = new \modl\PostnDAO(); $pd = new \modl\PostnDAO();
if($this->_id = $this->get('i')) { if($this->_id = $this->get('i')) {
if(Validator::intType()->between(0, 100)->validate($this->_id)) { if(Validator::intType()->between(0, 100)->validate((int)$this->_id)) {
if(isset($this->_tag)) { if(isset($this->_tag)) {
$this->_messages = $pd->getPublicTag($this->get('t'), $this->_id * $this->_paging, $this->_paging + 1); $this->_messages = $pd->getPublicTag($this->get('t'), $this->_id * $this->_paging, $this->_paging + 1);
} else { } else {

View file

@ -86,7 +86,7 @@
{if="$mode == 'blog'"} {if="$mode == 'blog'"}
<a href="{$c->route('blog', array($contact->jid, $more))}"> <a href="{$c->route('blog', array($contact->jid, $more))}">
{else} {else}
<a href="{$c->route('group', array($server, $node, $more))}"> <a href="{$c->route('node', array($server, $node, $more))}">
{/if} {/if}
<li id="history" class="block large"> <li id="history" class="block large">
<span class="primary icon"><i class="zmdi zmdi-time-restore"></i></span> <span class="primary icon"><i class="zmdi zmdi-time-restore"></i></span>

View file

@ -191,9 +191,9 @@ class Chat extends WidgetBase
$html = $this->prepareChat($jid); $html = $this->prepareChat($jid);
$header = $this->prepareHeader($jid); //$header = $this->prepareHeader($jid);
Header::fill($header); //Header::fill($header);
RPC::call('movim_fill', 'chat_widget', $html); RPC::call('movim_fill', 'chat_widget', $html);
RPC::call('MovimTpl.showPanel'); RPC::call('MovimTpl.showPanel');
RPC::call('Chat.focus'); RPC::call('Chat.focus');
@ -212,9 +212,9 @@ class Chat extends WidgetBase
$html = $this->prepareChat($room, true); $html = $this->prepareChat($room, true);
$header = $this->prepareHeaderRoom($room); //$header = $this->prepareHeaderRoom($room);
Header::fill($header); //Header::fill($header);
RPC::call('movim_fill', 'chat_widget', $html); RPC::call('movim_fill', 'chat_widget', $html);
RPC::call('MovimTpl.showPanel'); RPC::call('MovimTpl.showPanel');
RPC::call('Chat.focus'); RPC::call('Chat.focus');
@ -469,6 +469,34 @@ class Chat extends WidgetBase
$view->assign('emoji', prepareString('😀')); $view->assign('emoji', prepareString('😀'));
$view->assign('muc', $muc); $view->assign('muc', $muc);
if($muc) {
$md = new \Modl\MessageDAO;
$s = $md->getRoomSubject($jid);
$cd = new \Modl\ConferenceDAO;
$c = $cd->get($jid);
$pd = new \Modl\PresenceDAO;
$p = $pd->getMyPresenceRoom($jid);
$view->assign('room', $jid);
$view->assign('subject', $s);
$view->assign('presence', $p);
$view->assign('conference', $c);
} else {
$cd = new \Modl\ContactDAO;
$cr = $cd->getRosterItem($jid);
if(isset($cr)) {
$contact = $cr;
} else {
$contact = $cd->get($jid);
}
$view->assign('contact', $contact);
$view->assign('jid', $jid);
}
return $view->draw('_chat', true); return $view->draw('_chat', true);
} }

View file

@ -1,4 +1,89 @@
<div id="{$jid}_discussion" class="contained"> <header class="fixed">
{if="$muc"}
<ul class="list middle active">
<li>
<span id="back" class="primary icon active" {if="!$anon"}onclick="MovimTpl.hidePanel(); Chat_ajaxGet();"{/if}>
{if="!$anon"}
<i class="zmdi zmdi-arrow-back"></i>
{else}
<i class="zmdi zmdi-comment-text-alt"></i>
{/if}
</span>
<span class="control icon show_context_menu active">
<i class="zmdi zmdi-more-vert"></i>
</span>
{if="$c->supported('upload')"}
<span class="control icon active" onclick="Upload_ajaxRequest()">
<i class="zmdi zmdi-attachment-alt"></i>
</span>
{/if}
<span class="control icon active" onclick="Rooms_ajaxExit('{$room}'); MovimTpl.hidePanel(); {if="$anon"}Presence_ajaxLogout(){/if}">
<i class="zmdi zmdi-close"></i>
</span>
{if="$conference != null && $conference->name"}
<p class="line" title="{$room}">{$conference->name}</p>
{else}
<p class="line">{$room}</p>
{/if}
{if="$subject != null"}
<p class="line" title="{$subject->subject}">{$subject->subject}</p>
{/if}
</li>
</ul>
<ul class="list context_menu active">
<li onclick="Rooms_ajaxList('{$room}')">
<p class="normal">{$c->__('chatroom.members')}</p>
</li>
{if="!$anon"}
<li onclick="Rooms_ajaxRemoveConfirm('{$room}')">
<p class="normal">{$c->__('button.delete')}</p>
</li>
{/if}
{if="$presence != null && $presence->mucrole == 'moderator' && !$anon"}
<li onclick="Chat_ajaxGetRoomConfig('{$room}')">
<p class="normal">{$c->__('chatroom.config')}</p>
</li>
<li onclick="Chat_ajaxGetSubject('{$room}')">
<p class="normal">{$c->__('chatroom.subject')}</p>
</li>
{/if}
</ul>
{else}
<ul class="list middle">
<li id="chat_header">
<span onclick="
MovimTpl.hidePanel();
Notification.current('chat');
Chat_ajaxGet();"
id="back" class="primary icon active">
<i class="zmdi zmdi-arrow-back"></i>
</span>
<span class="control icon active" onclick="Chats_ajaxClose('{$jid|echapJS}'); MovimTpl.hidePanel();">
<i class="zmdi zmdi-close"></i>
</span>
{if="$c->supported('upload')"}
<span class="control icon active" onclick="Upload_ajaxRequest()">
<i class="zmdi zmdi-attachment-alt"></i>
</span>
{/if}
<p class="line">
{if="$contact != null"}
{$contact->getTrueName()}
{else}
{$jid|echapJS}
{/if}
</p>
<p class="line" id="{$jid}_state">{$contact->jid}</p>
</li>
</ul>
{/if}
</header>
<div id="{$jid}_discussion" class="contained" data-muc="{$muc}">
<section id="{$jid}_messages"> <section id="{$jid}_messages">
<ul class="list {if="$muc"}thin simple{else}thick{/if}" id="{$jid}_conversation"></ul> <ul class="list {if="$muc"}thin simple{else}thick{/if}" id="{$jid}_conversation"></ul>
</section> </section>

View file

@ -46,7 +46,7 @@
} }
#chat_widget section { #chat_widget section {
padding-bottom: 2rem; padding-bottom: 1rem;
} }
#chat_widget li.oppose span.control { #chat_widget li.oppose span.control {
@ -71,6 +71,7 @@
#chat_widget li.room { #chat_widget li.room {
padding: 0.25rem 0; padding: 0.25rem 0;
padding-right: 2rem;
} }
#chat_widget li.room > p { #chat_widget li.room > p {

View file

@ -54,13 +54,16 @@ var Chat = {
}, },
setScrollBehaviour : function() { setScrollBehaviour : function() {
var discussion = document.querySelector('#chat_widget div.contained'); var discussion = document.querySelector('#chat_widget div.contained');
discussion.onscroll = function() { console.log(discussion.dataset.muc);
if(this.scrollTop < 1) { if(discussion.dataset.muc != true) {
var chat = document.querySelector('#chat_widget'); discussion.onscroll = function() {
Chat.lastScroll = this.scrollHeight; if(this.scrollTop < 1) {
Chat_ajaxGetHistory(chat.dataset.jid, Chat.date); var chat = document.querySelector('#chat_widget');
} Chat.lastScroll = this.scrollHeight;
}; Chat_ajaxGetHistory(chat.dataset.jid, Chat.date);
}
};
}
}, },
appendMessages : function(messages) { appendMessages : function(messages) {
if(messages) { if(messages) {

View file

@ -1,3 +1,13 @@
<header>
<ul class="list middle">
<li>
<span id="menu" class="primary on_mobile icon active gray" onclick="MovimTpl.toggleMenu()"><i class="zmdi zmdi-menu"></i></span>
<span class="primary icon on_desktop icon gray"><i class="zmdi zmdi-comments"></i></span>
<p class="center">{$c->__('page.chats')}</p>
</li>
</ul>
</header>
<ul id="chats_widget_list" class="list middle active divided spaced">{$list}</ul> <ul id="chats_widget_list" class="list middle active divided spaced">{$list}</ul>
<div class="placeholder icon"> <div class="placeholder icon">

View file

@ -1,14 +1,14 @@
<header>
<ul class="list middle">
<li>
<span id="menu" class="primary on_mobile icon active" onclick="MovimTpl.toggleMenu()"><i class="zmdi zmdi-menu"></i></span>
<span class="primary on_desktop icon gray"><i class="zmdi zmdi-home"></i></span>
<p class="center">{$c->__('page.home')}</p>
</li>
</ul>
</header>
<div id="hello_widget" class="divided"> <div id="hello_widget" class="divided">
<header>
<ul class="list middle">
<li>
<span id="menu" class="primary on_mobile icon active gray" onclick="MovimTpl.toggleMenu()"><i class="zmdi zmdi-menu"></i></span>
<span class="primary on_desktop icon gray"><i class="zmdi zmdi-home"></i></span>
<p class="center">{$c->__('page.home')}</p>
</li>
</ul>
</header>
{if="!isset($top) || !isset($news)"} {if="!isset($top) || !isset($news)"}
<ul class="list thick"> <ul class="list thick">
{$a = '1f600'} {$a = '1f600'}
@ -153,6 +153,8 @@
</li> </li>
{/loop} {/loop}
</ul>
<ul class="list">
<a href="{$c->route('news')}"> <a href="{$c->route('news')}">
<li> <li>
<span class="primary icon"> <span class="primary icon">

View file

@ -2,7 +2,7 @@
<header> <header>
<ul class="list middle"> <ul class="list middle">
<li> <li>
<span id="menu" class="primary on_mobile icon active" onclick="MovimTpl.toggleMenu()"><i class="zmdi zmdi-menu"></i></span> <span id="menu" class="primary on_mobile icon active gray" onclick="MovimTpl.toggleMenu()"><i class="zmdi zmdi-menu"></i></span>
<span class="primary on_desktop icon gray"><i class="zmdi zmdi-filter-list"></i></span> <span class="primary on_desktop icon gray"><i class="zmdi zmdi-filter-list"></i></span>
<p class="center line">{$c->__('page.news')}</p> <p class="center line">{$c->__('page.news')}</p>
</li> </li>

View file

@ -2,7 +2,7 @@
<header> <header>
<ul class="list"> <ul class="list">
<li> <li>
<span id="menu" class="primary on_mobile icon active" onclick="MovimTpl.toggleMenu()"><i class="zmdi zmdi-menu"></i></span> <span id="menu" class="primary on_mobile icon active gray" onclick="MovimTpl.toggleMenu()"><i class="zmdi zmdi-menu"></i></span>
<span class="primary on_desktop icon gray"><i class="zmdi zmdi-search"></i></span> <span class="primary on_desktop icon gray"><i class="zmdi zmdi-search"></i></span>
<form> <form>
<div onclick="Roster.init();"> <div onclick="Roster.init();">

View file

@ -5,6 +5,7 @@
.flex .block { .flex .block {
flex: 1 50%; flex: 1 50%;
overflow: hidden;
} }
.flex .block.large, .flex .block.large,

View file

@ -75,6 +75,7 @@ ul.list li > p:nth-last-of-type(2) + p {
.button.color, .button.color,
input[type=button].color, input[type=button].color,
ul li span.counter, ul li span.counter,
main > section > div > header.fixed,
/*main > section > div > header,*/ /*main > section > div > header,*/
main > header { background-color: #3F51B5; color: white; border-color: #3F51B5; } main > header { background-color: #3F51B5; color: white; border-color: #3F51B5; }
@ -88,6 +89,7 @@ main > section > div > header.scroll {
background-color: #EEE; background-color: #EEE;
} }
header.fixed ul.list li > p:nth-last-of-type(2) + p,
main > section > div > header.big *, main > section > div > header.big *,
.snackbar ul.list li > p:nth-last-of-type(2) + p, .snackbar ul.list li > p:nth-last-of-type(2) + p,
main > header ul.list li > p:nth-last-of-type(2) + p, main > header ul.list li > p:nth-last-of-type(2) + p,

View file

@ -10,6 +10,23 @@ header.big {
} }
header.fixed {
position: fixed;
width: 100%;
max-width: 100%;
z-index: 1;
}
@media screen and (min-width: 1024px) {
main > section > div:first-child:nth-last-child(2) ~ div > header.fixed {
width: 65%;
}
}
header.fixed + div {
margin-top: 7rem;
}
/* /*
header.big { header.big {
background-size: cover, cover; background-size: cover, cover;

View file

@ -228,7 +228,7 @@ ul.list li > .control ~ .control ~ .control {
/* Limit the size of the main content */ /* Limit the size of the main content */
ul.list li > .control ~ *:not(.control):not(.bubble):not(.counter) { ul.list li > .control ~ *:not(.control):not(.bubble):not(.counter) {
width: calc(100% - 8rem); width: calc(100% - 9rem);
} }
ul.list li > .control ~ .control ~ *:not(.control):not(.bubble):not(.counter) { ul.list li > .control ~ .control ~ *:not(.control):not(.bubble):not(.counter) {
@ -331,7 +331,9 @@ ul li div.bubble {
} }
ul li div.bubble > p { ul li div.bubble > p {
display: inline; overflow: hidden;
display: inline-block;
max-width: 100%;
} }
ul li.oppose div.bubble { ul li.oppose div.bubble {

View file

@ -394,8 +394,8 @@ main > section > div:first-child:nth-last-child(2) ~ div {
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
-webkit-transition: left .3s cubic-bezier(.4,0,.2,1); /*-webkit-transition: left .3s cubic-bezier(.4,0,.2,1);
transition: left .3s cubic-bezier(.4,0,.2,1); transition: left .3s cubic-bezier(.4,0,.2,1);*/
} }
main > section > div:first-child:nth-last-child(2) ~ div { main > section > div:first-child:nth-last-child(2) ~ div {
@ -403,7 +403,7 @@ main > section > div:first-child:nth-last-child(2) ~ div {
} }
main > section > div > div.contained { /* Specific behaviour when the scroll need to be inside the block */ main > section > div > div.contained { /* Specific behaviour when the scroll need to be inside the block */
height: calc(100% - 7rem); height: calc(100% - 14.5rem);
overflow-y: scroll; overflow-y: scroll;
position: absolute; position: absolute;
max-width: 100%; max-width: 100%;