diff --git a/CHANGELOG b/CHANGELOG
index 8953311..3aca93b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,7 +1,7 @@
**Changelog**
1.9 2016-*
-- Update to movim 0.9 git2016-05-19
+- Update to movim 0.9 git2016-05-30
1.8 2016-04-15
- Update to movim 0.9 git2016-04-15
diff --git a/README.md b/README.md
index f31d512..ba64943 100644
--- a/README.md
+++ b/README.md
@@ -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 git2016-05-19
+Provided Movim version : 0.9 git2016-05-30
Please read CHANGELOG.
diff --git a/sources/CHANGELOG.md b/sources/CHANGELOG.md
index a17dba8..4bf22b7 100644
--- a/sources/CHANGELOG.md
+++ b/sources/CHANGELOG.md
@@ -3,8 +3,12 @@ Movim Changelog
v0.9.1 (trunk)
---------------------------
+ * Fix behaviour for Android and Electron packages
* Fix Pubsub metadata handling for some XMPP servers
+ * Add global search
* Add silent notifications for chatrooms
+ * Add alternate nickname support (adding "_") when joining a chatroom
+ * Allow room configuration edition
* Put your own XMPP server as default in the configuration (movim.eu in fallback)
* Close the Dialog box when pressing ESC
* Moving values from Sessionx to Session
diff --git a/sources/app/models/contact/ContactDAO.php b/sources/app/models/contact/ContactDAO.php
index dbd5810..4bb1902 100644
--- a/sources/app/models/contact/ContactDAO.php
+++ b/sources/app/models/contact/ContactDAO.php
@@ -493,9 +493,22 @@ class ContactDAO extends SQL {
rosterlink.rostername,
rosterlink.rostersubscription,
rosterlink.groupname,
- rosterlink.chaton
+ rosterlink.chaton,
+ presence.value,
+ presence.delay,
+ presence.last
from rosterlink
left outer join contact
+ left outer join (
+ select a.*
+ from presence a
+ join (
+ select jid, min( id ) as id
+ from presence
+ where session = :session
+ group by jid
+ ) as b on ( a.id = b.id )
+ ) presence on contact.jid = presence.jid
on rosterlink.jid = contact.jid
where rosterlink.session = :session
and (rosterlink.jid like :jid
diff --git a/sources/app/views/page.tpl b/sources/app/views/page.tpl
index 0392ca8..e889e29 100644
--- a/sources/app/views/page.tpl
+++ b/sources/app/views/page.tpl
@@ -32,6 +32,8 @@
$this->addCss('block.css');
$this->addCss('menu.css');
$this->addCss('fonts.css');
+ $this->addCss('title.css');
+ $this->addCss('typo.css');
$this->addCss('material-design-iconic-font.min.css');
$this->widget('System');
diff --git a/sources/app/widgets/AdHoc/_adhoc_form.tpl b/sources/app/widgets/AdHoc/_adhoc_form.tpl
index 3573cff..6118a30 100644
--- a/sources/app/widgets/AdHoc/_adhoc_form.tpl
+++ b/sources/app/widgets/AdHoc/_adhoc_form.tpl
@@ -1,5 +1,5 @@
diff --git a/sources/app/widgets/Chat/Chat.php b/sources/app/widgets/Chat/Chat.php
index 3fb25d1..c083716 100644
--- a/sources/app/widgets/Chat/Chat.php
+++ b/sources/app/widgets/Chat/Chat.php
@@ -177,13 +177,12 @@ class Chat extends \Movim\Widget\Base
if($jid == null) {
RPC::call('movim_fill', 'chat_widget', $this->prepareEmpty());
} else {
- $n = new Notification;
- $n->ajaxCurrent('chat|'.$jid);
- $n->ajaxClear('chat|'.$jid);
-
$chats = new Chats;
$chats->ajaxGetHistory($jid);
+ $notif = new Notification;
+ $notif->ajaxClear('chat|'.$jid);
+
$html = $this->prepareChat($jid);
RPC::call('movim_push_state', $this->route('chat', $jid));
diff --git a/sources/app/widgets/Chat/_chat.tpl b/sources/app/widgets/Chat/_chat.tpl
index 01774ae..3f48c93 100644
--- a/sources/app/widgets/Chat/_chat.tpl
+++ b/sources/app/widgets/Chat/_chat.tpl
@@ -36,6 +36,14 @@
{else}
diff --git a/sources/app/widgets/Chat/chat.js b/sources/app/widgets/Chat/chat.js
index 5e67081..732918f 100644
--- a/sources/app/widgets/Chat/chat.js
+++ b/sources/app/widgets/Chat/chat.js
@@ -95,9 +95,8 @@ var Chat = {
id = message.jidfrom + '_conversation';
- if(message.body.match(/^\/me/)
- && bubble.querySelector('div') != null) {
- bubble.querySelector('div').className = 'quote';
+ if(message.body.match(/^\/me/)) {
+ bubble.querySelector('.message').className = 'message quote';
message.body = message.body.substr(4);
}
@@ -132,7 +131,7 @@ var Chat = {
}
if(message.body.match(/^\/me\s/)) {
- bubble.querySelector('div.bubble').className = 'bubble quote';
+ bubble.querySelector('div.bubble > p').className = 'quote';
message.body = message.body.substr(4);
}
diff --git a/sources/app/widgets/Chat/locales.ini b/sources/app/widgets/Chat/locales.ini
index e7c5eef..1c5f058 100644
--- a/sources/app/widgets/Chat/locales.ini
+++ b/sources/app/widgets/Chat/locales.ini
@@ -22,3 +22,4 @@ config = Configuration
config_saved = Configuration saved
subject = Subject
subject_changed = Subject changed
+administration = Administration
diff --git a/sources/app/widgets/Chats/chats.js b/sources/app/widgets/Chats/chats.js
index 649eda0..156550e 100644
--- a/sources/app/widgets/Chats/chats.js
+++ b/sources/app/widgets/Chats/chats.js
@@ -14,6 +14,7 @@ var Chats = {
Chat_ajaxGet(this.dataset.jid);
Chats.reset(items);
+ Notification_ajaxClear('chat|' + this.dataset.jid);
Notification.current('chat|' + this.dataset.jid);
document.querySelector('#chat_widget').dataset.jid = this.dataset.jid;
movim_add_class(this, 'active');
diff --git a/sources/app/widgets/Group/_group_subscribe.tpl b/sources/app/widgets/Group/_group_subscribe.tpl
index 09ed119..e9a95ab 100644
--- a/sources/app/widgets/Group/_group_subscribe.tpl
+++ b/sources/app/widgets/Group/_group_subscribe.tpl
@@ -1,29 +1,24 @@
- {$c->__('group.subscribe')}
- {if="$item"}
-
-
- {$item->name}
-
- {/if}
-
+
diff --git a/sources/app/widgets/Login/login.css b/sources/app/widgets/Login/login.css
index 559e646..119053d 100644
--- a/sources/app/widgets/Login/login.css
+++ b/sources/app/widgets/Login/login.css
@@ -44,7 +44,7 @@ body main {
min-height: 0;
}
-#login_widget form ul input {
+#login_widget form ul input:not([type=submit]) {
margin: 0;
height: 5rem;
}
diff --git a/sources/app/widgets/Menu/_menu_list.tpl b/sources/app/widgets/Menu/_menu_list.tpl
index e033fb3..a701549 100644
--- a/sources/app/widgets/Menu/_menu_list.tpl
+++ b/sources/app/widgets/Menu/_menu_list.tpl
@@ -7,15 +7,11 @@
{$c->__('page.news')}
-
- -
-
-
+
{/if}
diff --git a/sources/app/widgets/Notification/notification.js b/sources/app/widgets/Notification/notification.js
index 7090113..f9983eb 100644
--- a/sources/app/widgets/Notification/notification.js
+++ b/sources/app/widgets/Notification/notification.js
@@ -23,7 +23,7 @@ var Notification = {
},
sec*1000);
},
- refresh : function(keys) {
+ refresh : function(keys) {console.log(keys);
var counters = document.querySelectorAll('.counter');
for(i = 0; i < counters.length; i++) {
var n = counters[i];
@@ -155,7 +155,7 @@ if(typeof MovimWebsocket != 'undefined') {
}
if(typeof require !== 'undefined') {
- var remote = require('remote');
+ var remote = require('electron').remote;
Notification.electron = remote.getCurrentWindow();
}
diff --git a/sources/app/widgets/Rooms/Rooms.php b/sources/app/widgets/Rooms/Rooms.php
index 1f61e48..09ed022 100644
--- a/sources/app/widgets/Rooms/Rooms.php
+++ b/sources/app/widgets/Rooms/Rooms.php
@@ -89,6 +89,20 @@ class Rooms extends \Movim\Widget\Base
Dialog::fill($view->draw('_rooms_add', true));
}
+ /**
+ * @brief Edit a room configuration
+ */
+ function ajaxEdit($room)
+ {
+ $view = $this->tpl();
+ $cd = new \Modl\ConferenceDAO;
+
+ $view->assign('room', $cd->get($room));
+ $view->assign('username', $this->user->getUser());
+
+ Dialog::fill($view->draw('_rooms_add', true));
+ }
+
/**
* @brief Display the remove room confirmation
*/
@@ -181,6 +195,9 @@ class Rooms extends \Movim\Widget\Base
} elseif(trim($form['name']) == '') {
Notification::append(null, $this->__('chatrooms.empty_name'));
} else {
+ $cd = new \Modl\ConferenceDAO;
+ $cd->deleteNode($form['jid']);
+
$item = array(
'type' => 'conference',
'name' => $form['name'],
diff --git a/sources/app/widgets/Rooms/_rooms_add.tpl b/sources/app/widgets/Rooms/_rooms_add.tpl
index 6c4f654..b043761 100644
--- a/sources/app/widgets/Rooms/_rooms_add.tpl
+++ b/sources/app/widgets/Rooms/_rooms_add.tpl
@@ -1,17 +1,37 @@