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

upgrade to movim 0.9 git2016-01-13

This commit is contained in:
Xavier ROOT 2016-01-13 12:08:24 +01:00
parent 836204e2a8
commit 7d90dbd2a9
20 changed files with 403 additions and 462 deletions

View file

@ -1,5 +1,8 @@
**Changelog**
1.6 ?
- Update to movim 0.9 git2016-01-13
1.5 2016-01-13
- Update to movim 0.9 git2016-01-07
- fix #16 (Installing movim crashes agendav)

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.
Provided Movim version : 0.9 git2015-01-07
Provided Movim version : 0.9 git2016-01-13
Please read CHANGELOG.

View file

@ -1,7 +1,29 @@
Movim Changelog
================
v0.8.1 (trunk)
v0.9 (trunk)
---------------------------
* New User Interface for the whole project
* Removed BOSH connections and introduce pure XMPP TLS connections
* Full real-time + daemon
* New Blog engine and custom CSS support
* New post publication system + attachements supported (upload and embed links)
* Fully responsive design UI based on Material Design
* Huge code cleanup and refactoring
* Updated i18n system and new languages
* New eventing system
* New administration panel
* New dedicated chat page and emojis support
* New project icon and favicon
* New implementation for the Groups feature
* New Roster based on Angular
* Refactor the Contact management system and add a gallery on the profiles
* New universal-share bookmarklet
* CSS animations and mobile integration (FirefoxOS and Android)
* Internet Explorer 11 support
* PHP7 Support
v0.8.1
---------------------------
* Add charts in the Statistics
* Add a Caps support table

View file

@ -1,9 +1,8 @@
Movim Installation
===================
* Movim deployment tutorial: https://github.com/edhelas/movim/wiki/Install-Movim
* Movim deployment tutorial: https://github.com/movim/movim/wiki/Install-Movim
You can also follow the Jappix project documentation for a full stack deployment:
* The XMPP server: https://github.com/jappix/jappix/wiki/XmppServer
* The BOSH server: https://github.com/jappix/jappix/wiki/BoshServer

View file

@ -3,11 +3,11 @@ Movim - Kickass Social Network
Movim is a decentralized social network, written in PHP and HTML5 and based on the XMPP standard protocol.
![movim logo](https://movim.eu/sites/default/files/large_0.png)
![movim logo](https://movim.eu/img/main_top.png)
Installation
------------
Please refer to the installation instructions that are available on the GitHub Wiki : https://github.com/edhelas/movim/wiki .
Please refer to the installation instructions that are available on the GitHub Wiki : https://github.com/movim/movim/wiki .
Translations

View file

@ -1,8 +1,8 @@
/**
* @license MIT
* @license MIT or GPL-2.0
* @fileOverview Favico animations
* @author Miroslav Magda, http://blog.ejci.net
* @version 0.3.7
* @version 0.3.10
*/
/**
@ -18,7 +18,8 @@
* position : 'down',
* type : 'circle',
* animation : 'slide',
* dataUrl: function(url){}
* dataUrl: function(url){},
* win: top
* });
*/
(function () {
@ -35,9 +36,10 @@
position: 'down', // down, up, left, leftup (upleft)
animation: 'slide',
elementId: false,
dataUrl : false
dataUrl: false,
win: window
};
var _opt, _orig, _h, _w, _canvas, _context, _img, _ready, _lastBadge, _running, _readyCb, _stop, _browser, _animTimeout, _drawTimeout;
var _opt, _orig, _h, _w, _canvas, _context, _img, _ready, _lastBadge, _running, _readyCb, _stop, _browser, _animTimeout, _drawTimeout, _doc;
_browser = {};
_browser.ff = typeof InstallTrigger != 'undefined';
@ -62,13 +64,16 @@
_opt.position = _opt.position.toLowerCase();
_opt.animation = (animation.types['' + _opt.animation]) ? _opt.animation : _def.animation;
_doc = _opt.win.document;
var isUp = _opt.position.indexOf('up') > -1;
var isLeft = _opt.position.indexOf('left') > -1;
//transform animation
//transform the animations
if (isUp || isLeft) {
for (var i = 0; i < animation.types['' + _opt.animation].length; i++) {
var step = animation.types['' + _opt.animation][i];
for (var a in animation.types) {
for (var i = 0; i < animation.types[a].length; i++) {
var step = animation.types[a][i];
if (isUp) {
if (step.y < 0.6) {
@ -86,7 +91,8 @@
}
}
animation.types['' + _opt.animation][i] = step;
animation.types[a][i] = step;
}
}
}
_opt.type = (type['' + _opt.type]) ? _opt.type : _def.type;
@ -97,7 +103,7 @@
//create temp image
_img = document.createElement('img');
if (_orig.hasAttribute('href')) {
_img.setAttribute('src', _orig.getAttribute('href'));
_img.setAttribute('crossOrigin', 'anonymous');
//get width/height
_img.onload = function () {
_h = (_img.height > 0) ? _img.height : 32;
@ -107,8 +113,9 @@
_context = _canvas.getContext('2d');
icon.ready();
};
_img.setAttribute('src', _orig.getAttribute('href'));
} else {
_img.setAttribute('src', '');
_img.onload = function () {
_h = 32;
_w = 32;
_img.height = _h;
@ -117,6 +124,8 @@
_canvas.width = _w;
_context = _canvas.getContext('2d');
icon.ready();
};
_img.setAttribute('src', '');
}
};
@ -320,14 +329,14 @@
});
_queue.push(q);
if (_queue.length > 100) {
throw 'Too many badges requests in queue.';
throw new Error('Too many badges requests in queue.');
}
icon.start();
} else {
icon.reset();
}
} catch (e) {
throw 'Error setting badge. Message: ' + e.message;
throw new Error('Error setting badge. Message: ' + e.message);
}
};
if (_ready) {
@ -345,14 +354,17 @@
var h = imageElement.height;
var newImg = document.createElement('img');
var ratio = (w / _w < h / _h) ? (w / _w) : (h / _h);
newImg.setAttribute('src', imageElement.getAttribute('src'));
newImg.height = (h / ratio);
newImg.width = (w / ratio);
newImg.setAttribute('crossOrigin', 'anonymous');
newImg.onload=function(){
_context.clearRect(0, 0, _w, _h);
_context.drawImage(newImg, 0, 0, _w, _h);
link.setIcon(_canvas);
};
newImg.setAttribute('src', imageElement.getAttribute('src'));
newImg.height = (h / ratio);
newImg.width = (w / ratio);
} catch (e) {
throw 'Error setting image. Message: ' + e.message;
throw new Error('Error setting image. Message: ' + e.message);
}
};
if (_ready) {
@ -379,7 +391,7 @@
}, false);
} catch (e) {
throw 'Error setting video. Message: ' + e.message;
throw new Error('Error setting video. Message: ' + e.message);
}
};
if (_ready) {
@ -421,7 +433,7 @@
}, function () {
});
} catch (e) {
throw 'Error setting webcam. Message: ' + e.message;
throw new Error('Error setting webcam. Message: ' + e.message);
}
};
if (_ready) {
@ -445,7 +457,9 @@
} catch (e) {
}
_drawTimeout = setTimeout(drawVideo, animation.duration, video);
_drawTimeout = setTimeout(function () {
drawVideo(video);
}, animation.duration);
link.setIcon(_canvas);
}
@ -457,7 +471,7 @@
var elm = false;
//get link element
var getLink = function () {
var link = document.getElementsByTagName('head')[0].getElementsByTagName('link');
var link = _doc.getElementsByTagName('head')[0].getElementsByTagName('link');
for (var l = link.length, i = (l - 1); i >= 0; i--) {
if ((/(^|\s)icon(\s|$)/i).test(link[i].getAttribute('rel'))) {
return link[i];
@ -469,15 +483,15 @@
elm = _opt.element;
} else if (_opt.elementId) {
//if img element identified by elementId
elm = document.getElementById(_opt.elementId);
elm = _doc.getElementById(_opt.elementId);
elm.setAttribute('href', elm.getAttribute('src'));
} else {
//if link element
elm = getLink();
if (elm === false) {
elm = document.createElement('link');
elm = _doc.createElement('link');
elm.setAttribute('rel', 'icon');
document.getElementsByTagName('head')[0].appendChild(elm);
_doc.getElementsByTagName('head')[0].appendChild(elm);
}
}
elm.setAttribute('type', 'image/png');
@ -490,24 +504,27 @@
_opt.dataUrl(url);
}
if (_opt.element) {
_opt.element.setAttribute('href', url);
_opt.element.setAttribute('src', url);
} else if (_opt.elementId) {
//if is attached to element (image)
document.getElementById(_opt.elementId).setAttribute('src', url);
var elm = _doc.getElementById(_opt.elementId);
elm.setAttribute('href', url);
elm.setAttribute('src', url);
} else {
//if is attached to fav icon
if (_browser.ff || _browser.opera) {
//for FF we need to "recreate" element, atach to dom and remove old <link>
//var originalType = _orig.getAttribute('rel');
var old = _orig;
_orig = document.createElement('link');
_orig = _doc.createElement('link');
//_orig.setAttribute('rel', originalType);
if (_browser.opera) {
_orig.setAttribute('rel', 'icon');
}
_orig.setAttribute('rel', 'icon');
_orig.setAttribute('type', 'image/png');
document.getElementsByTagName('head')[0].appendChild(_orig);
_doc.getElementsByTagName('head')[0].appendChild(_orig);
_orig.setAttribute('href', url);
if (old.parentNode) {
old.parentNode.removeChild(old);
@ -553,7 +570,7 @@
* http://stackoverflow.com/questions/12536562/detect-whether-a-window-is-visible
*/
function isPageHidden() {
return document.hidden || document.msHidden || document.webkitHidden || document.mozHidden;
return _doc.hidden || _doc.msHidden || _doc.webkitHidden || _doc.mozHidden;
}
/**

View file

@ -56,9 +56,7 @@ var MovimWebsocket = {
};
this.connection.onmessage = function(e) {
//console.log(e.data);
data = pako.ungzip(base64_decode(e.data), { to: 'string' });
//data = e.data;
var obj = JSON.parse(data);
@ -139,11 +137,9 @@ var MovimWebsocket = {
},
handle : function(funcalls) {
//var funcalls = JSON.parse(json);
if(funcalls != null) {
for(h = 0; h < funcalls.length; h++) {
var funcall = funcalls[h];
//console.log(funcall);
if(funcall.func != null && (typeof window[funcall.func] == 'function')) {
try {
window[funcall.func].apply(null, funcall.params);

View file

@ -20,7 +20,6 @@
<?php
$this->addCss('style.css');
$this->addCss('header.css');
//$this->addCss('list.css');
$this->addCss('listn.css');
$this->addCss('grid.css');
$this->addCss('article.css');

View file

@ -14,14 +14,14 @@
<h1>{$c->__('chats.empty_title')}</h1>
<h4>{$c->___('chats.empty', '<i class="zmdi zmdi-plus"></i>', '<a href="'.$c->route('contact').'"><i class="zmdi zmdi-accounts"></i> ', '</a>')}</h4>
</div>
<a class="button action color" onclick="MovimTpl.toggleActionButton()">
<a class="button action color" onclick="MovimTpl.toggleActionButton()" title="{$c->__('button.chat')}">
<i class="zmdi zmdi-plus"></i>
<ul class="actions">
<li onclick="Chats_ajaxAdd()">
<li onclick="Chats_ajaxAdd()" title="{$c->__('chats.add')}">
<i class="zmdi zmdi-account-add"></i>
</li>
<li onclick="Rooms_ajaxAdd()">
<li onclick="Rooms_ajaxAdd()" title="{$c->__('rooms.add')}">
<i class="zmdi zmdi-accounts-add"></i>
</li>
</ul>

View file

@ -12,3 +12,4 @@ encrypted = Encrypted message
[button]
chat = Chat
new = New conversation

View file

@ -39,6 +39,11 @@ class Contact extends WidgetBase
$html = $this->prepareContact($jid);
$r = new GetItems;
$r->setTo($jid)
->setNode('urn:xmpp:microblog:0')
->request();
Header::fill($header);
RPC::call('movim_fill', 'contact_widget', $html);
RPC::call('MovimTpl.showPanel');

View file

@ -1,3 +1,3 @@
<a onclick="Publish_ajaxCreate('{$to}', 'urn:xmpp:microblog:0'); MovimTpl.showPanel();" class="button action color red">
<a onclick="Publish_ajaxCreate('{$to}', 'urn:xmpp:microblog:0'); MovimTpl.showPanel();" class="button action color red" title="{$c->__('menu.add_post')}">
<i class="zmdi zmdi-edit"></i>
</a>

View file

@ -11,9 +11,9 @@
<li>
<ul class="tabs wide">
<li {if="$type == 'all'"}class="active"{/if}><a href="#" onclick="Menu_ajaxGetAll()">{$c->__('menu.all')}</a></li>
<li {if="$type == 'news'"}class="active"{/if} ><a href="#" onclick="Menu_ajaxGetNews()"><i class="zmdi zmdi-pages"></i></a></li>
<li {if="$type == 'feed'"}class="active"{/if}><a href="#" onclick="Menu_ajaxGetFeed()"><i class="zmdi zmdi-accounts"></i></a></li>
<li {if="$type == 'me'"}class="active"{/if}><a href="#" onclick="Menu_ajaxGetMe()"><i class="zmdi zmdi-portable-wifi"></i></a></li>
<li {if="$type == 'news'"}class="active"{/if} ><a href="#" onclick="Menu_ajaxGetNews()" title="{$c->__('page.news')}"><i class="zmdi zmdi-pages"></i></a></li>
<li {if="$type == 'feed'"}class="active"{/if}><a href="#" onclick="Menu_ajaxGetFeed()" title="{$c->__('page.feed')}"><i class="zmdi zmdi-accounts"></i></a></li>
<li {if="$type == 'me'"}class="active"{/if}><a href="#" onclick="Menu_ajaxGetMe()" title="{$c->__('menu.mine')}"><i class="zmdi zmdi-portable-wifi"></i></a></li>
</ul>
</li>
</ul>

View file

@ -6,6 +6,8 @@ refresh = Refreshing all the streams
public = This post is public
all = All
mine = My publications
groups = Groups
contacts = Contacts
refresh = Refresh all the streams
add_post = Add a post

View file

@ -41,6 +41,7 @@
</div>
{/if}
{if="($public && $post->isPublic()) || !$public"}
<ul class="list thick">
<li>
{if="$recycled"}
@ -111,6 +112,7 @@
</li>
</ul>
{/if}
</header>
{if="!$external && !$public"}
@ -220,8 +222,8 @@
<div class="checkbox">
<input
type="checkbox"
id="privacy"
name="privacy"
id="privacy_{$post->nodeid}"
name="privacy_{$post->nodeid}"
{if="$post->privacy"}
checked
{/if}
@ -231,7 +233,7 @@
onclick="Post_ajaxTogglePrivacy('{$post->nodeid}')"
{/if}
>
<label for="privacy"></label>
<label for="privacy_{$post->nodeid}"></label>
</div>
</div>
</form>

View file

@ -48,8 +48,7 @@ class Presence extends WidgetBase
function onPostDisconnect($data)
{
RPC::call('movim_reload',
BASE_URI."index.php?q=disconnect");
RPC::call('movim_reload', Route::urlize('disconnect'));
}
function ajaxSet($form = false)

View file

@ -80,7 +80,7 @@
</div>
</ul>
<br />
<a onclick="Roster_ajaxDisplaySearch()" class="button action color">
<a onclick="Roster_ajaxDisplaySearch()" class="button action color" title="{$c->__('roster.search')}">
<i class="zmdi zmdi-account-add"></i>
</a>

View file

@ -15,7 +15,7 @@ accounts_nickname = Nickname
[privacy]
privacy_title = Privacy Level
privacy_question = Is this profile public ?
privacy_info = "Please pay attention ! By making your profile public, all the information listed above will be available for all the Movim users and on the whole Internet."
privacy_info = "Please pay attention ! By making your profile public, all the information listed bellow will be available for all the Movim users and on the whole Internet."
[save]
submit = Submit

View file

@ -65,6 +65,8 @@ class Locale {
}
}
$po['en'] = 'English';
return $po;
}

View file

@ -27,109 +27,3 @@ header.fixed + div {
margin-top: 7rem;
}
/*
header.big {
background-size: cover, cover;
background-position: center center;
width: 100%;
max-width: 100%;
color: white;
position: relative;
margin-bottom: 2rem;
}
header.big p {
color: white;
}*/
/*
main > section > div > header,
main > section > div:first-child:nth-last-child(2) ~ div > header {
position: relative;
width: 100%;
max-width: 100%;
z-index: 1;
display: block;
overflow: hidden;
max-height: 50rem;
transition: max-height 0.3s cubic-bezier(.4,0,.2,1);
}
main > section > div > header.scroll,
main > section > div:first-child:nth-last-child(2) ~ div > header.scroll {
max-height: 7rem;
position: fixed;
top: 0;
transition: max-height 0.3s cubic-bezier(.4,0,.2,1);
}
main > section > div:first-child:nth-last-child(2) ~ div > header.scroll {
width: 65%;
}
main > section > div > header.scroll:not(.big) {
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
main > section > div:first-child:nth-last-child(2) > header.scroll {
width: 35%;
}
@media screen and (max-width: 1024px) {
main > section > div:first-child:nth-last-child(2) > header.scroll,
main > section > div:first-child:nth-last-child(2) ~ div > header.scroll {
width: 100%;
}
}
main > section > div > header > div > h2 {
display: inline-block;
margin-left: 1rem;
white-space: nowrap;
text-overflow: ellipsis;
max-width: calc(100% - 10rem);
opacity: 0;
transition: opacity 0.3s cubic-bezier(.4,0,.2,1);
transition-delay: 0.3s;
}
main > section > div > header.scroll > div > h2 {
opacity: 1;
}
main > section > div > header ul.tabs,
main > section > div > header form {
margin-top: 1rem;
width: calc(100% - 8rem);
box-sizing: border-box;
float: right;
border: 0;
}
main > section > div > header form {
padding: 0 1rem;
margin-top: 2rem;
}
main > section > div > header form > div:not(.clear):not(.control) {
min-height: 0;
}
main > section > div > header form > div > input:not([type=submit]) {
padding-top: 0rem;
}
header.big h2,
header.big p {
color: white;
}
main > section > div > header.scroll + * {
margin-top: 7rem;
}*/
/*
main > section > div > header + article {
margin-bottom: 2rem;
}
*/