diff --git a/README.md b/README.md index bb8afef..9a174f5 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ Current Movim version : 20150821. **Changelog** +0.9b 2015? + 0.8b 2015-08-23 - Added language selection : ar, de, es, it, ja, nl, ru - Fix URL in manifest.json (was https://https://...) diff --git a/TODO b/TODO new file mode 100644 index 0000000..5019af4 --- /dev/null +++ b/TODO @@ -0,0 +1,5 @@ +- proxy_read_timeout +- proxy_send_timeout +- check if path is not empty +- revoir whitelist +- movim.service pid / syslog ? diff --git a/sources/app/helpers/StringHelper.php b/sources/app/helpers/StringHelper.php index 3a6edce..3bd3ff3 100644 --- a/sources/app/helpers/StringHelper.php +++ b/sources/app/helpers/StringHelper.php @@ -224,12 +224,7 @@ function cleanJid($jid) */ function explodeJid($jid) { - $arr = explode('/', $jid); - $jid = $arr[0]; - - if(isset($arr[1])) $resource = $arr[1]; - else $resource = null; - + list($jid, $resource) = explode('/', $jid); list($username, $server) = explode('@', $jid); return array( diff --git a/sources/app/models/contact/Contact.php b/sources/app/models/contact/Contact.php index d657101..3da798b 100644 --- a/sources/app/models/contact/Contact.php +++ b/sources/app/models/contact/Contact.php @@ -259,9 +259,9 @@ class Contact extends Model { } public function setVcard4($vcard) { - if(isset($vcard->bday->date)) + if(isset($vcard->bday->date) && !empty((string)$vcard->bday->date)) $this->date = (string)$vcard->bday->date; - if(empty($this->date)) + else $this->date = null; $this->name = (string)$vcard->nickname->text; diff --git a/sources/app/widgets/Chat/chat.css b/sources/app/widgets/Chat/chat.css index b4c0dfd..3477028 100644 --- a/sources/app/widgets/Chat/chat.css +++ b/sources/app/widgets/Chat/chat.css @@ -1,7 +1,7 @@ #chat_header.encrypted:after{ content: ""; display: inline-block; - font-family: "Material Design Iconic Font"; + font-family: "Material Design Iconic Font"; content: "\f041"; font-size: 2.5rem; margin-left: 1rem; @@ -19,7 +19,7 @@ #chat_widget .chat_box ul { margin: 0 auto; max-width: 100rem; - margin-left: calc(45% - 49rem); + margin-left: calc(50% - 51rem); } #chat_widget .chat_box form { diff --git a/sources/app/widgets/Chat/chat.js b/sources/app/widgets/Chat/chat.js index afa727d..9531754 100644 --- a/sources/app/widgets/Chat/chat.js +++ b/sources/app/widgets/Chat/chat.js @@ -121,13 +121,6 @@ var Chat = { } } -MovimWebsocket.attach(function() { - var jid = document.querySelector('#chat_widget').dataset.jid; - if(jid) { - Chat_ajaxGet(jid); - } -}); - Upload.attach(function() { var textarea = document.querySelector('#chat_textarea'); textarea.value = Upload.get + ' ' + textarea.value; diff --git a/sources/app/widgets/Chat/chat.tpl b/sources/app/widgets/Chat/chat.tpl index 2d520c6..a21c0aa 100644 --- a/sources/app/widgets/Chat/chat.tpl +++ b/sources/app/widgets/Chat/chat.tpl @@ -1,3 +1,10 @@ -
{$status}
- {else} - {if="isset($message)"} - {$message->published|strtotime|prepareDate} - {if="preg_match('#^\?OTR#', $message->body)"} -{$c->__('message.encrypted')}
- {else} -{$message->body|prepareString|strip_tags}
- {/if} + {if="isset($message)"} + {$message->published|strtotime|prepareDate} + {if="preg_match('#^\?OTR#', $message->body)"} +{$c->__('message.encrypted')}
+ {else} +{$message->body|prepareString|strip_tags}
{/if} {/if} diff --git a/sources/app/widgets/Chats/locales.ini b/sources/app/widgets/Chats/locales.ini index 18770ee..46e51c3 100644 --- a/sources/app/widgets/Chats/locales.ini +++ b/sources/app/widgets/Chats/locales.ini @@ -4,8 +4,6 @@ empty = Open a new conversation by clicking on the plus button bello add = Chat with a contact frequent = Frequent contacts more = Load more contacts -composing = Composing... -paused = Paused... [message] encrypted = Encrypted message diff --git a/sources/app/widgets/Group/locales.ini b/sources/app/widgets/Group/locales.ini index 40a499b..9dec033 100644 --- a/sources/app/widgets/Group/locales.ini +++ b/sources/app/widgets/Group/locales.ini @@ -20,6 +20,6 @@ subscriptions = Subscriptions servers = Groups servers search_server = Search for a new server help_info1 = "Groups are the perfect way to share posts about topics that you like with all the other Movim's users." -help_info2 = Choose a server and a Group and subscribe to it using the %s button in the header. You can also create a new one using the %s button. +help_info2 = Choose a server and a Group and subscribe to it using the %s button in the header. You can alse create a new one using the %s button. help_info3 = Done? You can now publish a new post in the Group by using the %s button. help_info4 = You will find a list of all your subscribed Groups in My Subscriptions and receive instantly all the new incoming posts in the %sNews%s page. diff --git a/sources/app/widgets/Notification/notification.js b/sources/app/widgets/Notification/notification.js index 6a8cf24..9d409c8 100644 --- a/sources/app/widgets/Notification/notification.js +++ b/sources/app/widgets/Notification/notification.js @@ -76,11 +76,11 @@ var Notification = { }, toast : function(html) { target = document.getElementById('toast'); - + if(target) { target.innerHTML = html; } - + setTimeout(function() { target = document.getElementById('toast'); target.innerHTML = ''; @@ -91,11 +91,11 @@ var Notification = { if(Notification.inhibed == true) return; target = document.getElementById('snackbar'); - + if(target) { target.innerHTML = html; } - + setTimeout(function() { target = document.getElementById('snackbar'); target.innerHTML = ''; @@ -105,7 +105,7 @@ var Notification = { desktop : function(title, body, picture) { if(Notification.inhibed == true || Notification.focused) return; -console.log(DesktopNotification); + var notification = new DesktopNotification(title, { icon: picture, body: body }); } } diff --git a/sources/app/widgets/Roster/roster.tpl b/sources/app/widgets/Roster/roster.tpl index 58cf12d..6e7b6de 100644 --- a/sources/app/widgets/Roster/roster.tpl +++ b/sources/app/widgets/Roster/roster.tpl @@ -1,5 +1,5 @@